How Do I Understand the Value of panic_on_oom?
Description
panic_on_oom controls how the system reacts when OOM occurs. When OOM occurs, the system has two choices:
- Trigger a kernel panic, during which the system may break down frequently.
- Trigger OOM killer to terminate certain processes and release the memory so that the system can be used normally.
You can run either of the following commands to view the parameter value:
cat /proc/sys/vm/panic_on_oom
sysctl -a | grep panic_on_oom
- If the value is set to 0, OOM killer is triggered when the memory is insufficient.
- If the value is set to 1, either OOM killer or kernel panic will be triggered.
- If the value is set to 2, a kernel panic will be forcibly triggered. As a result, the system restarts.
Change Description
In HCE 2.0.2503 or earlier versions, the default value of panic_on_oom is 1. In versions later than HCE 2.0.2503, the default value of panic_on_oom is 0.
After an upgrade to HCE 2.0.2503 and then a rollback to the previous version, the default value of panic_on_oom is still 0. If you need to change the value after a rollback, perform the following operations:
- Temporary configuration: The configuration takes effect immediately. However, after the system is restarted, the value changes to the default one.
- Persistent configuration: The configuration still takes effect after the system is restarted.
Add vm.panic_on_oom = 1 to the file, and then run sysctl -p or restart the system to make the configuration persistent.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot