Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Explain the "uptime" command?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Explain the "uptime" command?

NarutoNaruto Member
edited January 2012 in Help

Okay I know that the load shows the average load over 1 minute, 5 minutes, then 15 minutes.

What I don't understand is how does this work with multi-core processors?

The node I'm on has dual quad cores. I have access to 8 cores.

If my load over 15 minutes is 0.48, does that mean I am using 48% of all 8 cores, or 1?

If it's just 1, what would it look like if it were 48% of all 8 cores? Thanks. :)

Comments

  •   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
    

    The text was generously granted by "man uptime"

    Thanked by 1Naruto
  • You should have asked what load average means.

    It's how many processes are trying to run. With 8 cores you basically have to get to a load average of 8 before processes have to wait. The .48 means that on average only one core has a 48% load and all the others are zero. Now it's not spread around that way, but you get the idea. To me that means that the system is mostly idle.

    That's on a "real" system. I've got no idea how the different virtualizing systems come up load average numbers or how useful they are.

    Thanked by 1Naruto
  • 0.48 would mean you are using 48% of a single core (1.00 would mean 100% of a single core, and 8.00 would be 100% of 8 cores), 48% of all 8 cores would be 3.84

    Thanked by 1Naruto
  • 0.48/8=0.6 so does that mean I could say each of my 8 cores is using 6% CPU?

    But since 8.00 would be max...

    8.00/0.48=16.66666667 means I'm using about 17% of my total CPU allocation?

  • sleddogsleddog Member
    edited January 2012

    "load" doesn't easily translate in percentage usage of CPU. Load can be influenced by factors outside of the CPU itself -- with a prime factor being disk IO. Load is the number of jobs waiting in the queue for processing.

    Think of it this way....

    You're going to a baseball game. To get in, you have to line up and buy a ticket. When you arrive there are 5 people waiting in line. The load is 5. You join the line and the load increases to 6.

    Tickets are sold and new people arrive. Usually there's 4-6 people in the line at any time: the load is hovering around 4-6.

    But then the ticket seller runs out of tickets. He/she calls up to the head office and asks for more to be brought down. That process is an IO operation. While it's in progress the ticket seller is idle, waiting. The lineup gets longer, 8, 12, 15 people waiting. Load is up to 15. Tickets arrive and the seller works furiously. Soon the line, and the load, is back down to 5.

    At a quad-core ballpark there'd be four ticket booths. We could look at the load at each booth independently, or average them out into one overall load figure for the ball park.

  • @sleddog - Honestly that's one of the best explanations I've heard of and I've been doing this a while.

  • KuJoeKuJoe Member, Host Rep
    edited January 2012

    I <3 this site

    Complete with pictures. :)

    Thanked by 3yomero Naruto tux
  • I think I am just looking for confirmation here.

    The bad IO etc of the host node will cause my load average to go up too right?

    Like this that is happening at the moment on my ChicagoVPS VPS...

    top - 11:43:40 up 21 days,  5:34,  2 users,  load average: 19.61, 17.42, 11.31
    Tasks:  82 total,   1 running,  81 sleeping,   0 stopped,   0 zombie
    Cpu0  :  0.0%us,  0.0%sy,  0.0%ni, 25.0%id, 75.0%wa,  0.0%hi,  0.0%si,  0.0%st
    Cpu1  :  0.0%us,  0.0%sy,  0.0%ni, 25.0%id, 75.0%wa,  0.0%hi,  0.0%si,  0.0%st
    Cpu2  :  0.0%us,  0.2%sy,  0.0%ni, 24.9%id, 74.8%wa,  0.0%hi,  0.0%si,  0.0%st
    Cpu3  :  0.0%us,  0.2%sy,  0.0%ni, 25.0%id, 74.8%wa,  0.0%hi,  0.0%si,  0.0%st
    

    Because I don't think my server is doing it.

  • Yep. You're waiting on disk I/O, that's what the wa value means - 75% of what's currently trying to run is waiting for the disk.

  • Here is an article that explains the load averages pretty well: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages

  • ¬_¬

    Thanked by 2yomero Infinity
Sign In or Register to comment.