You are not logged in.

#1 2025-09-30 20:56:22

PHLAK
Member
From: Arizona
Registered: 2021-03-29
Posts: 8
Website

[SOLVED] ZSwap max_pool_percent set via modprobe.d not applying

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

#2 2025-10-01 05:44:13

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 707

Re: [SOLVED] ZSwap max_pool_percent set via modprobe.d not applying

zswap is not a loadable module, so you need to set its parameters in the kernel command line instead.

Offline

#3 2025-10-02 16:42:33

PHLAK
Member
From: Arizona
Registered: 2021-03-29
Posts: 8
Website

Re: [SOLVED] ZSwap max_pool_percent set via modprobe.d not applying

nl6720 wrote:

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

#4 2025-10-02 18:30:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,074

Re: [SOLVED] ZSwap max_pool_percent set via modprobe.d not applying

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 wink

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

Board footer

Powered by FluxBB