guix-commits
[Top][All Lists]
Advanced

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

01/04: sysadmin/services: Make the build accounts ratio configurable.


From: Christopher Baines
Subject: 01/04: sysadmin/services: Make the build accounts ratio configurable.
Date: Sun, 26 Apr 2020 15:18:09 -0400 (EDT)

cbaines pushed a commit to branch master
in repository maintenance.

commit 56c87ce71280e1b757a1dfc66062bc62fad00702
Author: Christopher Baines <address@hidden>
AuthorDate: Mon Apr 20 10:44:47 2020 +0100

    sysadmin/services: Make the build accounts ratio configurable.
    
    So that bayfront can have more build accounts.
    
    * hydra/modules/sysadmin/services.scm (guix-daemon-config): Add
     #:build-accounts-to-max-jobs-ratio as a parameter.
    (frontend-services): Add #:build-accounts-to-max-jobs-ratio as a
    parameter, and pass the value to guix-daemon-config.
---
 hydra/modules/sysadmin/services.scm | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/hydra/modules/sysadmin/services.scm 
b/hydra/modules/sysadmin/services.scm
index 064d077..44ff144 100644
--- a/hydra/modules/sysadmin/services.scm
+++ b/hydra/modules/sysadmin/services.scm
@@ -168,7 +168,8 @@
         #~(job '(next-hour '(16))
                (string-append #$guix "/bin/guix gc -F400G"))))
 
-(define* (guix-daemon-config #:key (max-jobs 5) (cores 4))
+(define* (guix-daemon-config #:key (max-jobs 5) (cores 4)
+                             (build-accounts-to-max-jobs-ratio 4))
   (guix-configuration
    ;; Disable substitutes altogether.
    (use-substitutes? #f)
@@ -183,7 +184,7 @@
 
    (log-compression 'gzip)               ;be friendly to 'guix publish' users
 
-   (build-accounts (* 4 max-jobs))
+   (build-accounts (* build-accounts-to-max-jobs-ratio max-jobs))
    (extra-options (list "--max-jobs" (number->string max-jobs)
                         "--cores" (number->string cores)
                         "--cache-failures"
@@ -343,6 +344,7 @@
                             nginx-config-file
                             (max-jobs 5)
                             (cores 4)
+                            (build-accounts-to-max-jobs-ratio 4)
                             (systems '("x86_64-linux" "i686-linux"))
                             (motd %default-motd)
                             (nar-ttl (* 90 24 3600))
@@ -383,8 +385,11 @@
                      '())
                  (modify-services %base-services
                    (guix-service-type
-                    config => (guix-daemon-config #:max-jobs max-jobs
-                                                  #:cores cores))
+                    config => (guix-daemon-config
+                               #:max-jobs max-jobs
+                               #:cores cores
+                               #:build-accounts-to-max-jobs-ratio
+                               build-accounts-to-max-jobs-ratio))
                    (login-service-type
                     config => (login-configuration
                                (inherit config)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]