mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Nix] Limit nix-daemon CPU usage
This commit is contained in:
parent
d6227b0255
commit
c449ec13c9
1 changed files with 5 additions and 3 deletions
|
|
@ -50,8 +50,8 @@ in
|
|||
CPUSchedulingPolicy = "idle";
|
||||
IOSchedulingClass = "idle";
|
||||
IOAccounting = true;
|
||||
IOWeight = 1024 / 10;
|
||||
CPUWeight = 1;
|
||||
IOWeight = 10;
|
||||
CPUWeight = 10;
|
||||
CPUQuota = (toString (generalCfg.cpu.threads * 80)) + "%";
|
||||
Type = mkOverride 20 "simple";
|
||||
};
|
||||
|
|
@ -70,9 +70,11 @@ in
|
|||
serviceConfig = {
|
||||
Nice = 19;
|
||||
CPUSchedulingPolicy = mkForce "batch";
|
||||
CPUWeight = 1;
|
||||
CPUQuota = (toString (generalCfg.cpu.threads * 80)) + "%";
|
||||
IOSchedulingClass = mkForce "idle";
|
||||
IOAccounting = true;
|
||||
IOWeight = 1024 / 10;
|
||||
IOWeight = 1;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue