Top
Best
New

Posted by Ecno92 12 hours ago

Do not buy RAM, compress(curiousbits.nl)
203 points | 170 commentspage 6
mzhaase 10 hours ago|
Zram vs Zswap: https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-...

> If in doubt, prefer to use zswap. Only use zram if you have a highly specific reason to.

> In terms of architecture:

> zswap sits in front of your disk swap, compresses pages in RAM, and automatically tiers cold data to disk. It integrates directly with the kernel's memory management and distributes pressure gracefully.

> zram is a compressed RAM block device with a hard capacity limit. When you put swap on it and it fills up, there is no automatic eviction, and the kernel has very little leverage to do anything about the situation. The system either OOMs or falls back to lower-priority swap, causing LRU inversion (see below). It only really makes sense for extremely memory-constrained embedded systems, diskless setups, or cases with specific security requirements around keeping private data off persistent storage. Swap on zram is also increasingly unsupported upstream.

keybored 9 hours ago||
I enjoyed that Zram article a lot way back when.

( https://news.ycombinator.com/item?id=47500746 )

It’s long and more satisfying than this In These AI Times wrapper.

speed_spread 9 hours ago||
What if I loathe swap? The I/O hit of hitting swap, even with SSD, always mean a severely degraded desktop experience. I often end up closing applications to free up RAM or would just order more RAM back when it didn't involve taking a third mortgage.

I would rather have the system tell me there's not enough memory than try to pretend there's an infinite amount of it and then slow to a crawl without apparent reason. Unix memory allocation is daft. Desktop swap to block never worked, never will.

adgjlsfhk1 2 hours ago|||
You still want swap, The part you're missing is a good oom strategy. Your system slowing a ton has to do with needing to access swapped memory. Swap is still very useful when you have background tasks that aren't running, but are still using a bunch of RAM. The trick is that if you suddenly start reading a lot of that data repeatedly while being in that sate, you need to oom something quickly.
mrob 4 hours ago||||
Agreed. IMO, zswap is the one that requires a "highly specific reason", while zram (with lz4) should be enabled by default.
izacus 5 hours ago|||
You seem to be fundamentally misunderstanding what zswap is and are instead griping about something unrelated.
ejazarain 9 hours ago||
[flagged]
messe 11 hours ago||
Use zswap not zram if you have a backing device:

https://linuxblog.io/zswap-better-than-zram/

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

VCFundedGenYer 6 hours ago|
[dead]