login
Header Space

 
 

%cpu in top over 100?

July 18, 2008 - 1:25am
Submitted by Anonymous on July 18, 2008 - 1:25am.
Linux

Hi, I am running a network server and a very large sql database and have noticed some wierd stats in top. I am new to the top output so this may be really simple... I see in some instances where the total %cpu time goes over 100 between updates. Is this normal, more so how do I interpret this?

I understand that the %cpu is amount each process used since last update, so I interpret that part that while in the below example, the cpu was used approx 30% and idle 70% and of the 30% the %cpu shows which processed used the most of the 30. Is this correct?

(sorry pretty new to analyzing these details and the top man page is great but googling doesnt show much on the interpretation)

A side topic - I can't find info on the Cpu wa percent in summary, what is the wa, hi and si?

Thanks...

Below is capture:

top - 16:53:48 up 15:24, 1 user, load average: 4.38, 6.25, 5.31
Tasks: 91 total, 3 running, 88 sleeping, 0 stopped, 0 zombie
Cpu(s): 27.7% us, 2.2% sy, 0.0% ni, 69.8% id, 0.3% wa, 0.0% hi, 0.0% si
Mem: 3958472k total, 3594936k used, 363536k free, 233992k buffers
Swap: 4096532k total, 896k used, 4095636k free, 2779812k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
16158 postgres 16 0 173m 58m 170m R 98.8 1.5 0:03.40 postmaster
2998 root 15 0 3910m 16m 5560 S 16.3 0.4 107:52.97 iqs
3394 postgres 16 0 172m 145m 170m S 1.3 3.8 0:31.59 postmaster
3399 postgres 16 0 173m 164m 170m R 0.7 4.3 6:43.82 postmaster
3105 root 16 0 6472 3856 3052 S 0.3 0.1 0:05.75 hald

sol

July 18, 2008 - 7:07am
Anonymous (not verified)

wa I/O wait (e.g. disk), hi hard interrupt, si soft interrupts.

>Cpu(s): 27.7% us, 2.2% sy, 0.0% ni, 69.8% id, 0.3% wa, 0.0% hi, 0.0% si

27.7 + 2.2 + 69.8 + 0.3 = 100.0 (allow ± 0.1 for rounding errors)

98.8 + 0.4 + 1.3 + 0.7 + 0.3 = 101.5. Do you happen to have a multi-core/HT system? If so, 100 for each CPU.

In fact, multithreaded programs will even go way up, this is from a big SGI computing box:

407 abcdefy1 39 19 2724m 2.4g 7216 R 3734 0.2 12281:38 m109
1114 kjhgfdt 39 19 10.6g 4.9g 3568 R 2918 0.3 26900:41 mps4_sgi
9197 kjhgfdt 39 19 9621m 4.6g 3552 R 2681 0.3 23133:19 mg2r_sgi

Yes, that are roughly 93 cores running full power.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary