logoalt Hacker News

mrob • today at 4:43 PM • 3 replies • view on HN

I never want to swap to disk. If I'm ever in that situation, it means I did something wrong, so I want my userspace OOM killer to trigger and inform me of my mistake immediately instead of wasting time and SSD endurance delaying the inevitable. But zram with lz4 compression is effectively free RAM in most circumstances, so there's little reason not to enable it.


Replies

quotemstr • today at 7:51 PM

You absolutely do want to swap to disk. There are lots of non-file-backed cold pages that are pointless to keep in RAM forever. You could argue that these pages shouldn't exist, but they do, so why not shove them to a disk?

➕ show 2 replies
dsp_person • today at 5:33 PM

Good point, dumping to SSD isn't ideal. I think I'm gonna start trying to set memory limits on programs with systemd-run so they can self-limit themselves.

01HNNWZ0MV43FF • today at 5:57 PM

For today's 10,000, do `sudo apt-get install earlyoom` and thank me later