I have been asked numerous times what does “load average” means in top. If you don’t know what top is and you have access to linux machine, go type top now and see what it shows.
load average: 2.05, 2.17, 1.93
Quick answer is: first number (2.05) is 1 minute avg, second number (2.17) is 5 minute avg, third number (1.93) is 15 min avg. Generally system admins look at these #’s to see how is their server is doing. But now you wonder, if this is the #’s you look at, why is there cpu %? Isn’t that computer load also? Ofcourse it is. BUT, meaning of cpu % shown in [ Cpu(s): 14.2% us, 1.7% sy, 0.0% ni, 80.7% id, 3.1% wa, 0.0% hi, 0.3% si, 0.0% st ] actually just means how much % of time was spent doing stuff on cpu. On the other hand, load average takes other things such as how much cpu’s were being used and how many process had to wait for their turn to use cpu, etc. Thats why sometimes you will see high % for Cpu usage but low # for load average because things didn’t get queued much and cpu just spiked a bit at the time you looked at it. You can also have slow responding server with high cpu % and low load average.
So what is ok and what is not ok # to see in load average? This is actually simpler to answer than explaining what is what. For each cpu you add, you add 1 to your high #. For example, if you dual cpu, its ok to see load upto 2. Which basically says both of the cpus were doing 100% of work and its ok. If that # is above 2, lets say 4, that means your system is working twice as hard as it should. So lets say you have dual cpu with hyperthreading, what is the optimial number to see in load average? If you said 4, you are correct!
So now you know! Here are couple other commands which will show you load averages:
18:58:26 up 438 days, 13:32, 1 user, load average: 1.83, 2.26, 2.24
18:58:44 up 438 days, 13:33, 1 user, load average: 1.59, 2.18, 2.21
DISCLAIMER: As always, if you find any inaccurate information, please comment and let me know. When you do comment, make sure you give me some references to confirm.