[mythtv-users] random livetv stalls

Mike Thomas mt3 at pfw.demon.co.uk
Thu Feb 13 11:36:46 UTC 2014


On Thu, 13 Feb 2014 21:09:37 +1030
Mark Perkins <perkins1724 at hotmail.com> wrote:
> 
> 
> > On 13 Feb 2014, at 7:45 pm, "Mike Thomas" <mt3 at pfw.demon.co.uk>
> > wrote:
> > 
> > On Wed, 12 Feb 2014 12:48:57 -0800
> > Mike Carron <jmcarron at starstream.net> wrote:
> >> 
> >>> On 2/10/2014 8:05 PM, Kevin Johnson wrote:
> >>> Seems I have further improved the system by reducing the hd
> >>> ringbuffer size on the backend down to the min of 4700.
> >>> I had it set much higher at around 37000.  Cant remember why i
> >>> had altered it.
> >>> I still get a pause at the top and bottom of the hour, but only
> >>> about 1 second or less.
> >> ***
> >> I can't seem to find out what that hd ringbuffer is actually for or
> >> what conditions would indicate changing its size. Can anyone offer
> >> some advice?
> > 
> > Data is slapped into the ring buffer from the tuner cards. From
> > there it is sent to disk, examined for timing information (which
> > goes to the recordedseek table) and also transmitted to any clients
> > who are watching really up-to-date TV. It serves to smooth out the
> > jerkiness inherent in a non-real-time task.
> > 
> > My experiences are that 4700kB is too low and it can overflow at
> > times of increased activity, thereby damaging the recorded data
> > stream. If you are recording HD channels then it is probably way
> > too low. Anything from 10MB upwards works nicely for me.
> > 
> > Yours
> > 
> > Mike
> > _______________________________________________
> Mike is it generally the case that more ringbuffer is better or does
> too large start causing further problems?

It all comes down to how much memory you can afford to use. Don't
forget multiple tuners. If the ring buffer to too large it just
consumes memory unnecessarily.

If the ring buffer is too small, it will overflow when mythbackend is
unable to run. The reasons for this are many, from waiting for a mutex
to clear to waiting for other unrelated programmes to stop hogging the
CPU at some particular moment.

At the moment, my system with 4GB of RAM and 4 tuners is set to 18MB. I
don't use High Definition. This is the historic level I used with MythTV
0.22. When I changed it to the absolute minimum I noticed the
aforementioned overflow when a frontend started up live TV whilst
recording 2 channels and playing an old recording on another frontend.

I'd say the default of 10MBish is probably just fine, but if you notice
damaged recordings (visible as significant picture breakup) from time
to time, you should increase it.

However, if you have been following the mailing list, and the bug
commentary from Angela Schmid
(https://code.mythtv.org/trac/ticket/12016) you will be aware that
MythTV 0.27 still has a few wrinkles to iron out, and that some of
these may be related to the ring buffer. At the moment my advice is
to make it large enough to avoid damaging recording files, but not
excessively large just in case you tickle some bugs.

Yours,

Mike


More information about the mythtv-users mailing list