LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-02-2008, 07:55 AM   #1
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
top shows 150% cpu load


See subject - this happens on a core2 system when both cores are relatively busy.Bug or feature


top - 10:54:03 up 1:01, 1 user, load average: 1.54, 1.60, 1.62
Tasks: 128 total, 1 running, 127 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.1%us, 0.3%sy, 73.6%ni, 25.5%id, 0.2%wa, 0.1%hi, 0.1%si, 0.0%st
Mem: 2076716k total, 2023404k used, 53312k free, 25512k buffers
Swap: 514040k total, 144k used, 513896k free, 1696288k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4512 mama 25 10 152m 41m 13m S 148 2.0 68:27.18 avidemux
1 root 15 0 2084 712 608 S 0 0.0 0:00.94 init
2 root 10 -5 0 0 0 S 0 0.0 0:00.00 kthreadd
 
Old 02-02-2008, 08:57 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

How did you conclude that 1 cpu is running at 150% ?? All cpu's togehter run at +/- 150% (max would be 200% if 2 (virtual) cpu's are present.
With a single line (cpu stats) on a smp machine, the average load will be shown. Both cpu's run at an average of 73.6%.

Try the 1 option when running top, this should show you one line per (virtual) cpu. I.e.:
Quote:
top - 14:56:31 up 6 days, 15:37, 1 user, load average: 0.17, 0.16, 0.10
Tasks: 87 total, 1 running, 86 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3% us, 0.0% sy, 0.0% ni, 99.5% id, 0.0% wa, 0.0% hi, 0.3% si
Mem: 4117952k total, 3499428k used, 618524k free, 114284k buffers
Swap: 4008208k total, 156k used, 4008052k free, 2399944k cached

Versus:

top - 14:56:47 up 6 days, 15:37, 1 user, load average: 0.12, 0.15, 0.10
Tasks: 90 total, 1 running, 89 sleeping, 0 stopped, 0 zombie
Cpu0 : 1.5% us, 0.1% sy, 0.0% ni, 98.0% id, 0.3% wa, 0.0% hi, 0.0% si
Cpu1 : 0.3% us, 0.0% sy, 0.0% ni, 99.6% id, 0.1% wa, 0.0% hi, 0.0% si
Cpu2 : 0.0% us, 0.0% sy, 0.0% ni, 99.9% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu3 : 0.0% us, 0.0% sy, 0.0% ni, 99.0% id, 0.0% wa, 0.0% hi, 1.0% si
Mem: 4117952k total, 3501820k used, 616132k free, 114396k buffers
Swap: 4008208k total, 156k used, 4008052k free, 2401428k cached
The above is an example of a machine with 2 dualcore cpu's (=4 virtual cpu's).

Hope this clears things up a bit.
 
Old 02-02-2008, 09:10 AM   #3
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Original Poster
Rep: Reputation: 47
That just what I was wondering about - why doesn't it split the threads up by default?

htop shows it correctly with avidemux using around 75% on each cpu.
 
Old 02-02-2008, 09:18 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

That's probably due to the way things were. Duall core/multiple cpu's on pc's is kinda new, top has been around for ages.

But you can change top's startup behaviour: Start top - play with the options (press ? to see them all) until you have the view you like - when done press W (capital w). If all went well a .toprc is created in your homedir and the next time you start top you are looking at your prevered view.

Hope this helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU load high, top processes very low? Thinking Linux - Software 12 03-19-2007 01:59 AM
running top shows 2 users gibson79 Slackware 8 03-08-2007 10:19 AM
gnome system monitor shows different resource usage than top BCarey Linux - Software 0 02-13-2007 11:14 PM
Firefox gets stuck... top shows 98-99% memory usage amitsharma_26 Linux - General 26 12-28-2005 04:01 PM
Wintv Go bt878, Mandrake 10, No signal, xawtv only shows snow on top, composite works vijeshmehta Linux - Hardware 4 03-22-2004 08:45 PM


All times are GMT -5. The time now is 09:47 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration