bug-make
[Top][All Lists]
Advanced

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

Re: -j/-l : minimum of jobs running under max-load with auto = cpu+1 def


From: Paul Smith
Subject: Re: -j/-l : minimum of jobs running under max-load with auto = cpu+1 default
Date: Mon, 21 May 2018 08:23:16 -0400

On Mon, 2018-05-21 at 08:36 +0200, Garreau, Alexandre wrote:
> Then I discovered --load-average, and I’m asking myself wether the
> optimum is -j n+1, -l 1.0, or -l n or n+1?

IMO, there are too many problems with choosing any value as the default
value:

 * It's not so simple to determine the number of CPUs, portably.
 * Many makefiles invoke commands that themselves are multi-threaded
   and for these commands you definitely don't want to choose a -j
   value with "# of CPUs" parallelism.
 * Many users of makefiles want to do other things with their systems
   in addition to builds, and don't want to choose a -j or -l value
   that makes their system slow or unusable.  They'd rather their
   builds take longer.
 * There are other metrics besides # of CPUs that need to be taken into
   consideration; for example memory.  I have a build environment which
   builds 200 different C++ programs, each of which ends up to be 200M
   or so, and the linker takes huge amounts of memory.  If I use -j8 on
   my 8-core system and the rebuild only needs to re-link, my entire
   system will hang for many minutes swapping RAM (I can't even move
   the mouse), even though I have enough CPUs.  If I choose -j5 or -j6,
   it works much better.



reply via email to

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