2

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?

4

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.

  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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