bug-make
[Top][All Lists]
Advanced

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

Re: [PATCH] src/main.c: Add -J to detect number of job slots based on np


From: Howard Chu
Subject: Re: [PATCH] src/main.c: Add -J to detect number of job slots based on nproc.
Date: Fri, 12 Apr 2024 15:15:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18

DSB wrote:
>     Isn't nproc or nproc+1 too much?  On systems with hyper-threading,
>     this will try using too many jobs, and might cause the system be
>     significantly less responsive.  Maybe nproc/2 is a better default?
> 
> 
> This is an interesting question and I suppose the answer depends on many 
> factors. At my organization we've actually gone the other direction and 
> default to -j
> (nproc * 2) on the theory that one of the two jobs is liable to be sleeping 
> on I/O at any given time. But this is very much a YMMV area and the builtin 
> default,
> if there was to be one at all, should be conservative so nproc * 2 would be a 
> bad choice.

I've always used nproc * 1.5. This factor was determined empirically by 
observing idle time on
many builds using nproc * 1 and nproc * 2.

-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/



reply via email to

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