[mythtv] [PATCH] RingBuffer - fsync thread
John Patrick Poet
john at BlueSkyTours.com
Mon Dec 13 19:49:28 UTC 2004
On Mon, 13 Dec 2004, Daniel Thor Kristjansson wrote:
>
> John, I tried your patches out and everything worked dandy until I began
> a compile. A few minutes later I started getting
> "IOBOUND - blocking in ThreadedFileWriter::Write()"
> messages and the dmesg started reporting lost data. As soon as I stopped
> the compile both the IOBOUND messages and the buffer overrun messages
> stopped. The thing is, the buffer reports never reported a buffer over
> 6% full.
>
> I was compiling myth (niced), which is was mostly cached with ccache so
> I'm assuming the problem was actually that ccache was initiating a lot
> of disk activity (the system was 40% idle throughout). This must
> also have been a case of priority inversion since the compile was
> niced. Are writes to the buffer somehow blocked during the syncs? Or
> does the write disk access just monopolize the CPU too long?
I am guessing that the ringbuffer and filewriting threads are being starved.
> Admitedly, compiling with ccache enabled is a pretty tough test for
> MythTV, but it's the only way I can reliably get buffer overruns
> normally.
Wow. Using a HD-3000, without the ringbuffer thread, I get at least 4
overruns per minute when just recording a single show. Was not quite so bad
with the HD-2000, but I still got some.
I wonder what is different about your system, that you are not plagued by
overruns.
> BTW I set the PCI latency timers to 60, which normally avoids starving
> any particular device on the bus.
The only time I tried adjusting that stuff from the default, it just made
things worse. I guess I could try it again.
You could try increasing the size of the TheadedFileWriter ringbuffer. It
is adjusted in tv_rec.cpp. Try increasing it to 6 meg.
John
More information about the mythtv-dev
mailing list