nixos: zram-generator: use optimized sysctl

This commit is contained in:
Guanran Wang 2023-12-22 10:57:03 +08:00
parent fb91a29e05
commit cebc08cb78
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8

View file

@ -6,4 +6,12 @@ _: {
zram-size = "ram"; zram-size = "ram";
}; };
}; };
# https://wiki.archlinux.org/title/Zram#Optimizing_swap_on_zram
boot.kernel.sysctl = {
"vm.swappiness" = 180;
"vm.watermark_boost_factor" = 0;
"vm.watermark_scale_factor" = 125;
"vm.page-cluster" = 0;
};
} }