Reminder: enable ZRAM on your Linux system to optimize RAM usage

April 19, 2026
Woman in office workspace using a computer focused on work tasks.
Photo by EqualStock IN on Pexels

What happened

It has been reported that Linux users should consider enabling ZRAM to squeeze more life out of existing memory and potentially avoid pricey upgrades. Jean‑Luc Aufranc at CNXSoft recounts a frustrating episode: Firefox kept crashing on his 16 GB Ubuntu laptop, and the recent Linux 7.0 changes nudged him to revisit ZRAM. Short version: ZRAM can act like a fast, compressed swap area in RAM, and when set up with a modern compressor it can keep apps running instead of stalling or hitting slow SSD swap.

How he did it

Aufranc swapped out the older zram-config for zram-tools, switched the compression algorithm to zstd, and raised zram’s memory allocation to 75% of RAM with a high swap priority. He verified kernel support via /sys/block/zram0/comp_algorithm, restarted zramswap.service, and saw the zram device move from lzo to zstd and grow in apparent size — the system stopped using the NVMe swapfile and relied on the zram partition instead. Numbers from his tests: before, zram used lzo with an 7.6G disk size alongside an 8G swapfile; after, zram reported zstd with ~11.4G and the SSD swap was unused. Simple commands, but the payoff was immediate: fewer crashes, more available memory.

Why it matters

Why care? Because RAM prices aren’t getting cheaper and small single‑board computers — Raspberry Pi 5 with 2 GB, anyone? — benefit hugely from efficient memory use. ZRAM is not magic, and you should check kernel compression support and monitor behavior; but for many workloads it’s an easy, low‑risk tweak that reduces SSD wear and keeps systems snappier. Curious? Try it on a test machine first. If it crashes your workflow, you can always roll back — no drama, just smarter memory use.

Sources: cnx-software.com, Hacker News