LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-22-2011, 04:05 PM   #1
jerunh
LQ Newbie
 
Registered: Mar 2011
Location: Atlanta, Ga
Posts: 7

Rep: Reputation: 0
Question Top - 0% idle


When I run ‘top –d 0.5’ on my machine and I press ‘1’ to enable the SMP View, I notice that all of the CPU’s keep toggling between 100%idle and 0% idle.
The odd part is that when a CPU goes to 0.0% idle, I would expect to see one or more of the other columns peek, but they are not.

Any idea what is causing this?

Code:
top - 06:35:38 up 14 days, 19:26,  4 users,  load average: 0.05, 0.13, 0.10
Tasks: 237 total,   1 running, 234 sleeping,   2 stopped,   0 zombie
Cpu0  :  0.6%us,  0.2%sy,  0.0%ni, 99.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  :  0.0%us,  0.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu4  :  0.5%us,  0.0%sy,  0.0%ni, 99.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu5  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu6  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu7  :  0.0%us,  0.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4044220k total,  3581688k used,   462532k free,    89064k buffers
Swap:  8402768k total,      164k used,  8402604k free,  3110136k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                       
12362 root      20   0  143m  32m  14m S    0  0.8   2:24.63 X                                                                              
12407 gdm       20   0  227m  17m  11m S    0  0.4   1:15.01 gdm-simple-gree                                                                
20234 oakesjc   20   0  8900 1304  868 R    0  0.0   0:00.79 top
 
Old 03-22-2011, 06:57 PM   #2
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.3 and 18.2 at present.
Posts: 1,293

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Welcome to Linux Questions!

It's probably something to do with how the kernel "shares" your one running task over eight processors.
In the bad old days you used to time-slice access to the single processor to allow the multitude of tasks to run (Er... that'll be multi tasking) I'm not sure how it works in reverse though?

Play Bonny!
 
Old 03-23-2011, 09:23 AM   #3
jerunh
LQ Newbie
 
Registered: Mar 2011
Location: Atlanta, Ga
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Soadyheid View Post

It's probably something to do with how the kernel "shares" your one running task over eight processors.

If this were the case, shouldn't I be seeing some activity in the sy column for the same cpu?
 
Old 03-23-2011, 09:33 AM   #4
jerunh
LQ Newbie
 
Registered: Mar 2011
Location: Atlanta, Ga
Posts: 7

Original Poster
Rep: Reputation: 0
The CPU's on this machine a relatively new, Dual Intel Xeon E5530 @ 2.40 Ghz.

Here are some the specs from Intel:
Code:
Essentials:
Processor Number            E5530
# of Cores                  4
# of Threads                8
Clock Speed                 2.4 GHz
Max Turbo Frequency         2.66 GHz
Intel® Smart Cache          8 MB


Advanced Technologies:
Intel® Turbo Boost Technology           Yes
Intel® Hyper-Threading Technology       Yes    
Intel® Virtualization Technology (VT-x) Yes    
Intel® Trusted Execution Technology     No    
Intel® 64                               Yes    
Idle States                             Yes
Enhanced Intel SpeedStep® Technology    Yes    
Intel® Demand Based Switching           Yes    
Execute Disable Bit                     Yes
Will Any of these "Advanced Technologies" affect how top runs?
 
Old 03-23-2011, 09:58 AM   #5
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.3 and 18.2 at present.
Posts: 1,293

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Quote:
Will Any of these "Advanced Technologies" affect how top runs?
I've absolutely no idea. Is this causing you some sort of problem or are you just curious? Maybe you have to set the top refresh rate to a very small increment to show what you expect...

Play Bonny!
 
Old 03-23-2011, 11:41 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,940

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
top (re-)reads /proc "files" a lot. This causes skewing in the numbers it generates. The faster is does this, the worse the effect - why are you using fraction(s) of a second ?.
 
Old 03-23-2011, 04:14 PM   #7
jerunh
LQ Newbie
 
Registered: Mar 2011
Location: Atlanta, Ga
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
top (re-)reads /proc "files" a lot. This causes skewing in the numbers it generates. The faster is does this, the worse the effect
While this statement makes sense, I cant see this being the root cause of what I am seeing. I have run on plenty of machines that work perfectly fine with refresh rates of 0.5 seconds. And this is a pretty new machine with pretty beefy processors. As a matter of fact, on this particular system, the problem doesn't go away until my refresh rate is set to 2.0 seconds. It is just unbearable to watch at this pace.


Quote:
Originally Posted by syg00 View Post
why are you using fraction(s) of a second ?.
Only because I wanted a closer to real-time picture of what is going on in my system. I want to watch my applications run and see how they react while processing different pieces of data (in terms of CPU and memory usage).
 
Old 03-26-2011, 01:46 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,940

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Are you running natively, or as a guest ?.
I run a i7 (4 core, hiperthreaded), so it also looks as 8 processors. I see similar at -d 0.5 - but the all zero line only appears on one cpu.

Looking at /proc/stat for the cpu data, it appears to be valid (for all cpus) even for small iterations. Guess that might mean "top" can't keep up, and just tosses the data out when it gets the next timer pop. All guesswork, but matches the evidence.

For "good" detail data, have a look at collectl in daemon mode.
 
1 members found this post helpful.
Old 03-26-2011, 11:01 AM   #9
jerunh
LQ Newbie
 
Registered: Mar 2011
Location: Atlanta, Ga
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Soadyheid View Post
I've absolutely no idea. Is this causing you some sort of problem or are you just curious? Maybe you have to set the top refresh rate to a very small increment to show what you expect...

Play Bonny!
This is mostly just curiosity on my end. I want to understand what my machine is doing.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel panic attempted to kill the idle task! in idle task - not syncing dudutworld Linux - Newbie 2 09-16-2013 02:50 PM
High Load Averages on my Forum- whostmgr2 - top ./top ohlookaforum Linux - Server 6 08-09-2010 06:26 PM
LXer: Firebird download statistics : Top Country : Brazil , Top OS: Linux LXer Syndicated Linux News 0 05-31-2010 08:00 AM
LXer: Can You Top This? 15 Practical Linux Top Command Examples LXer Syndicated Linux News 0 01-09-2010 10:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:15 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration