Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Xine and Mplayer uses 4x as much CPU on 2.6.3 then on 2.4.25
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
rettw
n00b
n00b


Joined: 14 Mar 2004
Posts: 20

PostPosted: Sun Mar 21, 2004 10:00 pm    Post subject: Xine and Mplayer uses 4x as much CPU on 2.6.3 then on 2.4.25 Reply with quote

Hello all:

I have been testing Gentoo linux for multimedia uses and I have noticed that when running kernel 2.6.3 Xine and Mplayer use more CPU when playing DVDs then while running on kernel 2.4.25. On a P4 2.8 Ghz system xine uses about 1-4 % CPU when playing a DVD, and Mplayer uses 8-12% when using vanilla-kernel 2.4.25. These numbers are at least 4 times higher on 2.6.3. I am using the latest NVIDIA binary drivers on both kernels, however using just the "NV" driver that comes with XFree gives the same performance. I am using Xvideo for output.

Also of note is that under 2.6.3 most of the extra CPU is going to the "X" process as shown by top.

Anyone else out there noticed this? It seems silly to me to have to use 50% of a 2.8 machine to play a DVD, when I have P3 850s that only use 50% on the 2.4 kernel to do the same thing.

Here are my system specs:

2.8 Ghz P4, Sis 648 Chip Set, 1 Gig RAM, 120 GB WD HD, Nvidia GeForce 4TI 4200, SB Live 5.1.

Gentoo Linux 1.4 compiled from Stage 1. Install.

Thanks,

Rett
Back to top
View user's profile Send private message
nofx911
n00b
n00b


Joined: 21 Jan 2004
Posts: 30
Location: Milwaukee, WI

PostPosted: Sun Mar 21, 2004 10:17 pm    Post subject: Something sounds weird Reply with quote

It sounds to me like something may be misconfigured with your xserver or there some extra transperancy or clipping that it is trying to do on each frame.

On my laptop which is running 2.6.3 and has a Mobile P3 @ 1132mhz processor.
Xine uses on average 21% of the cpu
X11 uses on average 17% of the cpu
These numbers seem to be inline with the numbers that you posted with your computers running the 2.4.x kernel.

I am using the open source savage video driver with no hardware acceletation.

What use flags are you using when compiling X11 and xine?
Have you tried to reemerge them since switching to the 2.6.3 kernel?
Back to top
View user's profile Send private message
foton2
Guru
Guru


Joined: 23 Feb 2004
Posts: 347
Location: Prague, Czech Republick

PostPosted: Sun Mar 21, 2004 10:17 pm    Post subject: Reply with quote

Do you have DMA enabled ? For disk and DVDROM.
Back to top
View user's profile Send private message
rettw
n00b
n00b


Joined: 14 Mar 2004
Posts: 20

PostPosted: Sun Mar 21, 2004 10:49 pm    Post subject: Reply with quote

To answer reply #2, DMA is enabled and reported as on by hdparm on both drives.

For the 1st reply, I started out on kernel 2.6.3, everything was built/emerged under that kernel. I downgraded to kernel 2.4.25 afterwards when I noticed the high CPU. I also have tried the latest xine-lib release, compiled/installed by hand and it shows the same issue.

Here is my make.conf file settings:

# These settings were set by the catalyst build script that #automatically built$
CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
#USE=""
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo...
USE="kde qt dvd alsa cdr cups ppds"
ALSA_CARDS="emu10k1"

Also, under accelerated drivers using Xvideo, X should show almost no CPU utilization, even on older platforms.

Thanks,

Rett Walters

BTW, this is my first gentoo system, I have been using RH since 1996.
Back to top
View user's profile Send private message
foton2
Guru
Guru


Joined: 23 Feb 2004
Posts: 347
Location: Prague, Czech Republick

PostPosted: Sun Mar 21, 2004 11:24 pm    Post subject: Reply with quote

P4 2.4 Ghz 768MB RAM NVIDIA GEFORCE MX 440 80Gb Seagate SB Live 5.1
Kernel gentoo-dev-sources-2.6.4-r1 -vo xv NVIDIA drivers 44960 (with 5336 it is the same)
Mplayer fullscreen 4-5% of CPU :?
What about your kernel config ?
Back to top
View user's profile Send private message
nofx911
n00b
n00b


Joined: 21 Jan 2004
Posts: 30
Location: Milwaukee, WI

PostPosted: Sun Mar 21, 2004 11:32 pm    Post subject: Additional USE flags Reply with quote

Try adding sse and mmx to the use flags and then reemerging xine and x11. I think that it may be under optimizing itself.

For a full list of global use flags:
http://www.gentoo.org/dyn/use-index.xml
Back to top
View user's profile Send private message
hardcampa
n00b
n00b


Joined: 11 Oct 2002
Posts: 58

PostPosted: Mon Mar 22, 2004 2:51 am    Post subject: Reply with quote

Try switching sound device in mplayer.
I've had slowdowns earlier, that was until I realized it all depended on the sound.

Try without sound as well to compare.
_________________
http://gibbage.mine.nu
Back to top
View user's profile Send private message
Sipi
Guru
Guru


Joined: 03 Apr 2003
Posts: 406
Location: Hungary

PostPosted: Mon Mar 22, 2004 9:09 am    Post subject: Reply with quote

Did you enabled MTRR in kernel config?

Sipi
Back to top
View user's profile Send private message
TenPin
Guru
Guru


Joined: 26 Aug 2002
Posts: 500
Location: Kansas City

PostPosted: Mon Mar 22, 2004 7:22 pm    Post subject: Reply with quote

