From 293bc52ace90534c4b5d0fd1ffe2aefd8b14695e Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sat, 13 Jul 2024 04:38:24 +0200 Subject: [PATCH] hydra: reduce number of parallel builds per builder to limit RAM consumption --- services/hydra/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/hydra/default.nix b/services/hydra/default.nix index 9240d76..685bc98 100644 --- a/services/hydra/default.nix +++ b/services/hydra/default.nix @@ -13,15 +13,15 @@ let # XXX: to support Nix's dumb public host key syntax (base64'd), this outputs # a string with shell-style command interpolations: $(...). - mkBaremetalBuilder = { nrCores, publicHostKey, host, speedFactor ? 1, user ? "builder", supportedSystems ? [ "i686-linux" "x86_64-linux" ], supportedFeatures ? [ "big-parallel" "kvm" "nixos-test" ] }: - "ssh://${user}@${host} ${lib.concatStringsSep "," supportedSystems} ${config.age.secrets.hydra-ssh-key-priv.path} ${toString nrCores} ${toString speedFactor} ${lib.concatStringsSep "," supportedFeatures} - $(echo -n '${publicHostKey}' | base64 -w0)"; + mkBaremetalBuilder = { parallelBuilds, publicHostKey, host, speedFactor ? 1, user ? "builder", supportedSystems ? [ "i686-linux" "x86_64-linux" ], supportedFeatures ? [ "big-parallel" "kvm" "nixos-test" ] }: + "ssh://${user}@${host} ${lib.concatStringsSep "," supportedSystems} ${config.age.secrets.hydra-ssh-key-priv.path} ${toString parallelBuilds} ${toString speedFactor} ${lib.concatStringsSep "," supportedFeatures} - $(echo -n '${publicHostKey}' | base64 -w0)"; # TODO: # - generalize to new architectures # - generalize to new features baremetalBuilders = lib.concatStringsSep "\n" (map (n: mkBaremetalBuilder { - nrCores = 40; # TODO: do not hardcode this, use the node's builder configuration. + parallelBuilds = 8; # TODO: do not hardcode this, use the node's builder configuration. publicHostKey = ssh-keys.machines.${n}; host = nodes.${n}.config.networking.fqdn; }) cfg.builders);