1

On my CentOS 6.3 Server, after an OS restart, I see a strange behavior from the top command. In the default view of top (which is obviously sorted by CPU%) I see the following:

Screen shot of my top output

1) Many processes are at 100% (or even much much higher) CPU usage despite the fact that the load average is still very low (Please see the screen shot) and the server is almost doing nothing.

2) Although processes should be sorted by CPU%, they seem to be in a semi-random order: Very low usage processes are still at the bottom but the higher percents are at the top with no specific order! (Please see the screen shot)

I have also double checked and made sure that the sorting is based on CPU% (F > k)

This wasn't the case before the server restart, and I am almost sure I haven't installed any special packages.

Any idea what is going wrong here?

More observations

More examination gives me the feeling that in my case, top is showing a more detailed info of resource usage by processes than before. I see processes that I know use CPU resources for a very very very short time and they normally never showed up in top before (for example, Nginx). But now, I see them constantly showing up on the top of the list. Still have no idea what the problem is...

  • The sorting issue might be because it still sorts by dividing the number of CPUs but I'm not sure. You can confirm by pressing 'H' or 'I' – jdwolf Jan 3 '18 at 6:12
  • About 'H': it switches top to Thread mode which is not my case (I use non-thread mode). And about 'I', it switches off the Solaris mode which is also not my case. The default top setting is with Solaris mode on and is the same as what I have in my other servers (with same spec) which don't have this issue. – mor Jan 3 '18 at 8:13
2

This output could be perfectly normal based on your question. Percentages are 100% for each core/thread. Which reflects that the process has many threads if it has such a large percentage.

For example if you have 32 cores and a task used half of your CPU time across all cores this would report as 1600%.

Load average is a very different metric. CPU usage is not utilization. Meaning if you're only using 2% load average but of that time one process was utilizing half of the load then it would be 50% not 1%.

  • Yes. I am aware that even a single process can cause 1600% CPU usage and in your example probably a load average of about 16. The problem is that I see these strange high cpu usages all the time since that restart. The low load average is reasonable since I know that at that time there was no load on the server hence, no high CPU usage was expected. – mor Jan 3 '18 at 10:39

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.