Skip to main content
>_ supraj.dev
TOPIC LINUX
Memory & Swap what 'out of memory' means
IN 10 SECONDS

RAM holds active process data. When RAM is full, the OS swaps idle pages to a dedicated disk partition (Swap). If both run out, the OOM Killer terminates processes to save the system.

GOTCHA Swap prevents crashes but degrades database and application performance by substituting fast RAM with slow disk operations.
HOW AN OOM EVENT OCCURS
01 Allocation request a process requests memory from the kernel.
02 Swap eviction kernel moves idle pages to Swap disk to free up RAM.
03 Exhaustion RAM and Swap space both reach 100% capacity.
04 OOM Killer kernel selects a high-resource consumer process and kills it with SIGKILL.
POKE IT YOURSELF
free -m — display free and used RAM/Swap in Megabytes
dmesg | grep -i oom — check if the kernel killed any process due to OOM