You are not logged in.
I'm attempting to enable ZSwap and set the `max_pool_percent` parameter to `50` via a drop-in file in `/etc/modprobe.d`. Enabling ZSwap this way seems to be working but configuring `max_pool_percent` does not.
❭ cat /etc/modprobe.d/zswap.conf
options zswap enabled=1 max_pool_percent=50
❭ systemd-analyze cat-config modprobe.d
...
# /etc/modprobe.d/zswap.conf
options zswap enabled=1 max_pool_percent=50
According to https://wiki.archlinux.org/title/Kernel … modprobe.d "Multiple module parameters are separated by spaces" so I believe this should work.
However, after rebooting and inspecting the zswap parameters we can see that `max_pool_percent` is still set to `20` (the default).
❭ grep -r . /sys/module/zswap/parameters/
/sys/module/zswap/parameters/enabled:Y
/sys/module/zswap/parameters/shrinker_enabled:Y
/sys/module/zswap/parameters/max_pool_percent:20
/sys/module/zswap/parameters/compressor:zstd
/sys/module/zswap/parameters/zpool:zsmalloc
/sys/module/zswap/parameters/accept_threshold_percent:90
What am I doing wrong?
Last edited by PHLAK (2025-10-02 19:14:52)
Offline
zswap is not a loadable module, so you need to set its parameters in the kernel command line instead.
Offline
zswap is not a loadable module
Hmm... thanks. Didn't realize that. Of course if I just followed the documentation I wouldn't have had this problem.
Offline
Of course if I just followed the documentation I wouldn't have had this problem.
But this way you learned an important lesson about a wider field: RTFW
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline