Project

General

Profile

Recommended timer frequency and preemption model

Added by Oliver Schinagl almost 12 years ago

Hey all,

I have a tvheadend server (edia-tv/tvheadend-3.2) running on my gentoo box on a Asus M4A79T Deluxe with a AMD Phenom(tm) II X4 905e Processor and 8GiB of ram.
My DVB-T tuner is a 07:00.0 Multimedia video controller: Conexant Systems, Inc. CX23885 PCI Video and Audio Decoder (rev 04) by TERRATEC Electronic GmbH Device 117e.

I have done a few 'stress' testing a few days ago using VLC and have not found any issues initially. Today I found a lot of pixelation and chirps while trying to watch a program. At first I thought a signal issue, but after some investigation that should have been the case. I live only about 400 meters away from the signal so it really shouldn't be a huge issue. After a while I saw one of my virtual machines was using up all of one CPU core. So immediatly thought that was to blame. After fixing this problem however, I saw no improvement.

What I did see however was tons and tons of "Continuity counter error"'s on MPEG2AUDIO MPEG2VIDEO and even MPEG2TELETEXT.

Trying to force the second tuner by opening two streams actually was interesting. It did not work, where it did work a few days ago. Restarting TVHeadend solved this. Changing transponders may have fixed this aswell.

So now to my question ... while going through all this trying to fix Continuity counter error" (I even now have them, but they don't distrub the image/sound any longer, <10 every now and then, instead of 250+ every now and then) I thought of the kernels timer frequency and preemption model options.

First, timer frequency. What option would yield the most ideal tvheadend latency? I would initially think that 100 Hz could would improve throughput from the tuner card, but could introduce jerkyness by not answering interrupts in time. The 1000 Hz desktop latency setting seems a little like overkill and actually reduces throughput, which I don't think shouldn't be an issue though. The kernel's help actually recommends 250/300 Hz for NTSC/PAL systems, though I think that is for actually working with/using video on the system. All tvheadend does is pass through a mpeg2 stream and as long as it can get the data from the tuner, all is good. TVHeadend surely does some buffering to ensure the data arrives accuratly I'd assume?

Secondly, Preemption model. The ideal server preemption could again cause some packets not properly retrieved from the tuner? The desktop setting may actually be more ideal for a tuner right?

Or is this all moot since the system shouldn't have any issue dealing with this 'light' load anyway and I should have simply re-tuned the channel from the get-go :)