From 6e7d040cf2c583781d20e7f667c0024049d8d9ad Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Fri, 26 Nov 2021 13:24:06 +0100 Subject: modules/nix-daemon: Amend daemon(CPU|IO)Sched(Policy|Class) description Suggest appropriate values for various types of systems and add some formatting. (cherry picked from commit 8c654134d6c9f177fcf78b8fdcad2e8c06c13e73) --- nixos/modules/services/misc/nix-daemon.nix | 52 +++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index fb643e7a66e1..869feb05eb7b 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -192,15 +192,28 @@ in example = "batch"; description = '' Nix daemon process CPU scheduling policy. This policy propagates to - build processes. other is the default scheduling policy for regular - tasks. The batch policy is similar to other, but optimised for - non-interactive tasks. idle is for extremely low-priority tasks - that should only be run when no other task requires CPU time. - - Please note that while using the idle policy may greatly improve - responsiveness of a system performing expensive builds, it may also - slow down and potentially starve crucial configuration updates - during load. + build processes. other is the default scheduling + policy for regular tasks. The batch policy is + similar to other, but optimised for + non-interactive tasks. idle is for extremely + low-priority tasks that should only be run when no other task + requires CPU time. + + Please note that while using the idle policy may + greatly improve responsiveness of a system performing expensive + builds, it may also slow down and potentially starve crucial + configuration updates during load. + + idle may therefore be a sensible policy for + systems that experience only intermittent phases of high CPU load, + such as desktop or portable computers used interactively. Other + systems should use the other or + batch policy instead. + + For more fine-grained resource control, please refer to + systemd.resource-control + 5 and adjust + directly. ''; }; @@ -210,13 +223,20 @@ in example = "idle"; description = '' Nix daemon process I/O scheduling class. This class propagates to - build processes. best-effort is the default class for regular tasks. - The idle class is for extremely low-priority tasks that should only - perform I/O when no other task does. - - Please note that while using the idle scheduling class can improve - responsiveness of a system performing expensive builds, it might also - slow down or starve crucial configuration updates during load. + build processes. best-effort is the default + class for regular tasks. The idle class is for + extremely low-priority tasks that should only perform I/O when no + other task does. + + Please note that while using the idle scheduling + class can improve responsiveness of a system performing expensive + builds, it might also slow down or starve crucial configuration + updates during load. + + idle may therefore be a sensible class for + systems that experience only intermittent phases of high I/O load, + such as desktop or portable computers used interactively. Other + systems should use the best-effort class. ''; }; -- cgit v1.2.3