How do I enable zswap on ubuntu?

May 19, 2015 2.6k views
Linux Basics Linux Commands


How can I enable zswap on a ubuntu 14.04 instance? I did some searching and did this:

1) I modified /etc/default/grub and changed GRUB_CMDLINE_LINUX_DEFAULT to GRUB_CMDLINE_LINUX_DEFAULT="zswap.enabled=1
2) I then rebooted the system with "reboot"

I then tried to verify the presence of zswap by running "dmesg | grep zcache" but I couldn't find anything. How do I know if I actually configured it properly and if it's running?


2 Answers

After modifying the grub files in /etc, you must run:

sudo update-grub

GRUBCMDLINELINUXDEFAULT="zswap.enabled=1" is not where you enable it. You need to enable it here..
CMDLINE_LINUX="zswap.enabled=1" Then run sudo update-grub and then reboot.

Have another answer? Share your knowledge.