[Users] OOM and /etc/vz/oom-groups.conf

Roman Haefeli reduzent at gmail.com
Tue Oct 1 15:25:58 PDT 2013


It's strongly advised to report the exact kernel version along with a
problem report. It's not unlikely your problem is specific to the kernel
version, especially if you use an OpenVZ kernel from Debian Squeeze.

Roman

On Tue, 2013-10-01 at 14:45 -0400, Mark J. wrote:
> Hello,
> 
> I have been trying to tweak the OOM killer to prevent some database corruption thats been happening in the VM's when the oom killer kills off mysql. Based on what i have read online and in the conf file itself I am a bit confused on why its not killing other things off before mysql.
> 
> Based on the following (taken directly form the conf file):
> 
> OOM-score adjustment, a number from -1000 to 1000. A positive number increases the chances of killing, while a negative number decreases it (more protection). -1000 makes a process unkillable till any other process exists.
> 
> I made the following changes to the conf file:
> 
> mysqld          init            -500    -1000
> httpd           init            -500    100
> httpsd          init            -500    100
> apache          init            -500    100
> php             init            -500    100
> 
> 
> Saved and then made the changes live:
> 
> cat /etc/vz/oom-groups.conf > /proc/vz/oom_score_adj
> 
> 
> Verified the changes were in fact live:
> 
> root ~ #cat /proc/vz/oom_score_adj | grep mysql
> mysqld init -500 -1000
> root ~ #cat /proc/vz/oom_score_adj | grep http
> httpd init -500 100
> httpsd init -500 100
> 
> 
> However I am still watching mysql get killed off before anything else:
> 
> Oct  1 14:38:18 server kernel: [2456651.082410] >>> 3679 oom generation 62 starts
> Oct  1 14:38:18 server kernel: [2456651.082418] 133199 (mysqld) invoked loc oom-killer: gfp 0x200da order 0 oomkilladj=0
> Oct  1 14:38:18 server kernel: [2456651.084483] Out of memory in UB: Kill process 126607 (mysqld) score -903 or sacrifice child
> Oct  1 14:38:18 server kernel: [2456651.084772] OOM killed process 126607 (mysqld) vm:3829812kB, rss:166344kB, swap:36760kB
> Oct  1 14:38:18 server kernel: [2456651.115460] OOM killed process mysqld (pid=157305, ve=3679) exited, free=519316.
> Oct  1 14:38:18 server kernel: [2456651.115465] <<< 3679 oom generation 62 ends (task died)
> 
> Anyone have any suggestions or been able to make these adjustments that worked? Any help would be of great assistance.
> _______________________________________________
> Users mailing list
> Users at openvz.org
> https://lists.openvz.org/mailman/listinfo/users




More information about the Users mailing list