From b2d0c171a9ef84fb8ab8d8a428a8f51db37f58ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 13 Dec 2022 15:25:55 +0100 Subject: [PATCH] man: rework description of OOMPolicy= a bit One had to read to the very end of the long description to notice that the setting is actually primarily intended for oomd. So let's mention oomd right at the beginning. (cherry picked from commit 100d37d4f3111a97f51e37b51eea9243cb037b61) Resolves: #2175619 --- man/systemd.service.xml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 8d8dd77689..cae520ceab 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -1123,17 +1123,18 @@ OOMPolicy= - Configure the out-of-memory (OOM) kernel killer policy. Note that the userspace OOM + Configure the out-of-memory (OOM) killing policy for the kernel and the userspace OOM killer - systemd-oomd.service8 - is a more flexible solution that aims to prevent out-of-memory situations for the userspace, not just - the kernel. - - On Linux, when memory becomes scarce to the point that the kernel has trouble allocating memory - for itself, it 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 + systemd-oomd.service8. + On Linux, when memory becomes scarce to the point that the kernel has trouble allocating memory for + itself, it might decide to kill a running process in order to free up memory and reduce memory + pressure. Note that systemd-oomd.service is a more flexible solution that aims + to prevent out-of-memory situations for the userspace too, not just the kernel, by attempting to + terminate services earlier, before the kernel would have to act. + + 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 + killed by the 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, by setting the