First, confirm if zswap is supported (“y” means yes)
# cat /boot/config-`uname -r` | grep -i zswap
CONFIG_ZSWAP=y
Next, check if it’s enabled (“N” means no)
# cat /sys/module/zswap/parameters/enabled
N
If the above result is “N” (no), then enable it
echo Y | sudo tee /sys/module/zswap/parameters/enabled
Now check again and it should be enabled
# cat /sys/module/zswap/parameters/enabled
Y