[mythtv] [PATCH] RingBuffer - fsync thread

John Patrick Poet john at BlueSkyTours.com
Mon Dec 13 17:15:18 UTC 2004


On Sun, 12 Dec 2004, Kyle Rose wrote:

> >> As Isaac suggested, this patch moves the fdatasync(fd) call to it's own
> >> thread.  The means that the ThreadedFileWriter does not have to wait for
> >> that call to return before processing data.
> >
> > What is the need to force a sync anyway?
>
> In my experience, the default Linux I/O scheduler will completely
> monopolize the bus at the standard sync interval, causing dropped
> frames and audio drop-outs.  Syncing more often reduces latency which
> reduces the likelihood of these problems.  It's a hack, but syncing
> more often worked for me for many months until I found a better
> solution.
>
> FWIW, I've had good success using the CFQ I/O scheduler in place of
> the anticipatory scheduler, the latter of which is the default despite
> being the root cause of lots of these problems.  CFQ results in lower
> throughput but much greater fairness.
>
> Cheers,
> Kyle


This message prompted to give the CFQ I/O scheduler a try.  The result is
definately different, but I am not sure if it is any better.  A *lot* higher
CPU usage.

I found a patch which is suppose fix the high CPU, but have not
tried it yet.  I found the patch in a thread which indicates that it will
probably make it into 2.6.10.

Thanks for the tip.

John


More information about the mythtv-dev mailing list