With 2.6.4 on my P4 2.4 mplayer uses 28%. My Duron 950 uses 45%.

Less than 20% total for playing a DVD sounds bogus to me.
Back to top
View user's profile Send private message
rettw
n00b
n00b


Joined: 14 Mar 2004
Posts: 20

PostPosted: Tue Mar 23, 2004 2:05 am    Post subject: Reply with quote

TenPin wrote:
With 2.6.4 on my P4 2.4 mplayer uses 28%. My Duron 950 uses 45%.

Less than 20% total for playing a DVD sounds bogus to me.


I have a P4 running 2.4.22 (RH 8.0) that is playing a DVD as we speak and is only using 2-5% CPU. I have been getting performance like this for quite some time.

As for Mplayer, while it is very good for utility, I found it to consistently use 2-4 times more CPU than xine on the same operations. I am now playing a DVD with mplayer, and top is reporting 14 % CPU on the same system.

In fact, I have 2 P3 850 machines that use 30-35 % playing a DVD with xine.

I also have a P3 700 Laptop that does 35-40% while playing a DVD with xine.

I would say you're getting pretty poor performance, at 28% on a 2.4 P4.

Rett
Back to top
View user's profile Send private message
rettw
n00b
n00b


Joined: 14 Mar 2004
Posts: 20

PostPosted: Tue Mar 23, 2004 2:06 am    Post subject: Reply with quote

Sipi wrote:
Did you enabled MTRR in kernel config?

Sipi


Yes, MTRR is enable in the Kernel Config.
Back to top
View user's profile Send private message
rettw
n00b
n00b


Joined: 14 Mar 2004
Posts: 20

PostPosted: Tue Mar 23, 2004 2:13 am    Post subject: Re: Additional USE flags Reply with quote

nofx911 wrote:
Try adding sse and mmx to the use flags and then reemerging xine and x11. I think that it may be under optimizing itself.

For a full list of global use flags:
http://www.gentoo.org/dyn/use-index.xml


If X11/xine weren't properly optimized, I would expect to see issues under both kernels. Everything works great under 2.4.25, So how will re-compiling X11 help? Everything I am seeing points to a kernel issue, not X11/xine.

For that matter, Redhat Compiles/optimizes everything for a 386, and I don't have these issues using RH9 on the same system.

Rett
Back to top
View user's profile Send private message
Kabuto
l33t
l33t


Joined: 01 Aug 2002
Posts: 701

PostPosted: Tue Mar 23, 2004 5:48 pm    Post subject: Reply with quote

AGP driver? Using nvidia's or AGPGART?
Back to top
View user's profile Send private message
rettw
n00b
n00b


Joined: 14 Mar 2004
Posts: 20

PostPosted: Wed Mar 24, 2004 4:01 am    Post subject: Reply with quote

hardcampa wrote:
Try switching sound device in mplayer.
I've had slowdowns earlier, that was until I realized it all depended on the sound.

Try without sound as well to compare.


Without sound makes little difference. CPU drops maybe 1-2%

Rett
Back to top
View user's profile Send private message
rettw
n00b
n00b


Joined: 14 Mar 2004
Posts: 20

PostPosted: Wed Mar 24, 2004 4:07 am    Post subject: Reply with quote

Kabuto wrote:
AGP driver? Using nvidia's or AGPGART?


Under 2.6, AGPgart is a module, and I load it, but the NVIDIA driver can't use it for some reason. NVIDIA AGP works according to the X log, but makes no difference.

Under 2.4 both AGPgart and NVIDIA AGP work fine, and of course the performance is great.

I have read some stuff on the Xfree mailing list regarding a very similar issue. They are saying that on some platforms the memcpy() in the XVideo driver just takes too long. This could be related to MTRRs, which I have enabled and appear to be working /proc/mtrr shows valid output. The only solution they give is to move to xfree 4.4, which is not available in portage yet.

One way or the other, it appears to be kernel related, since 2.4 works great, and 2.6 is bad. I just noticed a new version of xfree (4.3.0-r6) in portage so I am emerging it to see what happens.

Rett Walters
Back to top
View user's profile Send private message
rettw
n00b
n00b


Joined: 14 Mar 2004
Posts: 20

PostPosted: Thu Mar 25, 2004 2:24 am    Post subject: Re: Additional USE flags Reply with quote

rettw wrote:
nofx911 wrote:
Try adding sse and mmx to the use flags and then reemerging xine and x11. I think that it may be under optimizing itself.

For a full list of global use flags:
http://www.gentoo.org/dyn/use-index.xml


If X11/xine weren't properly optimized, I would expect to see issues under both kernels. Everything works great under 2.4.25, So how will re-compiling X11 help? Everything I am seeing points to a kernel issue, not X11/xine.

For that matter, Redhat Compiles/optimizes everything for a 386, and I don't have these issues using RH9 on the same system.

Rett


Update: Re-emerging X and xine with SSE and MMX USE statements had no effect.

Rett
Back to top
View user's profile Send private message
Paladine01
Tux's lil' helper
Tux's lil' helper


Joined: 17 Dec 2003
Posts: 131
Location: Phoenix AZ

PostPosted: Wed Apr 14, 2004 3:46 pm    Post subject: Reply with quote

I've got the same problem.


X usage in 2.6 with XV is much higher :(
Back to top
View user's profile Send private message
Kabuto
l33t
l33t


Joined: 01 Aug 2002
Posts: 701

PostPosted: Wed Apr 14, 2004 4:07 pm    Post subject: Reply with quote

How about emerge xorg X server and trying that since it is based off XFree86 4.4rc2.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum