Skip to content

Instantly share code, notes, and snippets.

@rizalp
Created October 26, 2019 03:27
Show Gist options
  • Save rizalp/aee32a51ba7a3b9276a45e8a3fc1f6ea to your computer and use it in GitHub Desktop.
Save rizalp/aee32a51ba7a3b9276a45e8a3fc1f6ea to your computer and use it in GitHub Desktop.

Better use zswap, as it will work in conjunction with swap devices https://www.addictivetips.com/ubuntu-linux-tips/enable-zswap-on-linux/

In /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=40 zswap.zpool=z3fold"

run sudo update-grub

Need to add

sudo su
echo lz4 >> /etc/initramfs-tools/modules
echo lz4_compress >> /etc/initramfs-tools/modules
echo z3fold >> /etc/initramfs-tools/modules
update-initramfs -u

verify

cat /sys/module/zswap/parameters/enabled
dmesg | grep -i zswap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment