4 ms·
I've seen so many good reasons to leave it enabled, and they're correct and well reasoned and many times I agree, enable swap ... ... but on my personal comput
by Groxx 2y ago
I've seen so many good reasons to leave it enabled, and they're correct and well reasoned and many times I agree, enable swap ...
... but on my personal computer I'm not optimizing for long term stability or aggregate behavior. I'm optimizing for "it is fast when I use it, or it throws identifiable issues I can fix to get back to fast".
In that context, most software I use does not thrash with no swap (definitely not all! Java is particularly thrashy). It simply runs fine until it OOMs, which I can immediately see and address (and go kill a Docker I forgot about, 95% of the time).
I've gone back and forth quite a few times, and no-swap consistently gets me MUCH closer to the behavior I want. I enable it and occasionally I get thrashing that takes time to notice, fight with slow UI, and fix, which I very much dislike while I'm doing all this. I disable it and I get crashes, say "oh right" and fix it without losing my focus, and almost never get visible slowdown.
It's not just "emergency memory", there are definitely benefits I'm losing by doing this. But "emergency memory" is something it allows, and avoiding that behavior is worth losing everything else for what I want.