How to configure zram in Manjaro?

Ubuntu features a package zram-config which installs and auto-configures zram. The logic it uses is:

  • Dedicate 50% of physical ram for zwap
  • Number of zram volumes matches the number of CPU cores.

So if you have a dual-core laptop with 4GB of RAM, the zram-config will give you 2x1GB zram volumes. This, for me at least, too much. And thats for Ubuntu, not Manjaro.

What I would like to configure in Manjaro is dedicating 512MB of ram for zram, split to two partitions = 2x256MB (dual core computer). Zram provides roughly 3:1 compression, so this approach would give ~1GB of extra headroom, before swapping to the HD/SSD. On the other hand, with 3.5GB of available RAM for the OS, it would still be unlikely swap at all in casual use.

I am yet find a human readable guide on configuring zram - perhaps someone here could help, please?

Hi. I used this archwiki to setup zram and zswap.
It was not too hard. There is a reference what package to install for systemd and what config file to edit.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by