In Linux systems, MySQL generally has a concept called Out of Memory killer OOM controlled by the kernel. This is to prevent the possible runaway process in OS to avoid race conditions and a server crash.
Since MySQL and its optimized memory buffers are memory hogs, the OS may often kill the mysqld process to avert a system-wide crash if not adjusted.
We can control how much memory MySQL should allocate from the operating system.
Still, if OOM kicks in, it’s possible to configure on system level or altogether disable it.
$ pidof mysqld
35043
$ sudo cat /proc/35043/oom_score
34
$ sudo echo -100 > /proc/34643/oom_score_adj
$ sudo cat /proc/24643/oom_score
0
No comments:
Post a Comment
If you have any doubt or question, please contact us.