Unix Programming - makefile -j --max-load 2.5

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > February 2006 > makefile -j --max-load 2.5





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author makefile -j --max-load 2.5
billy

2006-02-14, 7:49 am

Exactly what is a load average?

>From the make man page:

__BEGIN__
When the system is heavily loaded, you will probably want to run fewer
jobs than when it is lightly loaded. You can use the `-l' option to
tell make to limit the number of jobs to run at once, based on the load
average. The `-l' or `--max-load' option is followed by a
floating-point number. For example,

-l 2.5

will not let make start more than one job if the load average is above
2.5. The `-l' option with no following number removes the load limit,
if one was given with a previous `-l' option.

More precisely, when make goes to start up a job, and it already has at
least one job running, it checks the current load average; if it is not
lower than the limit given with `-l', make waits until the load average
goes below that limit, or until all the other jobs finish.

By default, there is no load limit.
__END__

Thomas Maier-Komor

2006-02-14, 7:50 am

billy wrote:
> Exactly what is a load average?
>
> __BEGIN__
> When the system is heavily loaded, you will probably want to run fewer
> jobs than when it is lightly loaded. You can use the `-l' option to
> tell make to limit the number of jobs to run at once, based on the load
> average. The `-l' or `--max-load' option is followed by a
> floating-point number. For example,
>
> -l 2.5
>
> will not let make start more than one job if the load average is above
> 2.5. The `-l' option with no following number removes the load limit,
> if one was given with a previous `-l' option.
>
> More precisely, when make goes to start up a job, and it already has at
> least one job running, it checks the current load average; if it is not
> lower than the limit given with `-l', make waits until the load average
> goes below that limit, or until all the other jobs finish.
>
> By default, there is no load limit.
> __END__
>


the concrete calculation of load average is highly system dependent. But
in general it has something to do with the number of processes that are
in the state running - i.e. not blocked, stopped or something similar.

The problem with the load average value is that when you don't measure
over a time interval, its maximum always corresponds to the number of
processors that are online in the system. Therefore, one usually uses a
time interval. Depending on the time interval chosen the result varies.

HTH,
Tom

Thomas Maier-Komor

2006-02-14, 5:54 pm

Thomas Maier-Komor wrote:
> the concrete calculation of load average is highly system dependent. But
> in general it has something to do with the number of processes that are
> in the state running - i.e. not blocked, stopped or something similar.
>
> The problem with the load average value is that when you don't measure
> over a time interval, its maximum always corresponds to the number of
> processors that are online in the system. Therefore, one usually uses a
> time interval. Depending on the time interval chosen the result varies.
>


I forgot to mention that most systems will also account the wait queue
for the calculation of load average. But this will only occur, if the
system is overloaded. I.e. if there are more processes ready and waiting
to get a processor than actually can be scheduled at once.

But consult the docs of your system (or even better the sources), to
find out how this value is calculated.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com