Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: VDR 1.3.12 buffer optimizations



Klaus Schmidinger wrote:

Sorry, there's no new version of VDR yet, but I've done some
optimizing on the buffer handling in cRemux, which appears to
avoid buffer overflows when several recordings are done.

A patch against VDR version 1.3.12 can be found at

ftp://ftp.cadsoft.de/vdr/Developer/vdr-1.3.12-optbuf.diff

Maybe some of you can give this a try and check whether it
enables you to do more recordings on the same device than before.


I tried this patch on my small slow system (Pentium 133, 1 ff rev1.3 card). After a short test, it seems that things are very much improved. Although i haven't had time to test it in detail, here is what i experienced:

I used to switch off the DO_MULTIPLE_RECORDINGS in dvbdevice.c since the transferthread and or the reciever thread that was started when a recording began in live view mode, would overload the system resulting in buffer overflows both in the transfer and the recording thread. With that switched off (also DO_REC_AND_PLAY...) system was running fine.

With this patch, things seem to work much smoother. And i only get buffer overflows in the transfer thread from time to time and what seems to be systematic, only on specific channels (maybe transponders).
For example on ARD on astra, vdr has relatively high cpu load (30-50%) with no recordings going on (this is also true for all other channels on that transponder. But up to now there were no problems with recordings (typically 70-99% cpu load) even if "top" sometimes reports 0%idle. On the other hand on ZDF on astra, "no recording" load is negligible but when a recording is started, in some cases the transfer thread reports buffer overflows (not very frequently but regularily). I don't know yet if any recordings are affected. Previously, before applying the patch my system was so heavily struggeling, that also the recording buffer overflowed and recording were useless (so in a sense, it seems that the number of parallel recordings has increased from 0 to 1 in my case;-)). I had the idea, that Dolby sound might affect the load. Could this be possible?

This is what i typically see in /var/log/messages:

.....
Sep 21 23:07:47 glotze vdr[2178]: switching device 1 to channel 2
Sep 21 23:07:47 glotze vdr[5347]: transfer thread started (pid=5347, tid=39944)
Sep 21 23:07:47 glotze vdr[5348]: receiver on device 1 thread started (pid=5348, tid=40969)
Sep 21 23:07:47 glotze vdr[2178]: timer 1 (2 2307-0207 '@TITLE EPISODE') start
Sep 21 23:07:47 glotze vdr[2178]: Title: 'Johannes B.Kerner' Subtitle: ''
Sep 21 23:07:47 glotze vdr[2178]: record /video/@Johannes_B.Kerner__/2004-09-21.23:07.50.50.rec
Sep 21 23:07:47 glotze vdr[2178]: creating directory /video/@Johannes_B.Kerner__
Sep 21 23:07:47 glotze vdr[2178]: creating directory /video/@Johannes_B.Kerner__/2004-09-21.23:07.50.50.rec
Sep 21 23:07:48 glotze vdr[2178]: recording to '/video/@Johannes_B.Kerner__/2004-09-21.23:07.50.50.rec/001.vdr'
Sep 21 23:07:48 glotze vdr[5350]: recording thread started (pid=5350, tid=41994)
Sep 21 23:07:59 glotze vdr[2178]: timer 1 (2 2307-0207 '@Johannes B.Kerner ') set to event Mit 22.09.2004 00:15-00:34 (VPS: 22.09 00:00) 'heute nacht'
Sep 21 23:08:59 glotze vdr[2182]: channel 17 (3sat;ZDFvision) event 22:25 'Ein Besuch im Louvre' status 1
Sep 21 23:09:48 glotze vdr[2182]: channel 17 (3sat;ZDFvision) event 23:10 'Paul C351zanne im Gespr344ch mit Joachim Gasquet' status 4
Sep 21 23:14:43 glotze vdr[2182]: channel 26 (ZDFinfokanal;ZDFvision) event 23:15 'Alternative Energie' status 4
Sep 21 23:15:22 glotze vdr[5348]: buffer usage: 80% (tid=39944)
Sep 21 23:15:22 glotze vdr[5348]: buffer usage: 85% (tid=39944)
Sep 21 23:15:52 glotze vdr[5348]: buffer usage: 90% (tid=39944)
Sep 21 23:15:52 glotze vdr[5348]: buffer usage: 95% (tid=39944)
Sep 21 23:15:55 glotze vdr[5348]: buffer usage: 100% (tid=39944)
Sep 21 23:15:55 glotze vdr[5348]: ERROR: 1 ring buffer overflow (89 bytes dropped)
Sep 21 23:15:56 glotze vdr[5347]: ERROR: skipped 99 byte to sync on TS packet
Sep 21 23:16:35 glotze vdr[5348]: ERROR: 408 ring buffer overflows (76605 bytes dropped)
Sep 21 23:16:36 glotze vdr[5347]: ERROR: skipped 99 byte to sync on TS packet
Sep 21 23:21:26 glotze vdr[2182]: channel 2 (ZDF;ZDFvision) event 21:27 'ZDF SPORTextra' status 1
Sep 21 23:22:19 glotze vdr[2182]: channel 2 (ZDF;ZDFvision) event 23:00 'Johannes B.Kerner' status 4
Sep 21 23:26:49 glotze vdr[5348]: ERROR: 58 ring buffer overflows (10805 bytes dropped)
Sep 21 23:26:50 glotze vdr[5347]: ERROR: skipped 99 byte to sync on TS packet
Sep 21 23:29:40 glotze vdr[2182]: channel 26 (ZDFinfokanal;ZDFvision) event 23:30 'Im Dschungel der Br374llaffen' status 4

I hope, this helps.
BTW, I am also using the the transfer3.patch by Reinhardt Nissl which didn't change much of the behaviour.

Regards,
Christoph

--
*********************************************************
*Christoph Gohle *
* *
*Gailkircherstrasse 7 *
*81247 München *
* *
*Tel.: 089 32905-266 (Büro) *
* -257 (Labor) *
* 089 8116932 (Privat) *
* 0179 6089431 (Mobil) *
*mail: chef@mnet-online.de *
*********************************************************





Home | Main Index | Thread Index