guix-commits
[Top][All Lists]
Advanced

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

branch master updated: build-machines: Allow concurrent jobs.


From: Mathieu Othacehe
Subject: branch master updated: build-machines: Allow concurrent jobs.
Date: Wed, 05 Aug 2020 04:40:03 -0400

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository maintenance.

The following commit(s) were added to refs/heads/master by this push:
     new 45f9303  build-machines: Allow concurrent jobs.
45f9303 is described below

commit 45f9303c9f6de6a2eca9616922f97b6ce46f246c
Author: Mathieu Othacehe <m.othacehe@gmail.com>
AuthorDate: Thu Jul 2 11:26:32 2020 +0200

    build-machines: Allow concurrent jobs.
    
    For now build machines have guix-daemon "--max-jobs" option unset, which 
means
    that at most one job is allowed to be built by the daemon. By setting 
max-jobs
    to 20, we should be able to make better use of berlin build-machines.
    
    * hydra/modules/sysadmin/build-machines.scm (berlin-new-build-machine-os): 
Add
    max-jobs, max-cores and build-accounts-to-max-jobs-ratio arguments. Pass 
them
    to "guix-configuration" record.
    * hydra/berlin-nodes.scm: Adapt accordingly to allow at most 20 concurrent
    jobs.
---
 hydra/berlin-nodes.scm                    | 11 ++++++-----
 hydra/modules/sysadmin/build-machines.scm | 25 ++++++++++++++++++-------
 2 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/hydra/berlin-nodes.scm b/hydra/berlin-nodes.scm
index 32d331a..8f8f38e 100644
--- a/hydra/berlin-nodes.scm
+++ b/hydra/berlin-nodes.scm
@@ -132,13 +132,14 @@
        ((id ip host-key memory)
         (machine
          (operating-system
-                  (berlin-new-build-machine-os id
-                                                #:emulated-architectures
-                                                `("arm" "aarch64")
-                                                #:childhurd? (childhurd-ip? 
ip)))
+           (berlin-new-build-machine-os id
+                                        #:emulated-architectures
+                                        '("arm" "aarch64")
+                                        #:childhurd? (childhurd-ip? ip)
+                                        #:max-jobs 20))
          (environment managed-host-environment-type)
          (configuration (machine-ssh-configuration
                          (system "x86_64-linux")
                          (host-name (format #f "141.80.167.~d" (+ id 57)))
                          (host-key host-key))))))
-        nodes)
+     nodes)
diff --git a/hydra/modules/sysadmin/build-machines.scm 
b/hydra/modules/sysadmin/build-machines.scm
index 94b4e64..b4afcbe 100644
--- a/hydra/modules/sysadmin/build-machines.scm
+++ b/hydra/modules/sysadmin/build-machines.scm
@@ -85,7 +85,10 @@ nodes."
                                       #:key
                                       (authorized-guix-keys '())
                                       (emulated-architectures '())
-                                      childhurd?)
+                                      childhurd?
+                                      (max-jobs 5)
+                                      (max-cores 4)
+                                      (build-accounts-to-max-jobs-ratio 4))
   "Return the <operating-system> declaration for a build machine for
 berlin.guixsd.org with integer ID, with the given
 AUTHORIZED-GUIX-KEYS.  Add a 'qemu-binfmt-service' for
@@ -222,11 +225,19 @@ Match Address 141.80.167.131
                                      (childhurd-net-options this-record))))))
 
               ,@(modify-services %base-services
-                  (guix-service-type config =>
-                                     (guix-configuration
-                                      (inherit config)
-                                      (use-substitutes? #f)
-                                      (authorized-keys
-                                       authorized-guix-keys)))))))))
+                  (guix-service-type
+                   config =>
+                   (guix-configuration
+                    (inherit config)
+                    (use-substitutes? #f)
+                    (authorized-keys
+                     authorized-guix-keys)
+                    (build-accounts
+                     (* build-accounts-to-max-jobs-ratio max-jobs))
+                    (extra-options
+                     (list "--max-jobs"
+                           (number->string max-jobs)
+                           "--cores"
+                           (number->string max-cores)))))))))))
 
 ;;; build-machines.scm end here



reply via email to

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