From: Einsler Lee Date: Sat, 30 Jan 2021 03:14:35 +0000 (+0800) Subject: man: make it clear how systemd calculate the DefaultTasksMax. X-Git-Tag: v248-rc1~234 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c587d66187976de49e2d2028cebe1aef5b77b9c;p=thirdparty%2Fsystemd.git man: make it clear how systemd calculate the DefaultTasksMax. Actually, systemd takes the minimum of * a) the maximum tasks value the kernel allows on this architecture * b) the cgroups pids_max attribute for the system * c) the kernel's configured maximum PID value to calculate the DefaultTasksMax. Here, kernel.thread-max should also be methioned. --- diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml index 0dea50f2fe8..075666ac6b0 100644 --- a/man/systemd-system.conf.xml +++ b/man/systemd-system.conf.xml @@ -361,7 +361,8 @@ Configure the default value for the per-unit TasksMax= setting. See systemd.resource-control5 for details. This setting applies to all unit types that support resource control settings, with the exception - of slice units. Defaults to 15% of the sysctl setting kernel.pid_max= or root cgroup pids.max. + of slice units. Defaults to 15% of the minimum of kernel.pid_max=, kernel.threads-max= + and root cgroup pids.max. Kernel has a default value for kernel.pid_max= and an algorithm of counting in case of more than 32 cores. For example with the default kernel.pid_max=, DefaultTasksMax= defaults to 4915, but might be greater in other systems or smaller in OS containers.