What is the OOM killer and how does it pick a victim?
IntermediateConceptStorage & Memory
Answer
When the kernel cannot reclaim enough memory to satisfy an allocation, the OOM killer kills a process to free memory. It scores each process (/proc/<pid>/oom_score) mainly on memory footprint (RSS + swap + page tables), adjusted by oom_score_adj (-1000 to 1000). The highest score is killed with SIGKILL.
dmesg -T | grep -i 'killed process'
journalctl -k | grep -i oom
More on Storage & Memory
How do you list disks, partitions and filesystems?IntermediateMBR vs GPT partition tables?IntermediateWalk through adding a new disk and mounting it permanently.IntermediateExplain the six fields of an /etc/fstab line.IntermediateWhy use UUIDs and `nofail` in fstab?IntermediateWhat does a bad fstab entry do, and how do you recover?Advanced