On 2012-11-27 6:21 PM, Gregory Szorc wrote:
On 11/27/12 2:55 PM, Chris Peterson wrote:
On 11/27/12 2:35 PM, Gregory Szorc wrote:
I feel the build system should be as fast as possible by default - no
user action necessary. If you find that -j == # cores isn't providing
the fastest builds possible, please present your data and we'll change
the default value.

A gnumake flag that obsessive mozconfig tweakers may want to test is
--load-average (-l).

You can specify a maximum load average to throttle the number of make -j
jobs that are running simultaneously. You can specify a high -j to have
many jobs available (e.g. 2 * # cores), but never run more than -l #
cores.

https://www.gnu.org/software/make/manual/make.html#Parallel

If anyone has data showing -l to behave better than -j, I will happily
incorporate it into the build system.

That being said, I don't think using this flag is a good idea.

I played with this a bit in the past. My experience was that the load average reacts much too slowly to new processes, so Make would fire off a huge batch of compilation processes (hundreds of them!), driving the computer deeply into swap. Tens of minutes later, that batch would all finish at the same time and Make would spawn a new batch. Overall results were disastrously bad.

It might be possible to persuade the gmake developers to make -l look at the instantaneous CPU utilization rather than the one-minute load average (with some hysteresis) -- I can't imagine -l is useful to *anyone* with the behavior it currently has. It does what it does largely because that was the only gauge available back in the days of System V, I think.

zw
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to