logoalt Hacker News

dlt713705today at 12:50 AM3 repliesview on HN

Does anyone these days really use swap for anything than S4 suspend ?


Replies

kccqzytoday at 12:54 AM

https://news.ycombinator.com/item?id=40697318

This HN comment and the linked post brought up a lot of good points. The main takeaway is that swap should primarily be considered a mechanism for equality of reclamation, not for emergency extra memory, where equality of reclamation means file-backed pages and anonymous pages are subject to similar criteria for being evicted from physical memory.

I used to have zero swap on my Linux desktop and this convinced me to add at least a small swap partition.

show 2 replies
Saristoday at 1:40 AM

It's useful on lower RAM systems as the least frequently used memory can be moved to swap, freeing up more RAM for stuff that needs it. Even when using zram it works out pretty well on my laptop with 8GB of RAM, it'll often have 4GB+ in zram swap space compressed down to only 1GB or so of physical RAM usage.

yjftsjthsd-htoday at 12:56 AM

It really depends on what you run and how much RAM you have to do it in. I run some machines into swap just by running a couple browsers and some containers in the background on a 16GB laptop. I've also run a single light browser and essentially nothing else on 4GB and been fine:)

show 1 reply