Commit f68b3f4e03a4

Vincent Demeester <vincent@sbr.pm>
2024-05-13 17:27:12
core: update nix daemon "scheduler" policies…
… should help not overload the laptop, and hopefully doesn't hurt build performance too much. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 8b45999
Changed files (1)
systems
modules
systems/modules/core/nix.nix
@@ -57,16 +57,13 @@ in
           "vdemeester.cachix.org-1:eZWNOrLR9A9szeMahn9ENaoT9DB3WgOos8va+d2CU44="
         ];
       };
-      # FIXME handle this depending on the version
-      # 21.05 has the following
-      # daemonIONiceLevel, daemonNiceLevel
-      # 21.11 and above
-      # daemonCPUSchedPolicy, daemonIOSchedClass, daemonIOSchedPriority
-
-      #daemonIONiceLevel = 5;
-      #daemonNiceLevel = 10;
-      daemonIOSchedPriority = 5;
-      daemonCPUSchedPolicy = "batch";
+      # On laptops at least, make the daemon and builders low priority
+      # to have a responding system while building
+      daemonIOSchedClass = "idle";
+      daemonCPUSchedPolicy = "idle";
+      # FIXME: On servers, we may change this.
+      # daemonIOSchedPriority = 5;
+      # daemonCPUSchedPolicy = "batch";
 
       # if hydra is down, don't wait forever
       extraOptions = ''