What is this “load average” I keep hearing about?

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:

w
18:58:26 up 438 days, 13:32, 1 user, load average: 1.83, 2.26, 2.24

uptime
18:58:44 up 438 days, 13:33, 1 user, load average: 1.59, 2.18, 2.21

To learn about the commands used in this post, see man w, man uptime, man top

—————

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.

8 thoughts on “What is this “load average” I keep hearing about?

  1. Pingback: Apache/http monitoring: monitor http traffic in realtime using httptop | Technology: Learn and Share

  2. Pearse

    first of all you’re computer (what i think it suhlod have for running smoothly) is about 3-4 gig ddr3 or ddr4 ram probably anything in between a Pentium 4 to a DUO Quad core possessor a motherboard that can handle all of that and then some and a fast internet connection plus if you are a gamer a diamond radeon hd video card

  3. minecraft

    Nice post. I used to be checking continuously this weblog and I am inspired!
    Very helpful information specifically the closing phase
    🙂 I take care of such information a lot. I used to
    be seeking this particular info for a very lengthy time.
    Thanks and good luck.

Leave a Reply

Your email address will not be published. Required fields are marked *