[mythtv-users] Software RAID and ionice

David Rees drees76 at gmail.com
Sun May 27 08:00:01 UTC 2007


On 5/25/07, Yeechang Lee <ylee at pobox.com> wrote:
> > It's pretty straight forward. Just put a // in front of line 336 of
> > ThreadedFileWriter.cpp which should correspond to a call to Sync().
>
> Tried this today. When pushed to the limits in ways akin to the tests
> I've previously written about, I found that the system seemed to
> "lose" about 10 to 30 more seconds per recording than with line 336;
> that is, a one-hour recording would often, not always, come out as
> 59:45 or 59:30 instead of 59:55. I've reverted to unpatched binaries
> (with the above-mentioned TFW patch, of course, as well as other
> patches I've long used) as I'm leaving on a trip tomorrow and want my
> recordings in the meanwhile to occur within a proven environment.

Hmm, that implies that something is not getting closed cleanly when
the threaded file writer exits... 30 seconds corresponds with the
linux kernel default of data flush intervals.

It looks like it should be fairly easy to write a small program to
test the ThreadedFileWriter, I'll try to write one in the next week or
two.

If in the mean time anyone wants to try something else, you could try
syncing less frequently by replacing line 335 of
ThreadedFileWriter.cpp:

bufferSyncWait.wait(written > tfw_min_write_size ? 1000 : 100);

with

bufferSyncWait.wait(written > tfw_min_write_size ? 5000 : 500);

-Dave


More information about the mythtv-users mailing list