Frequently Asked Question
What is the OOM killer and how do I tell when it strikes?
When Linux exhausts both RAM and swap and cannot satisfy a memory request, the
kernel invokes the Out-Of-Memory killer rather than letting the whole system
deadlock. The OOM killer walks every running process, calculates a "badness" score
from its size, runtime, and a tunable oom_score_adj in /proc/<PID>/, and sends
SIGKILL to whichever scores highest. The aim is to free the most memory while
sacrificing the least-important process.
The kill is silent from a user's point of view, the process just vanishes, but
the kernel always logs it. Run dmesg | grep -i "killed process" or
journalctl -k | grep -i oom to see entries like "Out of memory: Killed process
23456 (chromium)". The fix is one of: add RAM or swap, find and cap the leaking
process, or protect critical services by writing a negative value (e.g. -1000) to
their oom_score_adj, which makes the killer skip them.