blob: d026bcf23cd7cad48fdcf71bc41e912af7e0b2d5 [file] [log] [blame] [raw]
# Out-of-memory killer adjustments file.
# Applied by /etc/init.d/vz script on start.
# One can apply it any time by running:
#
# cat /etc/vz/oom-groups.conf > /proc/vz/oom_score_adj
#
# Format of the file is four space-separated fields:
#
# command parent uid_filter adj
#
# 1 command
# A mask for matching the task command name.
# "foo" matches only "foo", "foo*" matches "foo" and "foobar",
# "*" matches any string.
#
# 2 parent
# A mask for parent task command name.
#
# 3 uid_filter
# Task uid filter:
# -1 match any task_uid
# >= 0 exact match (task_uid == oom_uid)
# < -1 match lower uids (task_uid < -oom_uid)
#
# 4 adj
# 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.
#
# Example:
# sshd init -500 -100
# A process with the name of sshd, a child of init, with uid < 500,
# can use 100 promille (10%) of container's memory without being killed
#
# NOTE that new distros adjust from inside the CT for important
# services, so this setup is only needed for old distros which are not
# OOM score adjustment aware.
# top priority system services
init init 0 -900
udevd init -500 -890
syslogd init -500 -880
rsyslogd init -500 -880
acpid init -500 -850
dbus-daemon init -500 -850
# network and sshd
dhclient init 0 -800
NetworkManager init 0 -800
sshd init 0 -800
# low priority system services
cron init 0 -700
crond init 0 -700
inetd init 0 -700
xinetd init 0 -700
# mail services
dovecot init -500 -600
sendmail init -500 -600
# various services
httpd init -500 -500
httpsd init -500 -500
apache init -500 -500
lighttpd init -500 -500
nginx init -500 -500
smbd init -500 -500
nmbd init -500 -500
mysqld init -500 -500
# Cyrus mail
cyrus-master init -500 -600
imapd cyrus-master -500 -100
pop3d cyrus-master -500 -100
# PostgreSQL
postmaster init -500 -500
postmaster postmaster -500 -100