Do not buy RAM, compress(curiousbits.nl)
330 points by Ecno92 10 days ago | 267 comments
tl;dr: Enabling zram memory compression on Linux can yield compression ratios around 1:3 or better, effectively extending usable RAM with minimal CPU overhead and latency. While Fedora and Pop!_OS enable it by default, Ubuntu and most other distros don't—making it a cheap alternative to buying more RAM or scaling cloud instances. The author demonstrates fitting 5.7GB of browser data into 1.7GB of actual RAM via zram swap.
HN Discussion:
  • ↑macOS has done memory compression by default for years, validating its usefulness
  • ~Zswap is a better choice than zram for most situations
  • •RAM compression won't help with already-compressed data like LLM models
  • ↑Personal success stories with zram and Fedora confirm the article's recommendation
  • ~Historical skepticism recalling RAM compression scams and nostalgic throwbacks