From 8e74bf7f9c9f0e46066590603c3a7d1e04dbe6c4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 19 Mar 2019 19:54:08 +0100 Subject: [PATCH] man: document new OOMPolicy= setting --- man/systemd-system.conf.xml | 11 +++++++++++ man/systemd.exec.xml | 16 +++++++++++----- man/systemd.service.xml | 23 +++++++++++++++++++++++ 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml index d23b3fb45d..5d1e4d1b97 100644 --- a/man/systemd-system.conf.xml +++ b/man/systemd-system.conf.xml @@ -364,6 +364,17 @@ limits are only defaults for units, they are not applied to PID 1 itself. + + + DefaultOOMPolicy= + + Configure the default policy for reacting to processes being killed by the Linux + Out-Of-Memory (OOM) killer. This may be used to pick a global default for the per-unit + OOMPolicy= setting. See + systemd.service5 + for details. Note that this default is not used for services that have Delegate= + turned on. + diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index 688147ea32..df1e1e8681 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -651,11 +651,17 @@ CapabilityBoundingSet=~CAP_B CAP_C OOMScoreAdjust= - Sets the adjustment level for the Out-Of-Memory killer for executed processes. Takes an integer - between -1000 (to disable OOM killing for this process) and 1000 (to make killing of this process under memory - pressure very likely). See proc.txt for - details. + Sets the adjustment value for the Linux kernel's Out-Of-Memory (OOM) killer score for + executed processes. Takes an integer between -1000 (to disable OOM killing of processes of this unit) + and 1000 (to make killing of processes of this unit under memory pressure very likely). See proc.txt for details. If + not specified defaults to the OOM score adjustment level of the service manager itself, which is + normally at 0. + + Use the OOMPolicy= setting of service units to configure how the service + manager shall react to the kernel OOM killer terminating a process of the service. See + systemd.service5 + for details. diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 5b88417530..1f40c2ff37 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -963,6 +963,29 @@ above. + + OOMPolicy= + + Configure the Out-Of-Memory (OOM) killer policy. On Linux, when memory becomes scarce + the kernel might decide to kill a running process in order to free up memory and reduce memory + pressure. This setting takes one of continue, stop or + kill. If set to continue and a process of the service is + killed by the kernel's OOM killer this is logged but the service continues running. If set to + stop the event is logged but the service is terminated cleanly by the service + manager. If set to kill and one of the service's processes is killed by the OOM + killer the kernel is instructed to kill all remaining processes of the service, too. Defaults to the + setting DefaultOOMPolicy= in + system.conf5 is + set to, except for services where Delegate= is turned on, where it defaults to + continue. + + Use the OOMScoreAdjust= setting to configure whether processes of the unit + shall be considered preferred or less preferred candidates for process termination by the Linux OOM + killer logic. See + systemd.exec5 for + details. + + Check -- 2.25.1