Compressed Memory

If you're like me and you made the terrible decision of buying a laptop with 8GB of memory then this is for you. Install zswap. Heavily inspired (stolen) from Peter Roberts article.

First, grab the systemd package for using and configuring zswap

sudo pacman -S systemd-swap

Enable 300% compression over the default 200%

sudo sh -c 'echo -n zswap_zpool=z3fold > /etc/systemd/swap.conf.d/zswap.conf'

Enable the service at boot and start it immediately

sudo systemctl enable --now systemd-swap

Check that the settings have applied correctly, see this article for more.

sudo grep -R . /sys/module/zswap/parameters

Check what zswap is doing with your memory

sudo grep -R . /sys/kernel/debug/zswap

Content properties

  • Type: Note
  • Category: Arch Linux
  • Tags: linux
  • Custom slug: None

This is a preview of a simpler page design that I'm working on over the next little bit. I've finally added a (click it!) but there's still a few pages left to be converted so don't worry if things don't look quite right just yet 🙏

Content on blog pages use the CC-BY-SA license. The source code and notes use the MIT license. Unsure? Mention me on Mastodon.