[mythtv-users] Storing recordings on network share

Travis Tabbal travis at tabbal.net
Thu Sep 22 15:24:42 UTC 2011

On Thu, Sep 22, 2011 at 7:10 AM, Simon Hobson <linux at thehobsons.co.uk>wrote:

> Raymond Wagner wrote:
> >The threadedfilewriter has a one second sync loop for each file.  This
> >sync loop runs independently for each file, and only syncs that single
> >file.  If you are writing a bunch of other data to disk independently,
> >those writes should be unaffected by MythTV's loop.
> But what about the other way around ? If other stuff blocks that 1
> second loop - does that mean the writing process blocks and loses
> incoming data that could otherwise be buffered ? Several gigs of RAM
> will buffer quite a lot of video when it's a 2mbps stream !

But who uses 2mbps these days? My recordings are ATSC from a HDHR, so
average 15mbps or so.  And Myth won't just keep buffering till it runs out
of RAM. It has a fixed size ringbuffer and it can and does overflow. I had
issues when recording to a RAID6 (ZFS RAIDZ2) over an NFS/SMB link to a VM
on the same server. Granted, there are a lot of layers there, but normal
file copies are very fast. I solved it by putting recordings on a small LVM
exported from the dom0 on a pair of RAID1 drives then using scripts to copy
them to the network share.

I saw some posts here talking about the speed of the SATA interface. Please
keep in mind that for our uses, that is completely irrelevant. It's the seek
time that's killing you here, the random I/O, NOT the interface speed. Look
at disk benchmarks, even for SSDs, and you will see an interesting pattern.
Streaming I/O will be high, while small random I/O will be REALLY slow in
comparison, a small fraction. Once you get a few streams of random I/O
going, disks can't keep up. Myth calling sync on the disks isn't helping as
now the OS cache and such can't help hide the pattern, though there are
reasons they do this. That is why people recommend putting recordings on
their own drives. It limits all the seeks from other system activity from
interfering with recordings. Using a pair of smaller drives in a storage
group is another win as myth will balance recordings across the disks for
you, like a RAID0, without the data integrity issues.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20110922/cb0bf18c/attachment.html 

More information about the mythtv-users mailing list