Mailing List Archive

X using way too much CPU?
Hi all,

Running CVS from last night (10 Feb), when watching live TV, I'm seeing
a load average of ~1. Top reveals that the XFree86 process is
consistently using ~30% of my CPU -- this is on an Athlon XP2100+.
Playing video through mythvideo (using mplayer) produces only 6-8% CPU
usage from the X process (in this case, top actually eats more CPU
monitoring it). Playing back mythtv recordings shows the same CPU
spike from XFree86, but doesn't screw up playback (since mythbackend
isn't doing anything, usage stays below 100%).

All this excess CPU usage is basically making live TV unwatchable
(audio stutters, video stops and starts, etc). Has anyone else seen
this? Is there some X setting I can (try to) optimize?

CPU: XP2100+
RAM: 512MB
Video: savage_drv.o (ProSavage8 DDR on-board)
Disk: ATA/100, which tests like so:
- Timing buffer-cache reads: 128 MB in 0.52 seconds =246.15 MB/sec
- Timing buffered disk reads: 64 MB in 1.12 seconds = 57.14 MB/sec

Any thoughts would be appreciated.


Thanks,
Nick
Re: X using way too much CPU? [ In reply to ]
This *may* be the same problem being discussed in the mythtv-dev list.
Check it out at
http://www.gossamer-thread.com/archive/MythTV_C2/Dev_F10/stuttery_audio_with_current_cvs_P50938/


My temporary solution has been to back up to the 04-feb CVS.

-Joe C.

> ------------------------------
>
> Date: Wed, 12 Feb 2003 00:08:47 +0000
> From: "nick" <ozzy@followthelemur.com>
> To: mythtv-users@snowman.net
> Subject: [mythtv-users] X using way too much CPU?
> Message-ID: <E18ikSF-00006i-00@solo.solosystem.com>
> Content-Type: text/plain; charset=iso-8859-1
> MIME-Version: 1.0
> Precedence: list
> Reply-To: Discussion about mythtv <mythtv-users@snowman.net>
> Message: 14
>
> Hi all,
>
> Running CVS from last night (10 Feb), when watching live TV, I'm seeing
> a load average of ~1. Top reveals that the XFree86 process is
> consistently using ~30% of my CPU -- this is on an Athlon XP2100+.
> Playing video through mythvideo (using mplayer) produces only 6-8% CPU
> usage from the X process (in this case, top actually eats more CPU
> monitoring it). Playing back mythtv recordings shows the same CPU
> spike from XFree86, but doesn't screw up playback (since mythbackend
> isn't doing anything, usage stays below 100%).
>
> All this excess CPU usage is basically making live TV unwatchable
> (audio stutters, video stops and starts, etc). Has anyone else seen
> this? Is there some X setting I can (try to) optimize?
>
> CPU: XP2100+
> RAM: 512MB
> Video: savage_drv.o (ProSavage8 DDR on-board)
> Disk: ATA/100, which tests like so:
> - Timing buffer-cache reads: 128 MB in 0.52 seconds =246.15 MB/sec
> - Timing buffered disk reads: 64 MB in 1.12 seconds = 57.14 MB/sec
>
> Any thoughts would be appreciated.
>
>
> Thanks,
> Nick
> ------------------------------
Re: X using way too much CPU? [ In reply to ]
> This *may* be the same problem being discussed in the mythtv-dev
> list. Check it out at [...]

Thanks for the tip. Checked out the thread, rolled back to the Feb 4
CVS, and no luck. Same problem. I'm inclined to believe that it's
either a problem with my X server configuration, my driver, or just
really, really awful performance by the video chip (on-board ProSavage
DDR). If I stick the video behind a giant terminal window while it's
playing (that is, nothing is displayed) the XFree86 process shows
almost no CPU usage. The instant it's viewable, the process uses
around 30%.

Again, what's most odd about this is that playing other videos (mpeg,
divx) in mplayer doesn't produce the same spike. And unfortunately, I
can't seem to make mplayer play mythtv recordings (even with the patch,
all I get is audio) to test whether it's the way myth plays the videos
or not. Ugh. Again, any suggestions more than welcome...


thanks,
Nick
Re: X using way too much CPU? [ In reply to ]
On Wednesday 12 February 2003 07:05 pm, nick wrote:
> > This *may* be the same problem being discussed in the mythtv-dev
> > list. Check it out at [...]
>
> Thanks for the tip. Checked out the thread, rolled back to the Feb 4
> CVS, and no luck. Same problem. I'm inclined to believe that it's
> either a problem with my X server configuration, my driver, or just
> really, really awful performance by the video chip (on-board ProSavage
> DDR). If I stick the video behind a giant terminal window while it's
> playing (that is, nothing is displayed) the XFree86 process shows
> almost no CPU usage. The instant it's viewable, the process uses
> around 30%.

That does sound like it's the Xv driver in Xfree doing something in software,
when it's intended to be using the video hardware for everything.

Isaac
Re: X using way too much CPU? [ In reply to ]
> That does sound like it's the Xv driver in Xfree doing something in
> software, when it's intended to be using the video hardware for
> everything.

This could definitely be it; I've done a bit more research, and it
looks like the Savage chipset doesn't natively support any YUV modes,
so they wind up getting translated (slowly) to YUY2 by the driver.
Yuck. It might be time to find a suitable AGP card with TV-out.