hallleron
hallleron

Reputation: 1992

Linux Webserver - htop shows extreme cpu usage?

I am a bit confused about what the tool "htop" shows as cpu usage and average load. I was asked to have a look at a webserver which is performing incredibly slow. I googled a bit and always found the statement that everyting above 1.00 in average load is terrible when you only have one cpu in the machine.

However, my "htop" experience looks like this: htop screenshot

Can someone please tell me what exactly is going on here? Is this bad or do I misunderstand everything?

Thank you for your help.

Upvotes: 0

Views: 1087

Answers (2)

Andriy Berestovskyy
Andriy Berestovskyy

Reputation: 8544

In your screenshot the CPU usage bars are colored in green and red. Press '?' in htop for a help screen to show up. From there you will see that green color is for a normal priority userspace applications CPU usage and the red color is for kernel threads.

Basically, in your screenshot all the CPU cores are 100% busy and most of the time they spend in the kernel.

Yes, this is bad. Further investigation is needed to tell what exactly is going on here.

Upvotes: 1

Erbilacx
Erbilacx

Reputation: 209

The htop screenshot is showing you each of the cores of the CPU and the usage for each. What you really want to be looking at are the processes and how much CPU they are consuming.

There's an article here which explains it in more detail: http://www.thegeekstuff.com/2011/09/linux-htop-examples

Goodluck!

Upvotes: 1

Related Questions