Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > NZ Computing > Linux load average

Reply
Thread Tools

Linux load average

 
 
thing
Guest
Posts: n/a
 
      10-30-2004
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




 
Reply With Quote
 
 
 
 
Dave - Dave.net.nz
Guest
Posts: n/a
 
      11-01-2004
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
 
Reply With Quote
 
 
 
 
Barry Gibb
Guest
Posts: n/a
 
      11-01-2004
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.


 
Reply With Quote
 
Bruce Hoult
Guest
Posts: n/a
 
      11-01-2004
In article <(E-Mail Removed)>,
"Dave - Dave.net.nz" <(E-Mail Removed)> 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----------
 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      11-01-2004
In article <D2Sgd.24091$(E-Mail Removed)>,
thing <(E-Mail Removed)> 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!
 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      11-01-2004
In article <cm0j0b$hle$(E-Mail Removed)>, Steve <(E-Mail Removed)>
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.
 
Reply With Quote
 
Dave - Dave.net.nz
Guest
Posts: n/a
 
      11-01-2004
Lawrence D'Oliveiro wrote:
> Moral: Always gobble your zombie children!


I'll always try to remember that...

freak.

--
Dave Hall
http://www.dave.net.nz
http://www.karyn.net.nz
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Is Netscape Leaving Firefox Behind on GNU/Linux? THE LINUX PROPAGANDA MACHINE CONTINUES. FIREFOX IGNORING LINUX............. traci.manicotti@gmail.com Computer Support 2 10-20-2007 02:12 PM
Linux... yeah linux.. Linux Have a nice cup of pee NZ Computing 19 04-17-2006 10:16 AM
study time required for exams, average? Peter Row MCSD 7 06-10-2005 07:48 PM
Average time for mcse =?Utf-8?B?U3BpZGVybWFu?= MCSE 77 05-12-2004 04:55 PM
AVERAGE SQL error... help please Steven ASP .Net 1 10-16-2003 01:08 PM



Advertisments