3 ms·
Like all things in life, it depends. If you have a truly massive server, then swap becomes infeasible, and the OOM killer is an absolute lifesaver. In fact, so
by mnw21cam 7y ago
Like all things in life, it depends. If you have a truly massive server, then swap becomes infeasible, and the OOM killer is an absolute lifesaver. In fact, so much so that you really want the OOM killer to act earlier, to prevent the system getting too low on free RAM/cache. There's a program called earlyoom that I installed on our server with 384GB of RAM - it has been useful multiple times, because it prevents the system entering the thrashing state that would make us basically email IT support and get them to press the big red button on the front.
Secondly, the thing with swappiness is that it alters the balance between stuff that is cache and stuff that is live data. But "stuff that is cache" includes your running software text, libraries, essential operating system bits, etc. If you set swappiness too low, then in a low memory situation the OS will throw away all the code that it is trying to run instead of swapping out some of the live data. That is what many people don't realise.