PDA

View Full Version : CPU usage spikes to 100%



Gaurav Prabhu
18th January 2010, 02:20 PM
My system config is in my signature. I tried playing 720p videos using Mplayer, Totem Player, VLC Player & KPlayer. Except for KPlayer all players show a noticeable lag while playing. Also whenever I play the videos the CPU usage remains glued at 100%.

How can I keep the CPU usage down? Whenever I run any application the system freezes for a while as the CPU usage spikes to 100%.

green-cat-fed
18th January 2010, 03:29 PM
which video card chip do you have..if nvidia, use vdpau, try searching vdpau with nvidia..i am not specialist but this will help..vdpau takes the cpu usage down to 10-15% while playing HD video files..this is just a hint..

Gaurav Prabhu
19th January 2010, 05:01 PM
which video card chip do you have..if nvidia, use vdpau, try searching vdpau with nvidia..i am not specialist but this will help..vdpau takes the cpu usage down to 10-15% while playing HD video files..this is just a hint..

But vdpau won't work with my Nvidia GPU since it is a '7' series GPU.
Check here (http://en.wikipedia.org/wiki/VDPAU).

droidhacker
20th January 2010, 05:09 PM
The problem is that you are decoding an HD video using a very weak CPU and possibly also suffering due to efficiency limitations on your software decoder.

A faster and multi-core CPU, and using ffmpeg-mt, or CoreAVC ($15 windoze program through wine with mplayer patches to work with it) works even better. Note that CoreAVC is a little more intelligent about running out of CPU juice than ffmpeg -- it'll sanely drop frames rather than falling behind by insisting on decoding and displaying *everything*.

You can read more about these things on the mplayer official site.

Failing that, the next thing I would suggest is a video card upgrade, HOWEVER, right now might not be the best time for this.... My reasoning about this is simple;
The AMD RADEON open source drivers are coming along VERY well, but until they are mostly done bugfixing and have moved over to Gallium3D, they won't be implementing any video decode acceleration. Nvidia supports video decode acceleration (via vdpau), but only through their BINARY driver, which is much more restrictive than being able to just use the OSS RADEON drivers. In other words, right now, nvidia is better for video decode, but in the fairly near future, AMD will be better for *everything*, though right now are USELESS for video decode acceleration.

Laserman
20th January 2010, 08:27 PM
I have a similar system except that my P4 is 3.2 GHZ and I have 1 GB of ram.
I can run 720p files but cpu usage is about 85-90% most of the time and fast action sequences overload the system. I realize that I will have to upgrade the system sooner or later, no one is going to put a lot of effort into compatability issues with old hardware.

ajamison
21st January 2010, 01:35 AM
My system config is in my signature. I tried playing 720p videos using Mplayer, Totem Player, VLC Player & KPlayer. Except for KPlayer all players show a noticeable lag while playing. Also whenever I play the videos the CPU usage remains glued at 100%.

How can I keep the CPU usage down? Whenever I run any application the system freezes for a while as the CPU usage spikes to 100%.
I had a P4 with almost exactly those specs and the original reason i switched to Linux in fact was that windows maxed out my CPU. I am afraid Pentiums are just slow you could try to reduce the amount of background taks but i found even with my CPU running at 100% it ran far better in Fedora then WIndows ever did.

I have since built a new machine with a quad-core cpu and have not had this issue since

Gaurav Prabhu
23rd January 2010, 06:10 PM
Well, so I see no other option but to get a new machine. I do want to get a new system but currently stuck with money issue. I'll be going for an Nvidia video card only in my new system. I know the poor state of Ati in Linux. Thanks for reconfirming with your experiences about Pentium 4. Its now showing its age & its time I hang it up.

ajamison
23rd January 2010, 06:24 PM
Well, so I see no other option but to get a new machine. I do want to get a new system but currently stuck with money issue. I'll be going for an Nvidia video card only in my new system. I know the poor state of Ati in Linux. Thanks for reconfirming with your experiences about Pentium 4. Its now showing its age & its time I hang it up.

You could of course cut down on the fancy effects such as compiz if enabled or just deal with the spike till you can afford to upgrade. The issue here is really more about technology getting to the point where even older hardware struggles. You could alternatively try a distro devoted to older hardware if you wanted as well.

I dealt with the P4 issue though for a long time since FC4 in fact but back then it was not as present. try to get as much ram in that machine as you can and then just ride it out till you can afford a new machine. For what it is worth a decent machine you built yourself can be as little as $650 to build. Still alot of money but something easily saved over a 3-6 month period if your serious about getting a new machine.

Also noticed you have 512mb of ram that is part of the issue if you can get to at least 2gb you would see alot less slow downs

Gaurav Prabhu
24th January 2010, 08:22 AM
I agree ajamison, additional RAM would definitely help but being DDR RAM it is priced very steep due to low availability. I'm getting a 512MB module for Rs.1350 which is too costly compared to DDR2 in which one can get a 1GB module for roughly the same amount. I think I'll trudge along for time being.

ajamison
24th January 2010, 08:33 PM
I agree ajamison, additional RAM would definitely help but being DDR RAM it is priced very steep due to low availability. I'm getting a 512MB module for Rs.1350 which is too costly compared to DDR2 in which one can get a 1GB module for roughly the same amount. I think I'll trudge along for time being.

Your signature says you have DDR2 so I assumed that was corret yes DDR is horribly hard to find

Gaurav Prabhu
27th January 2010, 06:05 PM
The DDR2 is for the Graphic Card if you notice correctly. I'm badly stuck now. I started the PC today & the monitor blanked out asking me to set the resolution to 1980*1080 @ 60HZ. :( Even the DVD Drive is not booting up so that I can install or repair anything. :(

mndar
1st February 2010, 08:29 PM
Gaurav,
What options are you passing to mplayer?
If you are using the close source nvidia drivers, try the xv,gl or gl2 output drivers with mplayer.
Further, mplayer can be optimized a great deal
For starters, try this
mplayer -vo xv -lavdopts fast=1:skiploopfilter=all -sws 0 <video-file>

Gaurav Prabhu
17th February 2010, 06:59 AM
I got a new quad core rig guys. So I don't think I'll need help now.
Thanks.