From 429f0379b00d3acc3970ce3e129244ed36bd674b Mon Sep 17 00:00:00 2001 From: EliasTheGrandMasterOfMistakes <149844945+EliasTheGrandMasterOfMistakes@users.noreply.github.com> Date: Mon, 10 Mar 2025 13:11:39 -0300 Subject: [PATCH] udev: Use arch linux wiki zram rules from: https://wiki.archlinux.org/title/Zram#Optimizing%20swap%20on%20zram --- usr/lib/udev/rules.d/30-zram.rules | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr/lib/udev/rules.d/30-zram.rules b/usr/lib/udev/rules.d/30-zram.rules index 0d3dba4..acfbccd 100644 --- a/usr/lib/udev/rules.d/30-zram.rules +++ b/usr/lib/udev/rules.d/30-zram.rules @@ -9,6 +9,10 @@ TEST!="/dev/zram0", GOTO="zram_end" # the page cache as hermetic as possible, because otherwise it is "expensive" # to read data from disk again. At the same time, uncompressing pages from ZRAM # is not as expensive and is usually very fast on modern CPUs. -SYSCTL{vm.swappiness}="150" +SYSCTL{vm.swappiness}="180" + +# Based on https://wiki.archlinux.org/title/Zram#Optimizing%20swap%20on%20zram +SYSCTL{vm.watermark_scale_factor}="125" + LABEL="zram_end"