Home The OOM Killer: Linux's Method of Fixing Memory Problems by Murdering Processes

    The OOM Killer: Linux’s Method of Fixing Memory Problems by Murdering Processes

    0
    14
    blank

    When a Linux system runs critically low on memory, the kernel doesn’t gracefully degrade or politely ask applications to use less RAM. It invokes the Out-Of-Memory killer — a subsystem that scores every running process on a combination of memory usage, runtime, and a dash of inscrutable heuristics, then terminates the highest scorer. Administrators have returned from lunch to find their database server gone, replaced by a terse line in dmesg: Out of memory: Killed process 1847 (postgres). The OOM killer can be tuned, and processes can be made more or less killable, but the tuning is arcane enough that most people leave it alone and simply add more RAM. This is, some suspect, the intended outcome.