Hjälpcentral

Disabling OOM Killer (CloudLinux 6 & 7)

Disabling the Out Of Memory (OOM) Killer is a sensitive operation that should be approached with caution. The OOM Killer is an important safety mechanism that helps prevent a system from becoming unresponsive due to memory exhaustion.

If you're considering disabling the OOM Killer, it's crucial to have a thorough understanding of your system's memory requirements and to have implemented other mechanisms for managing memory usage.

In CloudLinux 6 and 7, you can disable the OOM Killer using the following steps:

  1. Edit the GRUB Configuration:

    Open the GRUB configuration file in a text editor. This file usually resides at /etc/default/grub.

  • sudo nano /etc/default/grub
  • Modify the GRUB_CMDLINE_LINUX Parameter:

    Find the line starting with GRUB_CMDLINE_LINUX and append oom_kill_disable to the list of kernel parameters. This parameter disables the OOM Killer.

    For example, if your original line looked like this:

GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rhgb quiet"

It should be modified to:

 
  • GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rhgb quiet oom_kill_disable"
  • Update GRUB Configuration:

    After saving the file, you need to update the GRUB configuration.

    bash
  • sudo grub2-mkconfig -o /boot/grub2/grub.cfg

    For older CloudLinux versions or different setups, you might use grub2-mkconfig -o /boot/grub/grub.cfg instead.

  • Reboot:

    Reboot your system for the changes to take effect.

     
  1. sudo reboot

Remember, disabling the OOM Killer can lead to system instability if your applications or services frequently consume large amounts of memory. It's crucial to have alternative memory management strategies in place and to monitor memory usage closely.

Additionally, it's recommended to keep a record of this change and periodically review your system's performance to ensure it's still operating within acceptable parameters. If you face any issues after making this change, you may want to re-enable the OOM Killer and consider alternative approaches to managing memory.

  • 0 användare blev hjälpta av detta svar
Hjälpte svaret dig?