Load: Difference between revisions
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
[[MySQL#Performance_Tuning | MySQL Performance Tuning]] | [[MySQL#Performance_Tuning | MySQL Performance Tuning]] | ||
== OOM Killer == | |||
OOM Killer kills the process with the highest memory usage to prevent the system from running out of memory. It often triggers due to memory load. | |||
=== Prevent OOM Killer from killing MySQL === | |||
You can create a cron job to keep the PID for MySQL updated in the OOM Killer exclusion list: | |||
<code>*/1 * * * * root pgrep -f "/usr/bin/mysql" | while read PID; do echo -1000 > /proc/$PID/oom_score_adj; done</code> | |||
== References == | |||
<ul> | |||
<li>[https://backdrift.org/oom-killer-how-to-create-oom-exclusions-in-linux Backdrift.org - OOM Killer exclusions]</li> | |||
</ul> |
Latest revision as of 17:09, 14 August 2017
MySQL
OOM Killer
OOM Killer kills the process with the highest memory usage to prevent the system from running out of memory. It often triggers due to memory load.
Prevent OOM Killer from killing MySQL
You can create a cron job to keep the PID for MySQL updated in the OOM Killer exclusion list:
*/1 * * * * root pgrep -f "/usr/bin/mysql" | while read PID; do echo -1000 > /proc/$PID/oom_score_adj; done