summaryrefslogtreecommitdiff
path: root/redis.conf
diff options
context:
space:
mode:
Diffstat (limited to 'redis.conf')
-rw-r--r--redis.conf23
1 files changed, 14 insertions, 9 deletions
diff --git a/redis.conf b/redis.conf
index dcb5f6241..b1c8e4f0c 100644
--- a/redis.conf
+++ b/redis.conf
@@ -1086,21 +1086,26 @@ lazyfree-lazy-user-del no
# for all its processes, depending on their role. The default scores will
# attempt to have background child processes killed before all others, and
# replicas killed before masters.
-
+#
+# Redis supports three options:
+#
+# no: Don't make changes to oom-score-adj (default).
+# yes: Alias to "relative" see below.
+# absolute: Values in oom-score-adj-values are written as is to the kernel.
+# relative: Values are used relative to the initial value of oom_score_adj when
+# the server starts and are then clamped to a range of -1000 to 1000.
+# Because typically the initial value is 0, they will often match the
+# absolute values.
oom-score-adj no
# When oom-score-adj is used, this directive controls the specific values used
-# for master, replica and background child processes. Values range -1000 to
-# 1000 (higher means more likely to be killed).
+# for master, replica and background child processes. Values range -2000 to
+# 2000 (higher means more likely to be killed).
#
# Unprivileged processes (not root, and without CAP_SYS_RESOURCE capabilities)
# can freely increase their value, but not decrease it below its initial
-# settings.
-#
-# Values are used relative to the initial value of oom_score_adj when the server
-# starts. Because typically the initial value is 0, they will often match the
-# absolute values.
-
+# settings. This means that setting oom-score-adj to "relative" and setting the
+# oom-score-adj-values to positive values will always succeed.
oom-score-adj-values 0 200 800