OOM killer とは?
OOM killer とは、メモリが枯渇し他に手段がないときに、メモリを解放するためにプロセスを選んで kill する Linux カーネルの一部です。候補となるプロセスをそのメモリ使用量やその他のヒューリスティックで採点し、犠牲となるものを選びます。kill されたプロセスは単に消え去り、多くの場合それ自身のログにはほとんど警告が残りません。
なぜ重要か
Latchkey の runner やその他の CI マシンでは、利用可能なメモリを超える build はしばしば OOM killer によって終了させられ、突然の説明のつかない kill として現れます。カーネルログで OOM イベントを確認することが、コードではなくメモリが失敗の原因だったと確認する方法です。
関連ガイド
What Is Cgroup Resource Control?Cgroup resource control uses Linux control groups to limit and account for the CPU, memory, and IO that a gro…
What Is Swap Space?Swap space is disk storage the kernel uses to hold memory pages evicted from physical RAM, letting a system r…
What Is the Kernel Ring Buffer?The kernel ring buffer is an in-memory log of recent kernel messages, viewed with dmesg, that records events…