Ubuntu – Why is there high load on the cpu if both %cpu usage is low and %memory is low

central-processing-unitcloud computingoptimizationUbuntu

I have a Rackspace cloud server running Ubuntu with 2GB memory that is being used as an application server (the html & php files are loaded from this server and the mysql database is on another server in the same datacenter).

When the number of users of my webapp increase (10,000+/day), the load goes up to 1.00 and sometimes 2.00. This makes sense logically, but I cannot find where the bottleneck is coming from. Using the "top" command, I see that the CPU usage is near 1% almost all of the time, and it only uses about 500 MB of the 2 GB memory total (almost all for apache processes). I also have munin installed and it appears that these numbers are roughly accurate for the entire day (there are no major spikes in either statistic).

If it is not CPU or memory that is the problem, than what should I monitor and/or optimize to prepare for larger traffic? (I don't know what to improve since I don't know the cause of the load!)

Thanks!
Please let me know if you need any other info about my server setup.

Best Answer

"Load" comes from more than just cpu utilization. It's the number of processes that are waiting for resources.

The first thing you need to do is figure out if this is having any impact to your application you're serving. A load of less than the number of cpu's you have is normally considered good.

When you're seeing this what does top say about your iowait?
What does free -m show?

You may also want to have a look at iostat.