Linux load average

Discussion in 'NZ Computing' started by RT, Oct 29, 2004.

  1. RT

    RT Guest

    "Gordon" <> wrote in message
    news:p...
    > On Sat, 30 Oct 2004 18:19:47 +1300, thing wrote:
    >
    >> One really good use of top.....[snip]

    >
    > Use top, yes it is command line, but it does give you more than you need
    > to know.
    >
    > A must have when you need/want it.
    >


    Or you can use gtop or ktop and use your mouse
    RT, Oct 29, 2004
    #1
    1. Advertising

  2. G'day and welcome to another Linux n00b post by me.

    I'm checking the load on my machine
    load average: 2.24, 2.15, 1.88
    and I get that it is "now, last 5 mins, last 15 mins"

    0 seems to mean idle, 1 seems to be fairly busy, 2 or over is when Im
    compiling things so I assume it is ~100% CPU usage.
    but what is exactly 100%? or am I barking in the wrong direction?

    --
    Dave Hall
    http://www.dave.net.nz
    http://www.karyn.net.nz
    Dave - Dave.net.nz, Oct 30, 2004
    #2
    1. Advertising

  3. RT

    thing Guest

    Dave - Dave.net.nz wrote:
    > G'day and welcome to another Linux n00b post by me.
    >
    > I'm checking the load on my machine
    > load average: 2.24, 2.15, 1.88
    > and I get that it is "now, last 5 mins, last 15 mins"
    >
    > 0 seems to mean idle, 1 seems to be fairly busy, 2 or over is when Im
    > compiling things so I assume it is ~100% CPU usage.
    > but what is exactly 100%? or am I barking in the wrong direction?
    >


    Depends on the CPU and if top is configured correctly. Load is a munge
    of things, cpu, memory and disk i/o. Nominally 1 means your CPU is maxed
    out, if you have 4 cpus then a load of 4 would be maxed out.

    Its really more of a queue thing and not that much use for real
    statistics, but a quick useful tool for a snapshot.

    If your bored try this,

    iostat -x 5

    This will show your disk utilisation % every 5 seconds, (last column).
    Ignore the first output as that is the average since your last reboot.

    Once running login to another console/xterm do a find / -name <some
    file> switch back and watch iostat.

    vmstat can be used for a few things like cpu, but understanding what
    these tools are telling you is not easy.

    One really good use of top is to look for awol processes, typically if
    your machine is running badly, look at the first process in top, if its
    100% or 99.x% yet you would normally expect it to be 0.2% then this
    suggests the process has run away. Solution is look at its PID and kill
    -9 it, or -15 to be more gentle but it usually does not respond. Do be
    sure you get the correct PID and are sure its simply not process working
    hard for some automated reason.

    regards

    thing
    thing, Oct 30, 2004
    #3
  4. RT

    Chris Hope Guest

    Dave - Dave.net.nz wrote:

    > G'day and welcome to another Linux n00b post by me.
    >
    > I'm checking the load on my machine
    > load average: 2.24, 2.15, 1.88
    > and I get that it is "now, last 5 mins, last 15 mins"
    >
    > 0 seems to mean idle, 1 seems to be fairly busy, 2 or over is when Im
    > compiling things so I assume it is ~100% CPU usage.
    > but what is exactly 100%? or am I barking in the wrong direction?


    IIRC the load means the number of concurrent processes doing stuff at any
    one time. You could have a load of 1 and 100% CPU usage or a load of 1 and
    only 10% CPU usage depending just what that process is doing. Even with a
    load of about 6 or 7 your system should still be pretty responsive.

    I did a quick Google and found this page which seems to have some useful
    info there about it:

    http://www.teamquest.com/resources/gunther/ldavg1.shtml

    --
    Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/
    Chris Hope, Oct 30, 2004
    #4
  5. RT

    Gordon Guest

    On Sat, 30 Oct 2004 18:19:47 +1300, thing wrote:

    > One really good use of top.....[snip]


    Use top, yes it is command line, but it does give you more than you need
    to know.

    A must have when you need/want it.
    Gordon, Oct 30, 2004
    #5
  6. RT

    Peter Guest

    RT wrote:
    > Or you can use gtop or ktop and use your mouse


    ksysguard has replaced ktop (I think)


    Peter
    Peter, Oct 30, 2004
    #6
  7. In article <dwFgd.24061$>,
    thing <> wrote:

    >Load is a munge of things, cpu, memory and disk i/o.


    No it's not, it's just an averaged count of processes ready to use the
    CPU.

    >Nominally 1 means your CPU is maxed
    >out, if you have 4 cpus then a load of 4 would be maxed out.


    You would think so, but not true. For a single-CPU desktop system, a
    load average of up to about 3 is in fact tolerable.

    Depending on what they're doing, servers can go a bit higher. For
    instance, one client of mine is running an in-house Web-based
    application I wrote on a dedicated server, and they regularly push it to
    a load average of about 6-12, which is where they seem to get optimum
    throughput.

    It used to be worse--it could go over 20, until I found I'd forgotten to
    define a primary key for one MySQL table. :)
    Lawrence D'Oliveiro, Oct 30, 2004
    #7
  8. RT

    Steve Guest

    thing wrote:
    > Dave - Dave.net.nz wrote:
    >
    >> G'day and welcome to another Linux n00b post by me.
    >>
    >> I'm checking the load on my machine
    >> load average: 2.24, 2.15, 1.88
    >> and I get that it is "now, last 5 mins, last 15 mins"
    >>
    >> 0 seems to mean idle, 1 seems to be fairly busy, 2 or over is when Im
    >> compiling things so I assume it is ~100% CPU usage.
    >> but what is exactly 100%? or am I barking in the wrong direction?
    >>

    >
    > Depends on the CPU and if top is configured correctly. Load is a munge
    > of things, cpu, memory and disk i/o. Nominally 1 means your CPU is maxed
    > out, if you have 4 cpus then a load of 4 would be maxed out.
    >
    > Its really more of a queue thing and not that much use for real
    > statistics, but a quick useful tool for a snapshot.
    >
    > If your bored try this,
    >
    > iostat -x 5
    >
    > This will show your disk utilisation % every 5 seconds, (last column).
    > Ignore the first output as that is the average since your last reboot.
    >
    > Once running login to another console/xterm do a find / -name <some
    > file> switch back and watch iostat.
    >
    > vmstat can be used for a few things like cpu, but understanding what
    > these tools are telling you is not easy.
    >
    > One really good use of top is to look for awol processes, typically if
    > your machine is running badly, look at the first process in top, if its
    > 100% or 99.x% yet you would normally expect it to be 0.2% then this
    > suggests the process has run away. Solution is look at its PID and kill
    > -9 it, or -15 to be more gentle but it usually does not respond. Do be
    > sure you get the correct PID and are sure its simply not process working
    > hard for some automated reason.
    >
    > regards
    >
    > thing
    >

    you mean uptime, i take it? Not top. Uptime is part of the distribution,
    no matter which, top is third party software.

    Load recorded is the number of processes in the run queue, plus those
    waiting to run. 100% = 1 cpu running full time. 200% is 2 cpus in full
    use, or (allegedly) both threads of an HT P4 running full time. There is
    absolutely no 'munging' of io, memory or anything else in this figure.

    Killing processes... -1 = hangup. Try that first. Personally, I'd rather
    reboot than kill -9 processes as a matter of course. If processes are
    running wild, find out why, dont use the M$ solution.

    Steve
    Steve, Oct 30, 2004
    #8
  9. RT

    thing Guest

    Steve wrote:
    > thing wrote:
    >
    >> Dave - Dave.net.nz wrote:
    >>
    >>> G'day and welcome to another Linux n00b post by me.
    >>>
    >>> I'm checking the load on my machine
    >>> load average: 2.24, 2.15, 1.88
    >>> and I get that it is "now, last 5 mins, last 15 mins"
    >>>
    >>> 0 seems to mean idle, 1 seems to be fairly busy, 2 or over is when Im
    >>> compiling things so I assume it is ~100% CPU usage.
    >>> but what is exactly 100%? or am I barking in the wrong direction?
    >>>

    >>
    >> Depends on the CPU and if top is configured correctly. Load is a munge
    >> of things, cpu, memory and disk i/o. Nominally 1 means your CPU is
    >> maxed out, if you have 4 cpus then a load of 4 would be maxed out.
    >>
    >> Its really more of a queue thing and not that much use for real
    >> statistics, but a quick useful tool for a snapshot.
    >>
    >> If your bored try this,
    >>
    >> iostat -x 5
    >>
    >> This will show your disk utilisation % every 5 seconds, (last column).
    >> Ignore the first output as that is the average since your last reboot.
    >>
    >> Once running login to another console/xterm do a find / -name <some
    >> file> switch back and watch iostat.
    >>
    >> vmstat can be used for a few things like cpu, but understanding what
    >> these tools are telling you is not easy.
    >>
    >> One really good use of top is to look for awol processes, typically if
    >> your machine is running badly, look at the first process in top, if
    >> its 100% or 99.x% yet you would normally expect it to be 0.2% then
    >> this suggests the process has run away. Solution is look at its PID
    >> and kill -9 it, or -15 to be more gentle but it usually does not
    >> respond. Do be sure you get the correct PID and are sure its simply
    >> not process working hard for some automated reason.
    >>
    >> regards
    >>
    >> thing
    >>

    > you mean uptime, i take it? Not top. Uptime is part of the distribution,
    > no matter which, top is third party software.
    >
    > Load recorded is the number of processes in the run queue, plus those
    > waiting to run. 100% = 1 cpu running full time. 200% is 2 cpus in full
    > use, or (allegedly) both threads of an HT P4 running full time. There is
    > absolutely no 'munging' of io, memory or anything else in this figure.
    >
    > Killing processes... -1 = hangup. Try that first. Personally, I'd rather
    > reboot than kill -9 processes as a matter of course. If processes are
    > running wild, find out why, dont use the M$ solution.
    >
    > Steve


    I would have said that a reboot is the MS option.....from experience if
    a process has gone awol, -9 is often the only thing that works, Ive
    never needed a reboot from this.

    regards

    Thing
    thing, Oct 30, 2004
    #9
  10. RT

    Steve Guest

    thing wrote:
    > Steve wrote:
    >
    >> thing wrote:
    >>
    >>> Dave - Dave.net.nz wrote:
    >>>
    >>>> G'day and welcome to another Linux n00b post by me.
    >>>>
    >>>> I'm checking the load on my machine
    >>>> load average: 2.24, 2.15, 1.88
    >>>> and I get that it is "now, last 5 mins, last 15 mins"
    >>>>
    >>>> 0 seems to mean idle, 1 seems to be fairly busy, 2 or over is when
    >>>> Im compiling things so I assume it is ~100% CPU usage.
    >>>> but what is exactly 100%? or am I barking in the wrong direction?
    >>>>
    >>>
    >>> Depends on the CPU and if top is configured correctly. Load is a
    >>> munge of things, cpu, memory and disk i/o. Nominally 1 means your CPU
    >>> is maxed out, if you have 4 cpus then a load of 4 would be maxed out.
    >>>
    >>> Its really more of a queue thing and not that much use for real
    >>> statistics, but a quick useful tool for a snapshot.
    >>>
    >>> If your bored try this,
    >>>
    >>> iostat -x 5
    >>>
    >>> This will show your disk utilisation % every 5 seconds, (last
    >>> column). Ignore the first output as that is the average since your
    >>> last reboot.
    >>>
    >>> Once running login to another console/xterm do a find / -name <some
    >>> file> switch back and watch iostat.
    >>>
    >>> vmstat can be used for a few things like cpu, but understanding what
    >>> these tools are telling you is not easy.
    >>>
    >>> One really good use of top is to look for awol processes, typically
    >>> if your machine is running badly, look at the first process in top,
    >>> if its 100% or 99.x% yet you would normally expect it to be 0.2% then
    >>> this suggests the process has run away. Solution is look at its PID
    >>> and kill -9 it, or -15 to be more gentle but it usually does not
    >>> respond. Do be sure you get the correct PID and are sure its simply
    >>> not process working hard for some automated reason.
    >>>
    >>> regards
    >>>
    >>> thing
    >>>

    >> you mean uptime, i take it? Not top. Uptime is part of the
    >> distribution, no matter which, top is third party software.
    >>
    >> Load recorded is the number of processes in the run queue, plus those
    >> waiting to run. 100% = 1 cpu running full time. 200% is 2 cpus in full
    >> use, or (allegedly) both threads of an HT P4 running full time. There
    >> is absolutely no 'munging' of io, memory or anything else in this figure.
    >>
    >> Killing processes... -1 = hangup. Try that first. Personally, I'd
    >> rather reboot than kill -9 processes as a matter of course. If
    >> processes are running wild, find out why, dont use the M$ solution.
    >>
    >> Steve

    >
    >
    > I would have said that a reboot is the MS option.....from experience if
    > a process has gone awol, -9 is often the only thing that works, Ive
    > never needed a reboot from this.
    >
    > regards
    >
    > Thing
    >


    I said 'as a matter of course'. If you keep having to do it then there's
    something wrong. The *nix way is to find out what, not to ignore it.

    Steve
    ....and you kill zombies how?
    Steve, Oct 30, 2004
    #10
  11. RT

    thing Guest

    Steve wrote:
    > thing wrote:
    >
    >> Steve wrote:
    >>
    >>> thing wrote:
    >>>
    >>>> Dave - Dave.net.nz wrote:
    >>>>
    >>>>> G'day and welcome to another Linux n00b post by me.
    >>>>>
    >>>>> I'm checking the load on my machine
    >>>>> load average: 2.24, 2.15, 1.88
    >>>>> and I get that it is "now, last 5 mins, last 15 mins"
    >>>>>
    >>>>> 0 seems to mean idle, 1 seems to be fairly busy, 2 or over is when
    >>>>> Im compiling things so I assume it is ~100% CPU usage.
    >>>>> but what is exactly 100%? or am I barking in the wrong direction?
    >>>>>
    >>>>
    >>>> Depends on the CPU and if top is configured correctly. Load is a
    >>>> munge of things, cpu, memory and disk i/o. Nominally 1 means your
    >>>> CPU is maxed out, if you have 4 cpus then a load of 4 would be maxed
    >>>> out.
    >>>>
    >>>> Its really more of a queue thing and not that much use for real
    >>>> statistics, but a quick useful tool for a snapshot.
    >>>>
    >>>> If your bored try this,
    >>>>
    >>>> iostat -x 5
    >>>>
    >>>> This will show your disk utilisation % every 5 seconds, (last
    >>>> column). Ignore the first output as that is the average since your
    >>>> last reboot.
    >>>>
    >>>> Once running login to another console/xterm do a find / -name <some
    >>>> file> switch back and watch iostat.
    >>>>
    >>>> vmstat can be used for a few things like cpu, but understanding what
    >>>> these tools are telling you is not easy.
    >>>>
    >>>> One really good use of top is to look for awol processes, typically
    >>>> if your machine is running badly, look at the first process in top,
    >>>> if its 100% or 99.x% yet you would normally expect it to be 0.2%
    >>>> then this suggests the process has run away. Solution is look at its
    >>>> PID and kill -9 it, or -15 to be more gentle but it usually does not
    >>>> respond. Do be sure you get the correct PID and are sure its simply
    >>>> not process working hard for some automated reason.
    >>>>
    >>>> regards
    >>>>
    >>>> thing
    >>>>
    >>> you mean uptime, i take it? Not top. Uptime is part of the
    >>> distribution, no matter which, top is third party software.
    >>>
    >>> Load recorded is the number of processes in the run queue, plus those
    >>> waiting to run. 100% = 1 cpu running full time. 200% is 2 cpus in
    >>> full use, or (allegedly) both threads of an HT P4 running full time.
    >>> There is absolutely no 'munging' of io, memory or anything else in
    >>> this figure.
    >>>
    >>> Killing processes... -1 = hangup. Try that first. Personally, I'd
    >>> rather reboot than kill -9 processes as a matter of course. If
    >>> processes are running wild, find out why, dont use the M$ solution.
    >>>
    >>> Steve

    >>
    >>
    >>
    >> I would have said that a reboot is the MS option.....from experience
    >> if a process has gone awol, -9 is often the only thing that works, Ive
    >> never needed a reboot from this.
    >>
    >> regards
    >>
    >> Thing
    >>

    >
    > I said 'as a matter of course'. If you keep having to do it then there's
    > something wrong. The *nix way is to find out what, not to ignore it.
    >
    > Steve
    > ...and you kill zombies how?


    zombies are harmless, take no resources.

    regards

    Thing
    thing, Oct 30, 2004
    #11
  12. thing wrote:
    >> I'm checking the load on my machine
    >> load average: 2.24, 2.15, 1.88
    >> and I get that it is "now, last 5 mins, last 15 mins"


    >> 0 seems to mean idle, 1 seems to be fairly busy, 2 or over is when Im
    >> compiling things so I assume it is ~100% CPU usage.
    >> but what is exactly 100%? or am I barking in the wrong direction?


    > Depends on the CPU and if top is configured correctly. Load is a munge
    > of things, cpu, memory and disk i/o. Nominally 1 means your CPU is maxed
    > out, if you have 4 cpus then a load of 4 would be maxed out.
    > Its really more of a queue thing and not that much use for real
    > statistics, but a quick useful tool for a snapshot.


    after a day or three of compiling things, 3.6 seems to be 100% CPU,
    well, it's the most I've seen. playing with a fresh gentoo install, and
    so installing/compiling KDE and Oo_O(with Ximian).

    --
    Dave Hall
    http://www.dave.net.nz
    http://www.karyn.net.nz
    Dave - Dave.net.nz, Nov 1, 2004
    #12
  13. RT

    Barry Gibb Guest

    thing wrote:

    > Dave - Dave.net.nz wrote:
    >> G'day and welcome to another Linux n00b post by me.
    >>
    >> I'm checking the load on my machine
    >> load average: 2.24, 2.15, 1.88
    >> and I get that it is "now, last 5 mins, last 15 mins"
    >>
    >> 0 seems to mean idle, 1 seems to be fairly busy, 2 or over is when Im
    >> compiling things so I assume it is ~100% CPU usage.
    >> but what is exactly 100%? or am I barking in the wrong direction?
    >>

    >
    > Depends on the CPU and if top is configured correctly. Load is a munge
    > of things, cpu, memory and disk i/o. Nominally 1 means your CPU is maxed
    > out, if you have 4 cpus then a load of 4 would be maxed out.


    some processes use the load average to control their activity.
    for example, sendmail will refuse to forward mail when the load
    average is on the high side and mail will remain in the mail queue.

    >
    > Its really more of a queue thing and not that much use for real
    > statistics, but a quick useful tool for a snapshot.
    >
    > If your bored try this,
    >
    > iostat -x 5
    >
    > This will show your disk utilisation % every 5 seconds, (last column).
    > Ignore the first output as that is the average since your last reboot.
    >
    > Once running login to another console/xterm do a find / -name <some
    > file> switch back and watch iostat.
    >
    > vmstat can be used for a few things like cpu, but understanding what
    > these tools are telling you is not easy.


    vmstat is just statistics for virtual memory.
    shows paging and read/write rates.
    not too difficult to understand.

    >
    > One really good use of top is to look for awol processes, typically if
    > your machine is running badly, look at the first process in top, if its
    > 100% or 99.x% yet you would normally expect it to be 0.2% then this
    > suggests the process has run away. Solution is look at its PID and kill
    > -9 it, or -15 to be more gentle but it usually does not respond. Do be
    > sure you get the correct PID and are sure its simply not process working
    > hard for some automated reason.


    better to do just "kill" which is same as "kill -TERM".
    then "kill -QUIT that fails so you get a core dump.
    then "kill -KILL" as a last resort.
    Barry Gibb, Nov 1, 2004
    #13
  14. RT

    Bruce Hoult Guest

    In article <>,
    "Dave - Dave.net.nz" <> wrote:

    > G'day and welcome to another Linux n00b post by me.
    >
    > I'm checking the load on my machine
    > load average: 2.24, 2.15, 1.88
    > and I get that it is "now, last 5 mins, last 15 mins"
    >
    > 0 seems to mean idle, 1 seems to be fairly busy, 2 or over is when Im
    > compiling things so I assume it is ~100% CPU usage.
    > but what is exactly 100%? or am I barking in the wrong direction?


    The load average measures how many programs, on average, are in
    "runnable" state. That means that they are not waiting for I/O
    (network, disk, kb, mouse etc) and would be using the/a CPU if one was
    available.

    For maximum system responsiveness you want to keep the load average a
    little less than the number of CPUs that you have. For maximum
    throughput of work you want the load average to be 50% - 100% higher
    than the number of CPUs you have -- but not something silly like 10
    times higher.

    --
    Bruce | 41.1670S | \ spoken | -+-
    Hoult | 174.8263E | /\ here. | ----------O----------
    Bruce Hoult, Nov 1, 2004
    #14
  15. In article <D2Sgd.24091$>,
    thing <> wrote:

    >zombies are harmless, take no resources.


    They fill up process slots!

    I found this out the hard way, in one of my early programs that was
    spawning processes but forgetting to call wait/waitpid to gobble up the
    zombies. Eventually the entire system came to a halt, unable to create
    any new processes.

    Moral: Always gobble your zombie children!
    Lawrence D'Oliveiro, Nov 1, 2004
    #15
  16. In article <cm0j0b$hle$>, Steve <>
    wrote:

    >...and you kill zombies how?


    You don't kill them--they're already dead. But they have to be gobbled
    by their parent doing a wait or waitpid call.
    Lawrence D'Oliveiro, Nov 1, 2004
    #16
  17. Dave - Dave.net.nz, Nov 1, 2004
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Row
    Replies:
    7
    Views:
    701
  2. =?Utf-8?B?U3BpZGVybWFu?=

    Average time for mcse

    =?Utf-8?B?U3BpZGVybWFu?=, May 4, 2004, in forum: MCSE
    Replies:
    77
    Views:
    8,672
  3. Shane Matthews

    Average PC Infested with Spyware

    Shane Matthews, Apr 16, 2004, in forum: Computer Support
    Replies:
    4
    Views:
    391
    -= Hawk =-
    Apr 17, 2004
  4. DoubleEntendre

    How much protection does the average "Joe" need???

    DoubleEntendre, Jan 3, 2005, in forum: Computer Support
    Replies:
    6
    Views:
    652
    Toolman Tim
    Jan 3, 2005
  5. Replies:
    2
    Views:
    1,051
    Arcaidy
    Feb 25, 2004
Loading...

Share This Page