On 10/17/24 6:27 AM, Santiago Vila wrote: > The other one is a bug in ninja. Documentation says it will never use > more parallel jobs than available CPUs, but that does not seem to be > true: > > $ nproc > 1 > $ ninja --help 2>&1 | grep "run N jobs" > -j N run N jobs in parallel (0 means infinity) [default=2 on this > system] > > Note how the default is 2 even if I only have 1 CPU in this machine. > > I'll report the ninja bug separately.
I don't know that this holds true. Ninja documents: """ No matter what pools you specify, ninja will never run more concurrent jobs than the default parallelism, or the number of jobs specified on the command line (with -j). """ Ninja has always tried to scale up very slightly. With >2 cpus available, it will run $(nproc)+2, with 1 or 2 cpus it will run $(nproc)+1 jobs. Probably I suspect you got this information from ninja's manpage -- if so you should be aware that ninja doesn't actually have a manpage and this is a Debian bug in Debian's help2man scripts that replace "on this system" with the not exactly accurate "#CPUs". Debian is making a claim that upstream doesn't. -- Eli Schwartz
OpenPGP_signature.asc
Description: OpenPGP digital signature