2024-01-15 04:18:06 +00:00
|
|
|
{
|
2023-11-05 09:35:05 +00:00
|
|
|
services.zram-generator = {
|
|
|
|
enable = true;
|
|
|
|
settings.zram0 = {
|
|
|
|
compression-algorithm = "zstd";
|
|
|
|
zram-size = "ram";
|
|
|
|
};
|
|
|
|
};
|
2023-12-22 02:57:03 +00:00
|
|
|
|
|
|
|
# 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;
|
|
|
|
};
|
2023-11-05 09:35:05 +00:00
|
|
|
}
|