April 19, 2026
Swap Wars: The RAM‑pire Strikes Back
Reminder: Enable ZRAM on your Linux system to optimize RAM usage
Swap wars erupt: Linux fans clash over zRAM vs zswap as RAM prices spike
TLDR: A Linux user urges enabling zRAM to stretch memory and avoid crashes, switching to zram-tools with faster compression while noting Raspberry Pi already uses it. Comments explode into zRAM vs. zswap arguments, with some preferring a crash over slowdown and others asking about CPU cost and real-world gains.
RAM prices are soaring, and one Linux tinkerer just reminded everyone to flip on zRAM—memory compression that squeezes more out of what you’ve got—after Firefox started crashing on a 16GB laptop. They ditched the old setup, installed zram-tools, switched to the faster zstd compression, and even stopped using the SSD swap file. Bonus: Raspberry Pi OS already has zRAM turned on by default. Sounds tidy… until the comments blew up.
Enter the Swap Wars. The loudest camp? The “let it crash” crew. One veteran bragged about swapping to a graphics card back in 2007, then dropped the firebomb: it’s “better to have fast OOM” (out-of-memory crash) than the slow, painful “chug of death” while swapping. Others rallied behind Team zswap (a kernel feature that compresses memory before it hits disk), with a reader linking the official zswap docs and a famed blog comparison. Meanwhile, newcomers asked the questions everyone secretly has: Does zRAM eat CPU? If you already have tons of RAM, do you even need it? And is mapping temporary files to zRAM a clever speed hack—or chaos?
The vibe: nostalgic sysadmins vs. pragmatic tuners vs. curious casuals. Memes flew about “Firefox eating RAM like it’s brunch” and “Raspberry Pi punching above its weight.” The only consensus? Everyone’s memory is stressed—and opinions even more so.
Key Points
- •The author recommends enabling ZRAM on Linux to improve memory utilization and avoid upgrading RAM, especially amid high memory prices.
- •On Ubuntu 24.04, the author replaced the older zram-config package with zram-tools and switched ZRAM compression from lzo-rle to zstd.
- •Steps include disabling swap, resetting and unloading the zram module, purging zram-config, installing zram-tools, editing /etc/default/zramswap, and restarting the service.
- •Post-configuration checks showed ZRAM active and the NVMe SSD swapfile unused; verification was done with zramctl and swapon.
- •Raspberry Pi OS enables ZRAM by default on Raspberry Pi 5 (2GB RAM), with rpi-swap configuration in /etc/rpi/swap.conf; users of other SBC OSs should check ZRAM or zswap is enabled.