[vdr] ring buffer overflow under high cpu load
rnissl at gmx.de
Sat Mar 25 19:12:56 CET 2006
>>> I am using vdr-1.3.44 with xine-0.7.8 and everything works fine under
>>> operations. But, If I start using intensive CPU load applications,
>>> such as
>>> "VDRConvert" to create a dvd, vdr starts giving me ring buffer
>>> overflow messages.
>> I had serious disk throughput issues that were IMHO caused by the file
>> system driver (reiser) being too CPU-intensive. This also leads to
>> buffer overruns, since the writer cant keep up with the incoming data.
>> Things were better on kernel 2.4 and definitely improved on 2.6 after
>> re-formatting the file system. (fragmentation)
>> In light cases, playback is jerky while cutting, in severe cases, even
>> two parallel recordings caused an CPU overload of my C3-600.
> I wonder if running xine with some type of priority would help. Also, perhaps a
> networked version of xine my solve this. This is not a problem if I use my full
> featured card as the primary DVB.
What are your buffer settings in vdr-xine?
With the update from 0.7.6 to 0.7.7 you had to reduce the prebuffer as
it is now exactly measured. And with 0.7.8 you should reduce the
prebuffer further as it is increased indirectly by hysteresis.
If you buffer too much, then VDR will report a buffer overflow
(especially under high CPU load), as the buffer is provided by VDR
(#define TRANSFERBUFSIZE MEGABYTE(2)).
As the satellite streams at a constant rate, VDR puts as much data into
the buffer as xine takes out of it. So the buffer should never run full
and the average buffer usage depends on the above settings. But if the
average is to high, a burst write may cause an overflow, especially when
xine doesn't get enough CPU time to read the buffer immediately.
On my EPIA system with a 600 MHz C3 CPU, I run vdr with nice -n 19 and
xine with nice -n -20. I run VDR that nice, because background tasks
like EPG scan had an impact on fluent replay with xine. But meanwhile,
the most recent VDR versions schedule those threads a lower priority
anyway. So I'm not sure whether it is still a good idea to run VDR that
nice, especially when there are other tools like VDRConvert which run at
normal priority. Maybe, xine should have the highest priority and VDR
should be above the other processes.
Dipl.-Inform. (FH) Reinhard Nissl
mailto:rnissl at gmx.de
More information about the vdr