Mediaserver: oomd backstop, 1G min_free, tighter nix cap
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d2a4e5cebe
commit
c39d570d19
1 changed files with 11 additions and 2 deletions
|
|
@ -13,11 +13,20 @@
|
||||||
nix.settings.cores = 8;
|
nix.settings.cores = 8;
|
||||||
nix.daemonCPUSchedPolicy = "batch";
|
nix.daemonCPUSchedPolicy = "batch";
|
||||||
systemd.services.nix-daemon.serviceConfig = {
|
systemd.services.nix-daemon.serviceConfig = {
|
||||||
MemoryHigh = "12G";
|
MemoryHigh = "8G";
|
||||||
MemoryMax = "16G";
|
MemoryMax = "10G";
|
||||||
OOMPolicy = "continue"; # a killed build shouldn't stop the daemon
|
OOMPolicy = "continue"; # a killed build shouldn't stop the daemon
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# System-wide backstop for whatever else runs away. oomd was running but
|
||||||
|
# monitoring nothing; now it kills the worst cgroup once memory stalls
|
||||||
|
# hit 80% for 30s (start of a thrash, not 10h in).
|
||||||
|
systemd.oomd.enableRootSlice = true;
|
||||||
|
systemd.oomd.enableSystemSlice = true;
|
||||||
|
# Keep 1G truly free (default ~88M) so kernel networking and the watchdog
|
||||||
|
# can still allocate while userspace is squeezed.
|
||||||
|
boot.kernel.sysctl."vm.min_free_kbytes" = 1048576;
|
||||||
|
|
||||||
# Basic system packages
|
# Basic system packages
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
mergerfs
|
mergerfs
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue