LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-04-2003, 03:48 AM   #1
miknight
Member
 
Registered: Oct 2002
Location: Sydney, Australia
Distribution: Gentoo, Ubuntu, Debian
Posts: 184

Rep: Reputation: 30
Question 'Uptime' system load averages


When I run 'uptime' I might get output looking like this:

8:46pm up 3:59, 1 user, load average: 1.20, 1.29, 1.29

I understand that the last 3 numbers are system load averages over the last 1, 5 and 15 minutes - but I don't understand what they are measured in or what is the maximum. How is it computed?

Thanks for any help!
 
Old 03-04-2003, 06:30 AM   #2
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Re: 'Uptime' system load averages

Quote:
Originally posted by miknight

I understand that the last 3 numbers are system load averages over the last 1, 5 and 15 minutes - but I don't understand what they are measured in or what is the maximum. How is it computed?
They are measure in percentage of CPU utilisation. Goes without saying that the max is 100. If you were compiling your kernel you would probably see 99.7 or thereabouts for one or more of those averages depending on how long it has been compiling before you ran 'uptime'. It is computed by looking at the process information as looked up from the /proc filesystem. You may also want to try 'sar' as in System Activity Report, whose data is gathered every 10 minutes or so and shows the load averages for the current day starting at 0000 hours/midnight.
 
Old 03-04-2003, 07:00 AM   #3
finegan
Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 57
regardless, straight 1s is pretty high... the server I use that gets the biggest loads hardly ever sees straight ones and even LQ here peaks out around 7s... what do you have running?

Cheers,

Finegan
 
Old 03-04-2003, 01:24 PM   #4
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 909

Rep: Reputation: 45
Re: Re: 'Uptime' system load averages

Quote:
Originally posted by nxny
They are measure in percentage of CPU utilisation. Goes without saying that the max is 100.
If you have a load value that's 100, your system is, essentially, hung!

If memory serves, the load value is the number of processes that are in the run queue (i.e., waiting for a chance to use the CPU) at any given time or the average number for those durations: 1, 5, 15 minutes. Oddly, those averaging intervals don't seem to be standard. I've seen some UNIX flavors that use 5, 30, and 60 seconds.
 
Old 03-04-2003, 01:42 PM   #5
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Re: Re: Re: 'Uptime' system load averages

Quote:
Originally posted by rnturn
If you have a load value that's 100, your system is, essentially, hung!
Nope. Cant say that for sure. I've seen load averages like 108% and the system's still running fine.

Quote from man 1 top

CPU states
Shows the percentage of CPU time in user mode, system mode, niced
tasks, and idle. (Niced tasks are only those whose nice value is
negative.) Time spent in niced tasks will also be counted in sys-
tem and user time, so the total will be more than 100%. The pro-
cesses and states display may be toggled by the t interactive com-
mand.

This can happen to the uptime output too.
 
Old 03-04-2003, 01:53 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,964
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Quote:
Originally posted by finegan
what do you have running?

Cheers,

Finegan
Or, what kind of CPU are we looking at? ;)

Cheers
Tink
 
Old 03-04-2003, 04:32 PM   #7
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 909

Rep: Reputation: 45
Re: Re: Re: Re: 'Uptime' system load averages

Hate to be picky, but...
Quote:
Originally posted by nxny
Nope. Cant say that for sure. I've seen load averages like 108% and the system's still running fine.
That's CPU utilization, not load. And a side effect of the way top chooses to deal with niced processes.

Quote:

Quote from man 1 top

CPU states
Shows the percentage of CPU time in user mode, system mode, niced
tasks, and idle. (Niced tasks are only those whose nice value is
negative.) Time spent in niced tasks will also be counted in sys-
tem and user time, so the total will be more than 100%. The pro-
cesses and states display may be toggled by the t interactive com-
mand.
The section on uptime (just above `CPU states') would have more appropriate.

A system that is running at 100% CPU utilization does not have a load of 100. On a personal system, firing up a compute bound process will peg the CPU utilization at 100% (ignoring the way ``nice''ed processes are being handled) but the load will still be hovering around 1. Fire up another and the load will increase but the CPU will still be 100%. It's easier to see this when you're doing this at a couple of console sessions (boot to level 3, for example) and note that top itself uses a fair amount of CPU when it's running. Instead, just run uptime around every 10 seconds and see (you'll have to recall the command for several minutes or do ``while [ 1 ]; do uptime; sleep 10; done''). Then run ``vmstat 10 1000'' and the CPU utilization will be `us, sy, id' = `100 0 0' or `99 1 0'.

Not sure where folks have gotten the idea that `load' was `CPU utilization' but that's not correct.
 
Old 03-04-2003, 05:10 PM   #8
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
So , contrary to popular belief, load average and cpu utilization are entirely different.

Thanks for pointing that out, rnturn.
 
Old 03-04-2003, 06:07 PM   #9
miknight
Member
 
Registered: Oct 2002
Location: Sydney, Australia
Distribution: Gentoo, Ubuntu, Debian
Posts: 184

Original Poster
Rep: Reputation: 30
Exclamation

Hmm very interesting... The numbers I posted were from my own machine which is continuously running a distributed.net client, so the CPU utilization should have been at 100% - that's why I was confused that the numbers weren't hovering around 100...
 
Old 03-04-2003, 06:18 PM   #10
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 909

Rep: Reputation: 45
Quote:
Originally posted by nxny
So , contrary to popular belief, load average and cpu utilization are entirely different.
Well, I'd suggest a Google search for `UNIX load average' if you want to know what load is. Just a few of the informative ones that came back were:

http://www.itworld.com/nl/unix_sys_a.../pf_index.html
http://searchsystemsmanagement.techt...289204,00.html

and

http://web.gat.com/docview/load_average.html

Personally, I'd verify `Popular Belief'. But that's just me.
 
Old 03-04-2003, 07:03 PM   #11
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Quote:
Originally posted by rnturn
Not sure where folks have gotten the idea that `load' was `CPU utilization' but that's not correct.
indicates that a group of people have this misconception, which - to me - makes it eligible for being called 'popular belief'.

Quote:
Originally posted by rnturn
Personally, I'd verify `Popular Belief'. But that's just me.
I'd trusted your judgement on quote #1. Sounds like you trust your words less than I do!

Regarding your google search, the fact that it came back with a bunch of links seems to indicate that this indeed is a popular enough issue to have come up in forums/articles and to have subsequently been clarified.

You said you
Quote:
Originally posted by rnturn
Hate to be picky, but...
Would you stop *PUSHING* it?

Last edited by nxny; 03-04-2003 at 10:11 PM.
 
Old 03-04-2003, 10:15 PM   #12
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 909

Rep: Reputation: 45
Quote:
Originally posted by nxny
indicates that a group of people have this misconception, which - to me - makes it eligible for being called 'popular belief'.
OK, I'll buy that. Though, IMHO, I'd prefer to think of it as a `popular misunderstanding' due to the term being fairly unclearly defined in the man page. Pity that, in cases like that, man pages cannot be a bit more complete than the memory joggers they were meant to be. :-)

Quote:
Sounds like you trust your words less that I do!
Not at all. When I did a quick check of the man page for uptime on the (non-Linux) system on which I was working and saw that the averaging periods were different, I thought I'd check to see if there were any other differences between the way Linux was defining load and other UNIXes. (Solaris seems to use the same periods as Linux in case it ever comes up.) Other than the averaging periods being vendor-specific, it looks like they define the term the same way.
 
Old 01-30-2008, 09:07 AM   #13
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Rep: Reputation: 31
So to bring this topic back up from the dead.

When I run 'uptime' on my linux machine, I get:

06:48:16 up 322 days, 13:55, 1 user, load average: 0.16, 0.22, 0.18

For load average, if I get things like 3.76, 3.85, 3.00 this is talking about cpu utilization. So I'm averaging, 3 percent of the cpu over the course of these checks?

And is there a point that I should be alarmed for this average? I've seen so many things, like under 3 is good. Or as long as your not pegged at 100 is fine.

Can someone provide a dumbed down quick and easy what this stuff means and whats good or bad?

And if this is only doing cpu utilization, what is the best way to check out the actual server load?

Many thanks for any insight.
 
Old 01-30-2008, 02:11 PM   #14
miknight
Member
 
Registered: Oct 2002
Location: Sydney, Australia
Distribution: Gentoo, Ubuntu, Debian
Posts: 184

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by neocontrol View Post
For load average, if I get things like 3.76, 3.85, 3.00 this is talking about cpu utilization. So I'm averaging, 3 percent of the cpu over the course of these checks?
No, it's not a percentage. It's a measurement of how many processes are waiting on the queue for the CPU to deal with at any given time. If you want a percentage you should use the `top' command.

Quote:
Originally Posted by neocontrol View Post
And is there a point that I should be alarmed for this average? I've seen so many things, like under 3 is good. Or as long as your not pegged at 100 is fine.

Can someone provide a dumbed down quick and easy what this stuff means and whats good or bad?
There's no easy answer as it depends on what kind of things are running on your machine and what kind of machine you have. Some web servers may have very high load averages (in the 10s or 20s) yet still be responsive, so it's not a problem. Other machines that are doing other jobs might be brought to their knees when the load average hits 4 or 5.

Quote:
Originally Posted by neocontrol View Post
And if this is only doing cpu utilization, what is the best way to check out the actual server load?
`'top' will show you actual CPU utilisation and memory stats, which will give the best overall indication of server load.
 
Old 01-30-2008, 02:28 PM   #15
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,093

Rep: Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978
Then again, poorly configured disk can cause a slowdown on your server, and the load averages will go up. All with no CPU usage. Explain that to the pissed off users ...

The load averages also include disabled sleep (usually waiting for disk) as well as the runqueue.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU Load averages and higher pings Amfohr Linux - General 2 06-09-2005 03:09 AM
uptime load averages Longinus Linux - Newbie 10 01-27-2005 11:24 PM
Sendmail complaining about load averages nemesisza Linux - Software 1 09-17-2004 07:32 PM
uptime command for load averages CypherSurfer Debian 2 07-14-2004 10:14 PM
BitTorrent seeding / load averages fr0zen Linux - Software 0 01-24-2004 04:36 PM


All times are GMT -5. The time now is 04:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration