Mailing List Archive

can we all get together and figure out cpu usage - Please respond
For the common good-
Following these lists for the past few months I have noticed
dramatically different results in cpu usage with mythtv. Some people
seem to run myth fine without maxing their cpu's and other people using
almost the same exact hardware have serious cpu issues. Unfortunately I
fall into the second category. I think I echo the thoughts of many on
this list by saying "What the hell!!!"

So can we get together and figure it out in this thread and I will throw
the results up on the web in a database if there is enough interest.

One thing I am very curious about. Are people who are saying mythtv is
using only %30-40 reading top correctly? When I watch livetv I tend to
have 5-10 mythbackend threads and 4 or 5 mythfrontend threads. Now this
is what I think - those that report low cpu usage aren't reporting total
cpu usage they are just reporting usage in the first thread in the list.
This is just a guess based on my experience with high end
hardware. Please report total cpu usage. Note- I am assuming no one is
compiling a kernel while using myth or running any cpu intensive tasks.

Would everyone plz submit their systems and idle
cpu from top sorta like as follows:
Livetv - 720x480 RTJPEG - cpu idle ~ %7
Livetv- 640x480 Mpeg4 HQ(high quality) 3300,2,15,2- cpu idle %2-10
prerecorded - 640x480Mpeg4 HQ(high quality)3300,2,15,2- cpu idle
%75

System:
Athlon XP 2100+ overlocked to 2.1ghz
asus k7v266
512mb pc2100
hauppage wintv 401 w/ btaudio
geforce2mx 32mb
running debian sid X 4.2.1
200mb drivezilla 280/50 hdparm dma enabled

Now for the frontend:
Livetv or playback of mpeg4 640x480 - 0% idle AHHH!
Livetv or playback of mpeg4 480x480 - 2% idle AHHH!
The problem here is that X on my frontend uses 30-50% cpu and I don't
know why.

Specs:
Celeron 1.2
pcchips M758lmr+
sis 630 chipset with shared agp video
256mb pc100
HD used only for bootup then turned off
Debian Sid
I have tried both X 4.2.1 and 4.3 and both onboard video and ati rage128
video, both support xv and both give 30%-50% cpu during playback in
myth, but work fine with mplayer playing dvd's and divx. Again, "What
the hell!!!"

Final idea - I am not much of a c++ guy - though myth is prompting me to
learn more. Could we make some sort of performance debug plugin that
will record myth performance and output it to a text file along with a
list of system specs for easy submission to this list or to a website.
After writing that I just realized i could probably just do a perl
script and read the settings from the database so I will do that and
post it soon.
Like I said in the subject please respond so we can figure out the weird
hardware discrepancies.

Thanks all!
-Wally
RE: can we all get together and figure out cpu usage - Please respond [ In reply to ]
Check your X logs to make sure X is using xv to play the video and not xsm

-----Original Message-----
From: mythtv-users-bounces@snowman.net
[mailto:mythtv-users-bounces@snowman.net] On Behalf Of Wally Wallace
Sent: Friday, April 18, 2003 9:13 PM
To: mythtv-users@snowman.net
Subject: [mythtv-users] can we all get together and figure out cpu usage -
Please respond

For the common good-
Following these lists for the past few months I have noticed
dramatically different results in cpu usage with mythtv. Some people
seem to run myth fine without maxing their cpu's and other people using
almost the same exact hardware have serious cpu issues. Unfortunately I
fall into the second category. I think I echo the thoughts of many on
this list by saying "What the hell!!!"

So can we get together and figure it out in this thread and I will throw
the results up on the web in a database if there is enough interest.

One thing I am very curious about. Are people who are saying mythtv is
using only %30-40 reading top correctly? When I watch livetv I tend to
have 5-10 mythbackend threads and 4 or 5 mythfrontend threads. Now this
is what I think - those that report low cpu usage aren't reporting total
cpu usage they are just reporting usage in the first thread in the list.
This is just a guess based on my experience with high end
hardware. Please report total cpu usage. Note- I am assuming no one is
compiling a kernel while using myth or running any cpu intensive tasks.

