logoalt Hacker News

speed_spread • today at 11:34 AM • 4 replies • view on HN

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.


Replies

adgjlsfhk1 • today at 6:34 PM

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 • today at 4:50 PM

Agreed. IMO, zswap is the one that requires a "highly specific reason", while zram (with lz4) should be enabled by default.

izacus • today at 3:37 PM

You seem to be fundamentally misunderstanding what zswap is and are instead griping about something unrelated.