tech-toolchain archive

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

Re: make: dynamic scaling of maxJobs ?



On Sun, 4 Aug 2013 10:11:33 +0200, Alan Barrett writes:
>I now see my mistake, and agree that your suggestion is useful.

Thanks, it seems promising - more so than I expected.

I've tweaked it so that the makefiles can control the behavior
rather than rely on user to specify -j /path/to/maxJobs.
Eg.

.if ${.MAKE.LEVEL} == 0 && ${.MAKE.JOBS} > 8
# play nice with the others
.MAKE.JOBS.CMD:= /path/to/maxJobs
.MAKE.JOBS.CMD.INTERVAL = 90
# this sets an upper bound - controls size of jobs table
.MAKE.JOBS.MAX!= expr 2 \* `sysctl -n hw.ncpu`
.endif




Home | Main Index | Thread Index | Old Index