Would everyone plz submit their systems and idle
cpu from top sorta like as follows:
Livetv - 720x480 RTJPEG - cpu idle ~ %7
Livetv- 640x480 Mpeg4 HQ(high quality) 3300,2,15,2- cpu idle %2-10
prerecorded - 640x480Mpeg4 HQ(high quality)3300,2,15,2- cpu idle
%75

System:
Athlon XP 2100+ overlocked to 2.1ghz
asus k7v266
512mb pc2100
hauppage wintv 401 w/ btaudio
geforce2mx 32mb
running debian sid X 4.2.1
200mb drivezilla 280/50 hdparm dma enabled

Now for the frontend:
Livetv or playback of mpeg4 640x480 - 0% idle AHHH!
Livetv or playback of mpeg4 480x480 - 2% idle AHHH!
The problem here is that X on my frontend uses 30-50% cpu and I don't
know why.

Specs:
Celeron 1.2
pcchips M758lmr+
sis 630 chipset with shared agp video
256mb pc100
HD used only for bootup then turned off
Debian Sid
I have tried both X 4.2.1 and 4.3 and both onboard video and ati rage128
video, both support xv and both give 30%-50% cpu during playback in
myth, but work fine with mplayer playing dvd's and divx. Again, "What
the hell!!!"

Final idea - I am not much of a c++ guy - though myth is prompting me to
learn more. Could we make some sort of performance debug plugin that
will record myth performance and output it to a text file along with a
list of system specs for easy submission to this list or to a website.
After writing that I just realized i could probably just do a perl
script and read the settings from the database so I will do that and
post it soon.
Like I said in the subject please respond so we can figure out the weird
hardware discrepancies.

Thanks all!
-Wally
_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: can we all get together and figure out cpu usage - Please respond [ In reply to ]
Wally Wallace wrote:
...
> One thing I am very curious about. Are people who are saying mythtv is
> using only %30-40 reading top correctly? When I watch livetv I tend to
> have 5-10 mythbackend threads and 4 or 5 mythfrontend threads. Now this
> is what I think - those that report low cpu usage aren't reporting total
> cpu usage they are just reporting usage in the first thread in the list.

This is why I suggest checking the idle time in section 19.4.
It doesn't matter what is pegging the CPU, if there isn't
time to encode all the frames, frames will be dropped.

Only the video encoding thread should be using significant
CPU. If the audio thread is using more than 10-20% that
may be a clue for a problem with audio recording. If I
record something that takes ~48% for video, ~7% audio and
41% idle, no other backend threads or processes take more
than 2% CPU. Adding up the threads also doesn't account for
sys cpu which shouldn't be more than a few % anyway. So,
you're right that reporting the video thread only is a bit
optimistic. It should be the bulk of the CPU time but idle
time is the important indicator.

> The problem here is that X on my frontend uses 30-50% cpu and I don't
> know why.

Did you ever think "What the hell" I might as well try a
simple window manager like 'twm" to see if that makes a
difference? 30-50% cpu for the X server is not normal and
is likely related to your other problems.

Another variable that is often overlooked is signal quality.
Snow is hard to compress. A poor signal can drive your CPU
usage way up (and gathering stats from others won't account
for this). Try connecting a DVD player directly into your
tuner card and see if it does significantly better. If so,
call your cable company. Another indicator of this is if
your idle time varies significantly depending on which
channel you record.

-- bjm
Re:can we all get together and figure out cpu usage - Please respond [ In reply to ]
Well I guess no one cares enough to actually do what I asked an post cpu
usage. Instead you all seem to post sill suggestions that I have already
tried

john wrote:
-Check your X logs to make sure X is using xv to play the video and not
-xsm
I thought xsm was x session manager and I din't know it could play
video. Anyway, myth says it is connecting to an xv port and my logs show
xv.

