more aggressive swap for zram
This commit is contained in:
parent
f30e2a1056
commit
62d804360f
@ -78,7 +78,11 @@ in {
|
|||||||
"rd.udev.log_priority=3"
|
"rd.udev.log_priority=3"
|
||||||
];
|
];
|
||||||
kernel.sysctl = {
|
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;
|
# cleanTmpDir = true;
|
||||||
};
|
};
|
||||||
|
@ -48,7 +48,13 @@ with config.deviceSpecific; {
|
|||||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_lqx;
|
kernelPackages = lib.mkDefault pkgs.linuxPackages_lqx;
|
||||||
|
|
||||||
consoleLogLevel = 3;
|
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;
|
"vm.swappiness" = if config.deviceSpecific.isSSD then 1 else 10;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user