6

I'm trying to enable LZ4 compression for zswap on Ubuntu 16.04.1 LTS.

My GRUB config:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=cfq profile zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=80"

I executed sudo update-grub, and rebooted. But, zswap says compressor lz4 not available, using default lzo. I have liblz4-tool installed. This is the message I get after executing dmesg | grep zswap

[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-59-generic.efi.signed root=UUID=148a9e6d-52db-4678-b11d-ef1e5559b69d ro quiet splash elevator=cfq profile zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=80 vt.handoff=7
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-59-generic.efi.signed root=UUID=148a9e6d-52db-4678-b11d-ef1e5559b69d ro quiet splash elevator=cfq profile zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=80 vt.handoff=7
[    0.716485] zswap: compressor lz4 not available, using default lzo
[    0.716493] zswap: loaded using pool lzo/zbud
1
  • 1
    Here's the steps on how to fix the same issue in Arch Linux. Can anyone please help me do it in debian based os? Jan 28, 2017 at 18:33

1 Answer 1

11

I've found the solution in this Russian Debian Forum. I had to run these extra steps

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

And run dmesg | grep -i zswap, to see

[    0.715952] zswap: loaded using pool lz4/zbud

Excited to see how the performance improves.

edit: I have written my steps in this guide. You can check if you face issues enabling zswap.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.