bjm wrote:
-Did you ever think "What the hell" I might as well try a
-simple window manager like 'twm" to see if that makes a
-difference? 30-50% cpu for the X server is not normal and
-is likely related to your other problems.

How bout "What the hell" I will humor the guy who started the thread and
actually post my specs:) I do appreciate your comments though.

I think it is just common since that I would
have done that. I have tried blackbox, fluxobox, twm, fvwm, icewm, and
xfce. What do you suggest i try next ratpoison - don't think it would
handle changing focus?

I know it is not normal, if people would post their hardware specs
perhaps those of use who have obscure
hardware problems could figure out what is going on.

Is snow hard to decompress? My signal seems to be fine and I tried
hooking up a vcr and have the same issues.

Sorry if I am coming across as frustrated - but no one seems to care
enough to post their working cpu and encoding specs. I mean should I
throw up a website with a form to subset for those who don't feel like
taking the time to email? I don't want to waste my time if no one will
participate.

-Wally
Re: Re:can we all get together and figure out cpu usage - Please respond [ In reply to ]
> Well I guess no one cares enough to actually do what I asked an post cpu
> usage. Instead you all seem to post sill suggestions that I have already
> tried

I appreciate your frustration, however, the "problem" with email lists is
that they are faceless and it can be doubly frustrating when you get little
response. Often this just means that no one has the slightest clue how to
help you though! (or they are on an easter holiday...)

I am happy to post my CPU idle info but you will have to wait until tomorrow
UK time for the details. I also have a dual CPU 1 Ghz machine which makes
comparison difficult though!

One thing I have observed is something similar to your problem, but less
extreme. It's something like someone else posting specs which seem much
faster than mine with similar (in theory) hardware. I have decided that it
is often chipset issues and other subtle stuff which can make a big
difference. For example I am never ever going to buy a motherboard with a
via chipset again - they appear to be extremely slow for lots of stuff, yet
the sticker speed is supposed to be fast. They also crash in wierd ways
that no one else can help me debug, and for various unexplained reasons,
even by Alan Cox (who write me a nice note) is why USB stops working with
certain kernel versions....

Your problem is more extreme, but you did note that overclocking the bus
made a big difference. To *me* this would suggest that you have a hardware
bottleneck somewhere. I don't know why mplayer would not expose this, but
mythtv would...? Possibly more efficient algorithms in mplayer than the
nuvplayer code...? Also the de-interlace code or similar could be thrashing
the memory bus (have you tried disabling de-interlace and switching off
sound recording to isolate just the video decoder?)

Someone posted a research paper recently that you could decode HDTV in less
than 1Ghz of CPU by re-order the decode order so that there were more cache
hits and the memory bus took less of a hit! The point is that for video you
can get BIG speed improvements or equally a machine like mine (and perhaps
yours) with a poor memory bus can take a disproportionate hit if the
algorithm is less "efficient".

ANyway, some ideas. I think you need to get more extreme with your
debugging. Can you squeeze in a full video card (take the case off?),
something like a cheap Geforce 2 just for debugging? If performance rockets
at least you can isolate that one component... Also see if you have any
interrupt collisions and fiddle with ACPI these can drain bus bandwidth.

Sorry, no magic bullet, but like most people here I really dont know how to
help. Good luck though!
Re: Re:can we all get together and figure out cpu usage - Please respond [ In reply to ]
Dude, you need to be a little bit more mellow. Sometimes everyone in
the world isn't interested in leaping two footed into solving your
little problem. Plus this kind of information has been frequently
posted to the list, so if you really wanted to you could do a little
list searching. All the information I'm posting here for instance has
been posted earlier by me on the list.
And yes, I know how to read top.


XP2000
asus Asus A7N266-VM with nic, soundcard and basic graphics (gforce2)
512 crucial ram
180 gig WD 7200rpm drive
antec case w/350 watt antec power supply
Hauppage WinTV Go

