[mythtv-users] tuner use slowing down entire CPU?

Joseph H. Fry joe at thefrys.com
Mon Aug 4 06:43:01 EDT 2003


> Hello,
> 
> This may be something that belongs on linux-kernel, but I'm getting
some
> really strange behavior. I've recently installed a second tuner
(thanks to
> all those who replied by my question about wiring) and I've noticed
that
> each tuner I use seems to slow down the CPU. With no tuners in use on
my
> Athlon XP 2400+, top claims to take 0.7-1.3% CPU (according to
itself).
> With
> 1 tuner active, top takes 2.2-2.9% and mythbackend takes about 34-40%.
> With
> 2 tuners active, top takes 4.2-5.5% CPU and each of the two major
> mythbackends takes about 42-48% CPU. (Now, I can understand that top
may
> take polynomial time in the number of processes, but we're talking an
> extra
> two or three processes out of 100-something, and running extra copies
of
> top
> doesn't have the same effect.)
> 
> Both tuners are Hauppauge 401s, using btaudio, and there are no
unusual
> messages in the logs so far as I can tell. This is a real problem
because
> I
> can pick a recording setting that looks great when only 1 tuner is
active
> and takes up well under 50% CPU, yet when I add a second tuner
recording
> with the same settings, they both start skipping.
> 
> This also happens with one recording and one being watched live,
though of
> course that's really just two recording and one playing. With one
> recording
> and an old recording being watched, top takes 3.1-4.0% CPU and the one
> major
> mythbackend takes 42-60%.
> 
> Something isn't scaling here. I don't know if it's mythbackend or the
> kernel, but it's not something I see for other parts of the system
(e.g.
> making lots of requests at Apache might cause it to work more children
and
> take up more overall CPU, but top (and each individual httpd) doesn't
take
> up any more CPU). Rebooting, removing/reinsterting various modules,
> restarting various processes: none of these make any difference.
> 
> Also, my ntp drift decreases from ~+92 down to ~+87 or so after
extended
> periods of tuner use, though I'm not sure if it doesn't always do that
in
> response to some other sort of activity (e.g. disk IO).
> 
> Any clues?
> 
> --
> Omer Shenker                          http://omershenker.net/
> 
Now I can tell from your post that your by far more knowledgeable about
linux then myself... but hardware is my thing so lets look at that.

First off... are both your tuners using the same interrupt... are one or
both tuners using the same interrupt as another device in the system.

Are your tuner cards on lower interrupts than other important, process
consuming devices... I could see top taking extra cycles because it's
accessing a device with a higher interrupt than one of your tuners... so
essentially it has to interrupt the processor more often to get the
information it needs... I don't really know exactly how top retrieves
utilization information.

Is your bios configured for "Plug and play OS installed" or not?  I'm
pretty sure it shouldn't be for Linux.

Is all your RAM rated at the same speed?

Are any of your drives connected on the same channel with a lower
bandwidth drive.  AKA an ATA133 device on the same channel as a ATA33
device.

Though I cannot say that any of these things would cause the symptoms
your experiencing... but they might?

I wouldn't be surprised if it isn't just something simple like this, the
Linux kernel is just too good at what it does for me to jump straight to
that conclusion... and myth is just making use of what the kernel and
hardware have to offer... so that just leaves hardware optimization in
my opinion.  Unless this is a common issue, which I don't believe it is
as I haven't seen this come across the lists recently. 




More information about the mythtv-users mailing list