Issue
When LVE reaches its memory limit, the processes inside that LVE are killed by OOM Killer and an appropriate message is written to the /var/log/messages.
When any LVE hits a huge number of memory limits in a short period of time, OOM Killer could cause system overload. In CloudLinux OS 6 and CloudLinux OS 7, OOM Killer could be disabled to replace it with a more lightweight SIGKILL.
Environment
- CloudLinux OS 6
- CloudLinux OS 7
- LVE
- OOM Killer
Solution
For CloudLinux OS Shared 6 run the following command:
# echo 1 > /proc/sys/ubc/ubc_oom_disable
Also, add the following to /etc/sysctl.conf file to apply the same during boot:
ubc.ubc_oom_disable=1
For CloudLinux OS Shared 7 run the following command:
# echo 1 > /proc/sys/kernel/memcg_oom_disable
Also, add the following to the /etc/sysctl.conf file to apply the same during boot:
kernel.memcg_oom_disable=1
Note: OOM killer switch disables OOM killer for processes inside LVE only, it is not affecting any other non-LVE processes.
In the logs, such records would look like: kernel: try_charge: task <PROCESSNAME> is about to be killed due to oom
it means that the process would be killed by OOM, but instead it was just terminated, as configured.
Useful links
https://docs.cloudlinux.com/shared/cloudlinux_os_kernel/#oom-killer-for-lve-processes
Comments
0 comments
Please sign in to leave a comment.