[mythtv-users] Combined FE/BE using USB for all I/O?

Eric Sharkey eric at lisaneric.org
Sat Aug 16 12:32:00 UTC 2014


On Sat, Aug 16, 2014 at 3:52 AM, Stephen Worthington
<stephen_agent at jsw.gen.nz> wrote:
> All it takes is one moment when the
> disk is too busy and you will lose a block of data and seconds of one
> or more recording.

I'm not a MythTV developer, but I can't think of any reason that
should happen on a modern system, assuming MythTV itself is well
written and the OS is properly configured.

This would only happen if the recording process writes to disk using
synchronous, unbuffered writes, and is unable to complete these writes
fast enough to issue a new read to the recording device before the
recording device's buffer is full and recording essentially stops.

If, on the other hand, MythTV is using asynchronous writes, these
should be buffered by the Linux kernel up to the limit of available
RAM.  It is then the job of the kernel I/O scheduler to decide how to
interleave these scheduled writes most efficiently (e.g. with an
"elevator algorithm" rather than a FIFO queue).  What's supposed to
happen is that as disk activity increases, more RAM is used to buffer
more data, and time spent seeking goes down and writes to files are
done in larger chunks.

If that's not happening on your system, then your system is probably
not well tuned.  The parameters in /etc/sysctl.conf control how many
pages can be used for dirty buffers and how long they're allowed to
remain dirty.  If your distribution is overly aggressive in making
sure that writes actually get to disk to protect the system from data
loss in the event of a power failure, then you might have these kinds
of recording drop outs.  But this is a software/configuration problem,
not a hardware issue.

Eric


More information about the mythtv-users mailing list