I just installed CentOS 7 on a vServer to play around with. Usually I use Debian. Since I had good results, I want to use zswap. I enabled it by putting zswap.enabled=1 zswap.compressor=lz4 in the GRUB_CMDLINE_LINUX in /etc/default/grub

But it falls back to using lzo, because the CentOS 7 Kernel doesn't have the lz4 module, it seems.

Is there any way to add this module without recompiling the whole Kernel? How would this work? Great would be some way to automate it on kernel updates, but that's not that important. (I only install updates manually and without the lz4 and lz4_compress modules nothing breaks, zswap just falls back to lzo)

I want to stay as close as possible to using the package manager. A yum upgradeshould still patch all fixed bugs.

  • Hmmm....if this were any sort of production system, I'd be adding more memory instead of doing this.
    – mdpc
    Sep 3 '14 at 16:55
  • 2
    It is not. Also no matter how much RAM, from my experience zswap is still faster than even swapping to a SSD. Also I have that enabled on a few production machines (Debian Wheezy) without problems. Sep 4 '14 at 9:40
  • Point being to avoid swapping in the first place....swapping bad.
    – mdpc
    Sep 4 '14 at 15:25
  • @mdpc While this would be ideal, it is not always possible. I find zswap, or using zram as a swap device to be especially useful on virtual machines with SAN storage due to the alternative of vastly slower disk access. I am very much looking forward to zcache.
    – Phizes
    Dec 30 '14 at 12:08

I have not personally used it, but DKMS is (to me) the most viable solution, as I was looking for the solution to a similar issue of compiling a module on kernel upgrade.

And the relevant CentOS documentation on building ones own kernel modules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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