← Thu, Nov 19 digest

Do not buy RAM, compress

read article ↗ hn thread ↗

Enabling zram or zswap memory compression on Linux distributions dramatically increases effective RAM capacity, avoiding costly hardware upgrades.

summary is enough The article gives a quick overview of Linux memory compression, while the comment thread provides crucial nuance comparing zram and zswap.

summary

Rising workstation workloads and expensive hardware make buying physical RAM difficult, but OS-level memory compression offers a viable workaround. While operating systems like macOS and Windows enable compression by default, many Linux distributions leave it disabled. A quick test opening dozens of browser tabs demonstrates compression ratios over 3:1 using zram. Commenters expand on this by debating the performance trade-offs of zram versus zswap and discussing kernel-level mechanics.

key points

  1. Memory compression tools like zram and zswap achieve practical compression ratios around 3:1 to 4:1 for typical workstation loads.
  2. Major operating systems like macOS, Windows, and Android enable memory compression by default, unlike many desktop Linux distributions.
  3. Commenters heavily debate zram versus zswap, noting zswap allows spilling to disk and better integration with swap subsystems.

who should read it

Linux desktop users and engineers looking to maximize memory efficiency without hardware upgrades.

discussion warm

consensus

Commenters overwhelmingly agree that memory compression is a massive win for modern systems, with many surprised it is not enabled by default on all Linux distributions.

pushback

Some technical pushback argues that zswap is superior to zram because it can spill pages to disk and offers better integration with system swap mechanisms.

best comment by cogman10 ↗

Don't use Zram, use Zswap. Especially if you want to swap to disk.

https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-...

It redirects users from zram to zswap with a detailed technical breakdown of when to choose each approach.

Generated by an LLM from the article and thread. Check the sources before relying on it.