[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #57575] --load-average changes order or jobs

From: Paul D. Smith
Subject: [bug #57575] --load-average changes order or jobs
Date: Sat, 11 Jan 2020 01:19:16 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0

Follow-up Comment #3, bug #57575 (project make):

All that means is that it's harder to get exactly the right number of jobs to
run in parallel without -l.

The -l option doesn't change anything except add an extra test that make
checks to see if it can run a job.  So instead of "I have a job to run, have I
exceeded my -j level?", make uses "I have a job to run, have I exceeded my -j
level OR is the load higher than the -l setting?"  That's the only difference
with and without -l.  There's no difference in the order in which jobs are
selected to be run.

Just to note, that a load of 0.5 when you have 8 CPUs is pretty small.  A
setting of "-j8 -l0.5" basically tells make "run 8 jobs in parallel BUT if the
load is higher than one half of one CPU's worth, don't start more".

Load averages on multi-core systems are something of a dark art but _more or
less_ you get 1 for every core.  So if you had 8 cores and they were 100% busy
with no other processes waiting to run you'd expect your load average to
approach 8.

You may be thinking that the load is averaged across CPUs so that a load of
1.0 means "all CPUs busy" and 0.5 means you want about half your system to be
busy but that's not how it works.


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]