Subject: Re: [bug#77432] [PATCH core-packages-team] build-system/gnu: Limit load average.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 03 Apr 2025 11:04:31 +0200

Hi Greg,

Greg Hogan <[email-masked]> skribis:

> A nice feature of offload builds is that Guix will throttle the start of new
> jobs based on the overload-threshold. There is no equivalent for local builds,
> so one must either run builds in serial (--max-jobs=1) and endure
> single-threaded builds or run concurrent builds and watch the system overload
> as it runs multiple multi-threaded builds.
>
> I have been testing this "max-load" setting in both the gnu (attached) and cmake
> (soon on the c++-team branch) build systems. Both make and ninja will delay
> starting a new build action when the system is overloaded (the number of running
> processes is greater than, as configured below, the number of processors).
> ctest has a similar option "test-load" which compares against system load.
>
> From the following benchmark comparing the compilation of concurrent Folly
> builds, the "max-load" option reduced the overall time by 8.3%. Memory use also
> drops considerably since we are only running 1/4 of the processes at any time.
>
> If this is too late for inclusion in the core-packages-team branch, I would
> appreciate consideration from the team for inclusion on the c++-team branch.

It’s not too late since we’re waiting for bug fixes in Gash to land.  I
stripped the commit log a bit and applied it.

Thanks for this welcome improvement!

Ludo’.