3

It's a dual-core machine and the load is around 24 but CPU usage is bouncing around from 60-80% and never reaching 100% so how can there be that many processes waiting? I/O is pretty much nill since everything is being read from memory databases and the network is only using around 7mbit from a gigabit connection. Would adding additional cores reduce the load or is the CPU not the issue since it's not even topping out?

3
  • I too would like an answer to this question. I have a 4-core virtual server currently showing a 60+ load, but using top I see that the first core is hovering around 25%, and all the others around 3 or 4%!
    – Brent
    Nov 23, 2009 at 22:29
  • 1
    In addition to the answer(s) below, you'll find some good information in the Related links at the right of this page. Nov 23, 2009 at 23:59
  • would you put the top command so I can check
    – user4234
    Jan 9, 2013 at 7:00

3 Answers 3

3

No.

Try running nothing but Seti @ Home (or whatever its current incarnation is), and you'll see your server load pegged at 1.0, although your CPU would be pegged at 100% usage.

From the UPTIME(1) man page:

System load averages is the average number of processes that are either in a runnable or uninterruptable state. A process in a runnable state is either using the CPU or waiting to use the CPU. A process in uninterruptable state is waiting for some I/O access, eg waiting for disk. The averages are taken over the three time intervals. Load averages are not normalized for the number of CPUs in a system, so a load average of 1 means a single CPU system is loaded all the time while on a 4 CPU system it means it was idle 75% of the time.

For example, we have a server that does nothing but run Spamassassin with two Xeon CPUs (for a total of 4 virtual CPUs) It sometimes reaches 100% CPU utilization, but more often it uses a lot of disk IO by reading and writing to the Bayes database. As such, the system load is often very high at around 20-40 because there are many processes that are waiting a little while for the disk.

1

Load average is the number of processes in runnable state: press "i" in top to limit it to these. This includes processes which are (R) running and (D) waiting for disk. Is it really not doing any IO? Has it not gone into swap?

0

Are a non-trivial number of these processes heavy memory users? Because you may be seeing the effects of heavy cache misses.

Memory is slow, so the CPU has a (or more often several levels of) cache. Now if process A is on the CPU and has loaded most of the cache with it's own memory, then process B comes along and wants to fill the cache with its memory there are a series of waits while that happen causing reduced CPU. Then, sooner or later Process A comes along and you get to go through it all again...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .