Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When we run top we occasionally see a sleeping, "S", process which is using %CPU; I would expect all sleeping processes to use 0% CPU since they are not active. I would expect only running, "R", processes to be actively consuming %CPU in top. For example, see these sleeping Oracle processes

> PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                               
> 11975 oracle    15   0 16.8g 2.6g 2.6g S  8.9  5.5  56:28.38 oracle                       
> 5837 oracle    15   0 16.8g 1.8g 1.7g S  6.6  3.7  10:04.11 oracle                       
> 12248 oracle    15   0 16.8g 1.6g 1.6g S  5.9  3.4  12:02.33 oracle                       
> 21253 oracle    15   0 16.8g 1.6g 1.6g S  4.3  3.4  12:33.83 oracle  

My thinking is that the CPU activity, in this case for Oracle, consists of many short bursts below the 1s time granularity for Top. Which means it the usage counter gets updated but Top does not see the "R" state since it is too short.

Any thoughts?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

That is almost certainly what is happening. In this case, for Oracle, the CPU usage consists of many short bursts below the 1s time granularity for Top. Which means it the usage counter gets updated but Top does not see the "R" state since it is too short.

share|improve this answer
    
Thanks! Can I edit your answer just to summarise the issue for future searches? –  Fred Clausen Apr 18 '13 at 10:56
    
Sure. Please do. –  David Schwartz Apr 18 '13 at 19:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.