3 ms·
I’ve seen a sentiment expressed widely that disabling swap enables their machines to fail fast when the workload runs out of memory. I would be partial to such
by qazxcvbnm 2y ago
I’ve seen a sentiment expressed widely that disabling swap enables their machines to fail fast when the workload runs out of memory. I would be partial to such behaviour as well, but in my experience, without swap, I’ve more often seen systems run into livelock with the OOM killer unbearably slow in reaping its victims meanwhile I cannot ssh in nor view logs, and that such situations basically disappear on systems where I do have swap enabled.
Of course, with or without swap, I can manually obtain the fail-fast behaviour by using systemd-oomd, oomd, early-oom, but I wonder why the reputation of swap differs so from my experience (for context, I’ve mostly run systems for small medium businesses and machines mostly under twenty gigabytes of RAM).
- blueflow 2y agoThis is the problem i explained in my other post: https://news.ycombinator.com/item?id=40697479 https://news.ycombinator.com/item?id=40697479 Enabling swap also solved the problem for me.