@cryptotaxi247 / infra / commits / b3dbc732

Hydra: GC from 400 -> 700GB. Use systemctl in cron in stead of aliases.

Eelco Dolstra committed Jul 11, 2014 at 11:56 UTC b3dbc7328cedc91e70a46fead17a8f89dc060503
1 file changed +4 -4
delft/hydra-module.nix
+4 -4
@@ -141,7 +141,7 @@ in
141 nix.distributedBuilds = true;
142
143 nix.gc.automatic = true;
144 - nix.gc.options = ''--max-freed "$((400 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
144 + nix.gc.options = ''--max-freed "$((700 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
145
146 nix.extraOptions = ''
147 gc-keep-outputs = true
@@ -229,10 +229,10 @@ in
229 ''
230 #! /bin/sh
231 if [ $(($(stat -f -c '%a' /nix/store) * $(stat -f -c '%S' /nix/store))) -lt $((${toString cfg.minimumDiskFree} * 1024**3)) ]; then
232 - stop hydra-queue-runner
232 + systemctl stop hydra-queue-runner
233 fi
234 if [ $(($(stat -f -c '%a' /nix/store) * $(stat -f -c '%S' /nix/store))) -lt $((${toString cfg.minimumDiskFreeEvaluator} * 1024**3)) ]; then
235 - stop hydra-evaluator
235 + systemctl stop hydra-evaluator
236 fi
237 '';
238 compressLogs = pkgs.writeScript "compress-logs"
@@ -244,7 +244,7 @@ in
244 in
245 [ "*/5 * * * * root ${checkSpace} &> ${cfg.baseDir}/data/checkspace.log"
246 "15 5 * * * root ${compressLogs} &> ${cfg.baseDir}/data/compress.log"
247 - "15 2 * * * root ${pkgs.systemd}/bin/systemctl start hydra-update-gc-roots.service"
247 + "15 2,14 * * * root ${pkgs.systemd}/bin/systemctl start hydra-update-gc-roots.service"
248 ];
249
250 };