more aggressive swap for zram

This commit is contained in:
Dmitriy Kholkin 2023-06-16 00:36:16 +03:00
parent f30e2a1056
commit 62d804360f
2 changed files with 12 additions and 2 deletions

View File

@ -78,7 +78,11 @@ in {
"rd.udev.log_priority=3"
];
kernel.sysctl = {
"vm.swappiness" = if config.deviceSpecific.isSSD then 1 else 10;
"vm.swappiness" = 80;
"vm.vfs_cache_pressure" = 200;
"vm.dirty_background_ratio" = 1;
"vm.dirty_ratio" = 40;
"vm.page-cluster" = 0;
};
# cleanTmpDir = true;
};

View File

@ -48,7 +48,13 @@ with config.deviceSpecific; {
kernelPackages = lib.mkDefault pkgs.linuxPackages_lqx;
consoleLogLevel = 3;
kernel.sysctl = {
kernel.sysctl = if config.zramSwap.enable then {
"vm.swappiness" = 100;
"vm.vfs_cache_pressure" = 500;
"vm.dirty_background_ratio" = 1;
"vm.dirty_ratio" = 50;
"vm.page-cluster" = 0;
} else {
"vm.swappiness" = if config.deviceSpecific.isSSD then 1 else 10;
};