summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2022-03-11 11:22:37 -0500
committerGitHub <noreply@github.com>2022-03-11 18:22:37 +0200
commit8c8350371300d8fcafd794f1697bf22b83214120 (patch)
treeac8ec374e674aa67f73b023abae69f0d23509757 /system
parent5fdcd854ec809079a59173d1d13ea28eb7fb92e6 (diff)
Change default OOM score and scheduling policy to behave more sanely. (#12271)
Diffstat (limited to 'system')
-rw-r--r--system/netdata.service.in10
-rw-r--r--system/netdata.service.v235.in10
2 files changed, 4 insertions, 16 deletions
diff --git a/system/netdata.service.in b/system/netdata.service.in
index a34ea61dd0..1683a0a091 100644
--- a/system/netdata.service.in
+++ b/system/netdata.service.in
@@ -26,22 +26,16 @@ TimeoutStopSec=150
Restart=on-failure
RestartSec=30
-# The minimum netdata Out-Of-Memory (OOM) score.
-# netdata (via [global].OOM score in netdata.conf) can only increase the value set here.
-# To decrease it, set the minimum here and set the same or a higher value in netdata.conf.
-# Valid values: -1000 (never kill netdata) to 1000 (always kill netdata).
-OOMScoreAdjust=1000
-
# Valid policies: other (the system default) | batch | idle | fifo | rr
# To give netdata the max priority, set CPUSchedulingPolicy=rr and CPUSchedulingPriority=99
-CPUSchedulingPolicy=idle
+CPUSchedulingPolicy=batch
# This sets the scheduling priority (for policies: rr and fifo).
# Priority gets values 1 (lowest) to 99 (highest).
#CPUSchedulingPriority=1
# For scheduling policy 'other' and 'batch', this sets the lowest niceness of netdata (-20 highest to 19 lowest).
-#Nice=0
+Nice=0
# Capabilities
# is required for freeipmi and slabinfo plugins
diff --git a/system/netdata.service.v235.in b/system/netdata.service.v235.in
index 664c583f3a..dfdf88b693 100644
--- a/system/netdata.service.v235.in
+++ b/system/netdata.service.v235.in
@@ -27,22 +27,16 @@ TimeoutStopSec=150
Restart=on-failure
RestartSec=30
-# The minimum netdata Out-Of-Memory (OOM) score.
-# netdata (via [global].OOM score in netdata.conf) can only increase the value set here.
-# To decrease it, set the minimum here and set the same or a higher value in netdata.conf.
-# Valid values: -1000 (never kill netdata) to 1000 (always kill netdata).
-OOMScoreAdjust=1000
-
# Valid policies: other (the system default) | batch | idle | fifo | rr
# To give netdata the max priority, set CPUSchedulingPolicy=rr and CPUSchedulingPriority=99
-CPUSchedulingPolicy=idle
+CPUSchedulingPolicy=batch
# This sets the scheduling priority (for policies: rr and fifo).
# Priority gets values 1 (lowest) to 99 (highest).
#CPUSchedulingPriority=1
# For scheduling policy 'other' and 'batch', this sets the lowest niceness of netdata (-20 highest to 19 lowest).
-#Nice=0
+Nice=0
[Install]
WantedBy=multi-user.target