at g2k23 we talked about this issue for a bit. The make(1) manual page can be confusing because it says:
-j max_processes Specify the maximum number of processes that make may have running at any one time. Nope, that's wrong. It can create vast number of processes including their sub-processes upon pipelines, so it is very difficult to judge what it will do. We could fix it (with an ugly hack you don't want to hear about), but then -j will probably end up way underutilizing cpus (because it would count even your "sh" processes sitting idle), and then people would probably start running -j 100 on 16 cpu machines and be right back at the same underload vs overload situation. > Peter Hessler: > > > This package takes quite a while to build, so I marked it as parallel to > > use more CPUs. > > This appears inefficient. Right now, I have a gambit build sitting > here, taking up five CPU slots... > > 5*lang/gambit(build) [29274] 26% frozen for 22mn > > ... but running only two cc(1) processes. > > 59060 p1 I+p 0:00.02 | `-- /usr/bin/make build > 97813 p1 I+p 0:00.00 | `-- /bin/sh -ec lock=gambit-4.9.4p0; > export > 74087 p1 I+p 0:00.01 | `-- /usr/bin/make _internal-build > 3321 p1 I+p 0:00.02 | `-- /usr/bin/make do-build > 54023 p1 I+p 0:00.00 | `-- /bin/sh -ec ulimit -s 12288 && > cd > 72554 p1 I+p 0:00.01 | `-- /usr/bin/make mkdir_p=mkdir -p > - > 21475 p1 I+p 0:00.01 | `-- /bin/sh -ec for subdir in > incl > 71313 p1 I+p 0:00.00 | `-- /bin/sh -ec for subdir in > in > 19391 p1 I+p 0:00.05 | `-- /usr/bin/make core > 71280 p1 R+/10 26:59.87 | |-- /usr/bin/cc -B > /usr/obj/ > 4319 p1 R+/9 26:47.57 | `-- /usr/bin/cc -B > /usr/obj/ > > -- > Christian "naddy" Weisgerber na...@mips.inka.de >