From 4f9320286437cb54046f28a8eb5b4357fb5f26a2 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Mon, 9 Sep 2024 03:44:02 +0800 Subject: [PATCH] fix: p8s oom - increase zramSwap percentage 50 => 100 --- hosts/idols-aquamarine/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hosts/idols-aquamarine/default.nix b/hosts/idols-aquamarine/default.nix index d6a56da3..0f68826c 100644 --- a/hosts/idols-aquamarine/default.nix +++ b/hosts/idols-aquamarine/default.nix @@ -1,4 +1,5 @@ { + lib, mylib, myvars, pkgs, @@ -31,6 +32,11 @@ in { "exfat" ]; + # Maximum total amount of memory that can be stored in the zram swap devices (as a percentage of your total memory). + # Defaults to 1/2 of your total RAM. Run zramctl to check how good memory is compressed. + # This doesn’t define how much memory will be used by the zram swap devices. + zramSwap.memoryPercent = lib.mkForce 100; + boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelModules = ["kvm-amd"]; boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu