[mythtv] [PATCH] RingBuffer - fsync thread

bill peck bill.peck at gmail.com
Mon Dec 13 20:51:15 UTC 2004


Where do you see these overruns?  in /var/log/messages or in the
mythbackend log?  I have an HD3000 and I have yet to see this overrun
problem your talking about.  I'm not running my frontend on the same
box though.


On Mon, 13 Dec 2004 12:49:28 -0700 (MST), John Patrick Poet
<john at blueskytours.com> wrote:
> 
> 
> 
> 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
> 
> 
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> 
> 
> 


-- 

Bill Peck
http://www.pecknet.com


More information about the mythtv-dev mailing list