oom pushed a commit to branch c++-team in repository guix. commit 67f99435548a375d22d8d5acde794f5968904683 Author: Greg Hogan <c...@greghogan.com> AuthorDate: Tue Mar 18 18:19:13 2025 +0000
build-system/gnu: Limit load average. * guix/build/gnu-build-system.scm (build, check): Set max load. Change-Id: I97f1e3e59880b6ed23faed2038eb5279415e9c95 --- guix/build/gnu-build-system.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 0b94416a8d..e324c3488c 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -28,6 +28,7 @@ #:use-module (ice-9 regex) #:use-module (ice-9 format) #:use-module (ice-9 ftw) + #:use-module (ice-9 threads) #:use-module (srfi srfi-1) #:use-module (srfi srfi-19) #:use-module (srfi srfi-34) @@ -385,7 +386,9 @@ makefiles." #:allow-other-keys) (apply invoke "make" `(,@(if parallel-build? - `("-j" ,(number->string (parallel-job-count))) + `("-j" ,(number->string (parallel-job-count)) + ,(string-append "--max-load=" + (number->string (total-processor-count)))) '()) ,@make-flags))) @@ -424,7 +427,9 @@ makefiles." (raise c))) (apply invoke "make" test-target `(,@(if parallel-tests? - `("-j" ,(number->string (parallel-job-count))) + `("-j" ,(number->string (parallel-job-count)) + ,(string-append "--max-load=" + (number->string (total-processor-count)))) '()) ,@make-flags))) (format #t "test suite not run~%")))