The Linux CVM does not run out of memory and triggers OOM (Out of Memory) as shown below:
This issue may be caused by the min_free_kbytes
configuration. It specifies the minimum idle memory of the Linux system (in kilobytes). When the system’s available memory goes below the set value of min_free_kbytes
, the system will invoke oom-killer or forcibly restart depending on the vm.panic_on_oom
kernel parameter:
vm.panic_on_oom=0
is set, the system prompts OOM and invokes oom-killer to kill the process using the most memory.vm.panic_on_oom =1
is set, the system will restart automatically.min_free_kbytes
configuration.min_free_kbytes
configuration.sysctl -a | grep min_free
The min_free_kbytes
value is in kbytes. For example, the min_free_kbytes = 1024000
shown below is 1 GB.
4. Run the following command to open the /etc/sysctl.conf
configuration file with VIM editor.
vim /etc/sysctl.conf
vm.min_free_kbytes
configuration item.
Note:We recommend changing the
vm.min_free_kbytes
value to no more than 1% of the total memory.
sysctl -p
Was this page helpful?