Stayin’ alive – the OOM killer
Now that we’ve covered background details regarding kernel memory management, particularly the reclaiming of free memory, you’re well placed to understand what the Out of Memory (OOM) killer kernel component is, how to work with it, even how to deliberately invoke it and, to an extent, control it.
Let’s revisit a key point, that of memory (RAM and swap) running short. Let’s play devil’s advocate: what if RAM runs low and all this memory reclamation work (which we just covered in the previous section) simply doesn’t help, and memory pressure keeps increasing to the point where the complete memory pyramid is exhausted, where a kernel allocation of even a few pages fails (or infinitely retries, which, frankly, is just as useless, perhaps worse)? In other words, what if all CPU caches, RAM, and swap are (almost completely) full!? Well, most systems just die at this point (actually, they don’...