Grading Checklist¶
- Correctly reads and interprets the OOM killer dmesg output (process name, RSS, oom_score).
- Identifies that -Xmx12g on a 16 GB system leaves insufficient memory for the OS, JVM metaspace, native memory, and other processes.
- Explains that JVM total memory = heap + metaspace + thread stacks + native memory + code cache, which can exceed -Xmx significantly.
- Recommends reducing -Xmx to leave adequate headroom (e.g., -Xmx10g for a 16 GB system).
- Mentions checking
/proc/meminfofor the memory state and available memory. - Suggests investigating whether the application has a memory leak using heap dumps or native memory tracking (
-XX:NativeMemoryTracking). - Discusses cgroup memory limits as an alternative or complement to relying on system OOM killer.
- Explains oom_score_adj and how to protect critical processes from being OOM-killed.
- Notes that swap being disabled makes OOM kills more likely and more sudden.
- Recommends setting up monitoring alerts on memory usage before it reaches critical levels.
- Mentions using
journalctl -kordmesg -Tfor human-readable timestamps on OOM events.