Ubuntu – Really high load readings while the server seems idle

apache-2.2phusion-passengerruby-on-railsUbuntu

I was wondering if any of you encountered such an issue, that the reported load of the server is really high though none of the parameters seems to indicate that its busy at all. I would need to check this again, but I think this only happens after I start passenger. I am on a dedicated virtual host.

Any tips of why is this happening or ideas how to debug this load value? Here is my top reading, I can provide other information if needed.

top - 13:34:38 up 122 days, 19:15,  1 user,  load average: 2.44, 2.02, 1.85
Tasks:  51 total,   4 running,  47 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.7%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1048576k total,   797196k used,   251380k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

Best Answer

When you see high load but low CPU usage it indicates that something else is the bottleneck. (As Janne said, a load average of 2 isn't particularly high but it's not a bad idea to understand what your system is doing in great depth.)

Disk access is the most common reason for high load averages with low CPU usage. You can see some stats about disk usage with vmstat, iostat or dstat depending on what you have installed.

For comparison, one of my fairly busy web servers is showing the bi column (block read in) in vmstat at 100 per 30 seconds and the bo column (blocks written out) as 3000 per 30 seconds. The load average on that server is about 1.

Another possible reason is a large number of processes that are doing very little work. Most servers I see have between 100 and 200 processes. If your server has 500 or 1000, that can cause a high load average.

Again, for comparison we recently had a large number of emails in our mail queue that caused around 1,000 processes to be spawned to send the emails. That caused the load average to go up to about 70 and made the system difficult to use.