From 14736ab6ff1744b3750b5b56ce7ecf40f6422e82 Mon Sep 17 00:00:00 2001 From: Jakob Lell Date: Sun, 1 May 2022 22:52:39 +0200 Subject: [PATCH] Amend documentation for LimitNPROC= --- man/systemd.exec.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index 7fe54169b2..50c5c89703 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -846,6 +846,14 @@ CapabilityBoundingSet=~CAP_B CAP_C runtime, and are generally more expressive. For example, MemoryMax= is a more powerful (and working) replacement for LimitRSS=. + Note that LimitNPROC= will limit the number of processes from one (real) UID and + not the number of processes started (forked) by the service. Therefore the limit is cumulative for all + processes running under the same UID. Please also note that the LimitNPROC= will not be + enforced if the service is running as root (and not dropping privileges). Due to these limitations, + TasksMax= (see systemd.resource-control + 5) is typically a better choice than LimitNPROC=. + + Resource limits not configured explicitly for a unit default to the value configured in the various DefaultLimitCPU=, DefaultLimitFSIZE=, … options available in systemd-system.conf5, and –