got all that for $458 including shipping btw!

I'm using RH8
nvidia drivers
I use an external vga --> tv converter box.
I'm at 800x600 so that I have a fighting chance of reading terminal
text on the tv, since I don't have a monitor hooked up.


480 x 480 mpeg4
2900 kbps
mp3 quality 6
default everything else

I'm using KDE since I have no reason to minimize cpu since i don't have
a second tuner.
Mythfrontend < 10%
X <6%
Mythbackend < 37%

Those values are the max I see, and often cruise along at less than
that.
I always see better than 50% idle.
Re: can we all get together and figure out cpu usage - Please respond [ In reply to ]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Top shows 35-42% CPU load by user when I record with only mythbackend
running. I am using the default recording setting (480x480, 2200
bitrate) and KDE as a desktop manager.

I have a 1.4 Celeron with 256M RAM.=20

Alex
Re: Re:can we all get together and figure out cpu usage - Please respond [ In reply to ]
On Sat, 2003-04-19 at 19:51, Cedar McKay wrote:
> XP2000
> asus Asus A7N266-VM with nic, soundcard and basic graphics (gforce2)
> 512 crucial ram
> 180 gig WD 7200rpm drive
> antec case w/350 watt antec power supply
> Hauppage WinTV Go

Since my hardware is the pretty much the same as yours (minus the case,
HD, and PS), I hope you don't mind if I ask you a question or two about
disk I/O, sound quality, etc.?

What kernel are you running? I was under the impression that IDE
support for the nForce chipset was poor except in relatively recent -ac
versions. I'm running 2.4.21-pre5-ac2, for example, and with that I can
get about 32 MB/sec disk reads from hdparm on my 60 GB Seagate Baracuda
IV. (ext3 filesystem, data=writeback, noatime) With earlier kernel
versions I was getting much lower because it would refuse to honor
higher UDMA rates.

> 480 x 480 mpeg4
> 2900 kbps
> mp3 quality 6
> default everything else

I run 480x480 mpeg4, 3300 (scaled) and default (2/15/3) parameters, but
with 48000 KHz uncompressed audio and still see 60% idle and see about
1200 blocks wr/sec in iostat during WatchingLiveTV Strangely, I see 0
blocks rd/sec in iostat during this. I was under the impression that
watchingLiveTV was simultaneously writing and reading from the
ringbuffer, but perhaps I'm not seeing disk reads on the device because
the reads are being pulled from filesystem buffer in memory?

Whenever I try to go to mp3 audio I start getting jumpy video, but I
would think that my system is certainly beefy enough to do it. Likewise,
I can't seem to do 640x480 without jumpy video (even though I have 35%
idle cpu in this case).

> I'm using KDE since I have no reason to minimize cpu since i don't have
> a second tuner.

I'm running FluxBox, but this brings up an interesting point: did you
disable artsd in order to let myth have the audio dsp? On my (separate)
desktop system I run KDE and have never been able to figure out how to have
UI sound effects from artsd while still allowing other things like xmms or
mythfrontend to play sound as well.

As for audio - I'm curious how you feel about the audio quality from your
setup. I have the same card I think (WinTV Go, model 190) and the sound
from Myth seems harsh and lacks bass. Is it safe to assume that you're using
ALSA for the nForce onboard sound?

Thanks for any pointer you might be willing to provide!

- Dave
Re: can we all get together and figure out cpu usage - Please respond [ In reply to ]
--- Bruce Markey <bjm@lvcm.com> wrote:
> Did you ever think "What the hell" I might as well
> try a
> simple window manager like 'twm" to see if that
> makes a
> difference? 30-50% cpu for the X server is not
> normal and
> is likely related to your other problems.

I had high X server CPU utilization until I lowered
the resolution from 1280x1024 to 1024x768 and dropped
from 24-bit to 16-bit per pixel. Using glxgears as a
video benchmark, I doubled my performance with those
two changes. X cpu use is now negligible. This was on
a GeForce2 MX (nforce chipset).

