Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm observing a high load average on a certain machine (about 9) in all three load fields. I understand load as the number of processes in state "run" / currently desiring CPU time. Am I correct at reasoning that if N processes are running on my machine this cannot produce a load greater than N?

Also, does the load count in respect to processes or threads? In other words, can a multithreaded process produce a load greater than 1?

share|improve this question
    
Note that (because they're usually expected to be scheduled very soon), tasks in the "uninterruptible" state are also counted as running. Just a detail, not something that changes your question. –  mattdm Mar 17 '11 at 14:43

3 Answers 3

up vote 3 down vote accepted

Load average is usually described as "average length of run queue". So few CPU-consuming processes or threads can raise LA above 1. There is no problem if LA is less than total number of CPU cores. But if it gets higher than number of CPUs, this means some threads/processes will stay in queue, ready to run, but waiting for free CPU.

share|improve this answer

The 3 load averages are something like a logarithmic function revolving around the number 1. Something similar to f(x) = eX (e to the X exponent). Technically a fixed-point representation of a exponential decay function simulating a average. They are additive, per CPU, so a full load might look like 4.00 on a quad-core system. The first number is the average over the last minute, the second is the average over the last five minutes, and the third is the average over the last 15 minutes. I thought an answer should be dropped here that mentions that.

share|improve this answer

The numbers that are used to calculate load average are tasks in the run or uninterruptable state and the amount of work done in the time slice of the moving average. These tasks can be part of a multithreaded process. The fields are fuzzy the farther back in time due to smoothing results from the algorithm used.

A load of 1 is equal to 100% of one CPUs worth of work. If you had a multithreaded application that managed to have a number of active threads in excess of the number of available CPUs, then you could have a single process drive the load above 1. This would likely be a short term spike and not reflected in the longer time slice views of the load average.

Also, since the load average was developed before there were multi-core systems, its important to divide the load numbers by the total available number of cores. If this is a sustained load of 9 on a 4 socket quad core system, then this is a 9 of 16 load and not really a problem.

share|improve this answer
1  
— I've yet to see a system where multiple cores on a socket are exposed up to user-space in a way which makes them look like anything but more CPUs. So in top, on the 4-socket quad-core system, 16 CPUs are seen. (So one can readily see that the load of 9 is below the number of CPUs.) –  mattdm Mar 17 '11 at 18:48
    
I understand that the numbers are logarithmic, so they are just under or above 1. One system I have, I saw the system report this: load average: 10.41, 9.57, 9.26 . What?? Why would one linux system report load average: 0.81, 1.57, 0.98 whereas this system reports load average: 10.41, 9.57, 9.26 ? Are all unix's not the same on this? –  djangofan Jun 20 '11 at 21:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.