vm.panic_on_oom=2

8 views
Skip to first unread message

Zachary Newell US

unread,
Feb 4, 2026, 8:28:33 PM (8 days ago) Feb 4
to sonicproject
What is the reasoning and advantage of "vm.panic_on_oom=2"?
https://github.com/sonic-net/sonic-buildimage/blob/730f65623d6d9ab1fe1a5b316a8bd8d77f4fd22e/files/image_config/sysctl/90-sonic.conf#L52

If the oom_killer is invoked, even within a container, this will force a reboot. Wouldn't it be much better to set limits via systemd units or docker cgroups? If a systemd process exceeds its memory allocation, only one service will be killed and restarted.

If a service is critical and should panic if it fails, wouldn't it be better to use OnFailure=reboot.sh just for those services?

Best regards,
Zach N.
Reply all
Reply to author
Forward
0 new messages