I still have very high mythbackend CPU usage for my
hardware/software, even though it is nearly identical
to some other configurations.

Wally, like you, I am still looking to solve some
issues. I agree with the others that you should comb
the archives for various solutions and see if you can
get anything to work. Every week or so a couple of new
ideas pop-up in this mailing list which gives me hope
that eventually I will get this solved.

./jj

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com
RE: can we all get together and figure out cpu usage - Please respond [ In reply to ]
Somewhat of a shot in the dark but I've seen this same thing happen with a completely unrelated piece of software where the version of QT plus other mitigating factors caused ridiculously high cpu usage in X. You might try correlating the problem to QT version as well.

-----Original Message-----
From: Jason James [mailto:jason_james_97@yahoo.com]
Sent: Monday, April 21, 2003 8:36 AM
To: Discussion about mythtv
Subject: Re: [mythtv-users] can we all get together and figure out cpu
usage - Please respond



--- Bruce Markey <bjm@lvcm.com> wrote:
> Did you ever think "What the hell" I might as well
> try a
> simple window manager like 'twm" to see if that
> makes a
> difference? 30-50% cpu for the X server is not
> normal and
> is likely related to your other problems.

I had high X server CPU utilization until I lowered
the resolution from 1280x1024 to 1024x768 and dropped
from 24-bit to 16-bit per pixel. Using glxgears as a
video benchmark, I doubled my performance with those
two changes. X cpu use is now negligible. This was on
a GeForce2 MX (nforce chipset).

I still have very high mythbackend CPU usage for my
hardware/software, even though it is nearly identical
to some other configurations.

Wally, like you, I am still looking to solve some
issues. I agree with the others that you should comb
the archives for various solutions and see if you can
get anything to work. Every week or so a couple of new
ideas pop-up in this mailing list which gives me hope
that eventually I will get this solved.

./jj

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com
_______________________________________________
mythtv-users mailing list
mythtv-users@snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Re:can we all get together and figure out cpu usage - Please respond [ In reply to ]
On Sat, 2003-04-19 at 13:57, Wally Wallace wrote:
> john wrote:
> -Check your X logs to make sure X is using xv to play the video and not
> -xsm
> I thought xsm was x session manager and I din't know it could play
> video. Anyway, myth says it is connecting to an xv port and my logs show
> xv.

He meant xshm, probably.

I posted along these lines earlier, though I wasn't reporting the system
totals.

Athlon XP 2200, 256MB PC2700 RAM, Asus A7V-333X mobo, Seagate Barracuda
ATA100 HD, crappy onboard via-c82xx sound (for now), GeForce MX 440,
WinTV-Radio.

Here's a few consecutive results from top for watching LiveTV at 720x480
with RTJPEG, default settings:
CPU states: 27.9% user 3.9% system 0.0% nice 0.0% iowait 68.0%
idle
CPU states: 42.8% user 6.0% system 0.0% nice 0.0% iowait 51.2%
idle
CPU states: 40.5% user 7.7% system 0.0% nice 0.0% iowait 51.6%
idle
CPU states: 41.5% user 7.5% system 0.0% nice 0.0% iowait 50.8%
idle
CPU states: 31.8% user 4.0% system 0.0% nice 0.0% iowait 64.2%
idle
CPU states: 29.3% user 2.5% system 0.0% nice 0.0% iowait 68.0%
idle
CPU states: 29.0% user 2.8% system 0.0% nice 0.0% iowait 68.2%
idle
CPU states: 30.7% user 3.1% system 0.0% nice 0.0% iowait 66.0%
idle
CPU states: 28.2% user 2.1% system 0.0% nice 0.0% iowait 69.5%
idle
CPU states: 27.8% user 1.9% system 0.0% nice 0.0% iowait 70.1%
idle

Interesting that my load averages while monitoring were between 12 and
18.

Rick