[SOLVED] High CPU usage with kernels 3.x

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
gapan
Salix Wizard
Posts: 6403
Joined: 6. Jun 2009, 17:40

[SOLVED] High CPU usage with kernels 3.x

Post by gapan »

I have been compiling and using newer kernels for a while. Unfortunately, my experiences with kernels >=3.0 are not the best. I have a CoreDuo laptop that I'm using to play back most of my video files. It has an Intel video card, specifically a 945GM model. With any kernel up to 2.6.39.x, self-compiled or stock-slackware, 720p H264 video plays flawlessly with mplayer2. CPU usage hovers around 25-35% with the occasional spike to 50% or close. But with kernels 3.0 and up, CPU usage is constantly over 50%, which means that it's constantly using 100% of one core. That results to skipping video, which is very annoying. I've tried the latest 3.1.4 kernel, but the problem is still there. The config I'm using is basically the same as in the latest kernel-generic config in slackware-current repos, only just including a couple of filesystems to the kernel, because I'm bored to create an initrd every time. I could upload the config somewhere if someone wants it, I could even upload the (32bit) kernels.

So, my questions are: Does anybody else has similar experiences or is it only me? Is anyone aware if this is a known regression in the newer kernels?

I can happily stay with kernel 2.6.39.4 for now, but I'm worried about what the future might bring.
Image
Image
thom1
Posts: 28
Joined: 16. May 2011, 09:40

Re: High CPU usage with kernels 3.x

Post by thom1 »

Does it work with mplayer ?

I use linux-3.1.4 on my slackware and I have no problem playing 720p video files with mplayer. (I recompiled mplayer from 2011-11-28 snapshot with my own slackbuild). If you tried my own slackbuild, note that the source archive is on my own computer behind a very slow connection.
Thomas Bourdon
User avatar
gapan
Salix Wizard
Posts: 6403
Joined: 6. Jun 2009, 17:40

Re: High CPU usage with kernels 3.x

Post by gapan »

It's not a player problem. This happens with any player, mplayer2 is something I used as an example to have a constant point of reference.

In your case, 720p video might work with kernel 3.1.4, but does it consume the same CPU as with older kernels? It might still use more CPU, but you might not see any glitches, because your hardware can still cope with it.
Image
Image
thom1
Posts: 28
Joined: 16. May 2011, 09:40

Re: High CPU usage with kernels 3.x

Post by thom1 »

gapan wrote:It's not a player problem. This happens with any player, mplayer2 is something I used as an example to have a constant point of reference.
Ok, I thought the problem can come from the player.
gapan wrote: In your case, 720p video might work with kernel 3.1.4, but does it consume the same CPU as with older kernels? It might still use more CPU, but you might not see any glitches, because your hardware can still cope with it.
I never install official kernel on my slackware, I just can say a 720p video uses about 15% of my cpu (Pentium(R) Dual-Core CPU E6300 @ 2.80GHz) on 3.1.4.
I hope it can help you :)
Thomas Bourdon
djemos
Salix Warrior
Posts: 1475
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: High CPU usage with kernels 3.x

Post by djemos »

I have compiled the linux-kernel-3.1.4, (using the huge config file) in a dual core HPG62 64bit laptop with 2GB memory, intel video driver i915
I did not notice any big difference in cpu usage. CPU usage is from 20 to 35% in both 2.6.37.6 and 3.1.4 kernel.
Here is the kernel, kernel modules and config files
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: High CPU usage with kernels 3.x

Post by thenktor »

I did not notice any difference in playing HD videos on my 3.1.x kernel, but I certainly can check this again.
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
User avatar
gapan
Salix Wizard
Posts: 6403
Joined: 6. Jun 2009, 17:40

Re: High CPU usage with kernels 3.x

Post by gapan »

I tried the latest 3.2-rc6 and whatever it was that was causing this is gone. CPU usage is back to normal. A glitch specific to my video card that is now fixed I guess.
Image
Image
Post Reply