[baseimage] kernel oom-killer to panic when the system is truly out of memory (#2988)
- What I did Currently when the system is under memory pressure, the OOM killer kicks in and kills a rogue process. Killing a rogue process can cause the device to be un-healthy leading to blackholing of the traffic. To avoid this, configure the OOM to do a kernel panic which will cause the device to reboot and come back up healthy. - How I did it Added the sysctl variable panic_on_oom and set the value to 2. Setting it to 2 will ensure OOM killer to always do a kernel panic.
This commit is contained in:
parent
231d309b69
commit
0f665bdd06
@ -319,6 +319,7 @@ set /files/etc/sysctl.conf/kernel.core_pattern '|/usr/bin/coredump-compress %e %
|
|||||||
|
|
||||||
set /files/etc/sysctl.conf/kernel.softlockup_panic 1
|
set /files/etc/sysctl.conf/kernel.softlockup_panic 1
|
||||||
set /files/etc/sysctl.conf/kernel.panic 10
|
set /files/etc/sysctl.conf/kernel.panic 10
|
||||||
|
set /files/etc/sysctl.conf/vm.panic_on_oom 2
|
||||||
set /files/etc/sysctl.conf/fs.suid_dumpable 2
|
set /files/etc/sysctl.conf/fs.suid_dumpable 2
|
||||||
|
|
||||||
set /files/etc/sysctl.conf/net.ipv4.conf.default.forwarding 1
|
set /files/etc/sysctl.conf/net.ipv4.conf.default.forwarding 1
|
||||||
|
Loading…
Reference in New Issue
Block a user