From 9c587d66187976de49e2d2028cebe1aef5b77b9c Mon Sep 17 00:00:00 2001 From: Einsler Lee Date: Sat, 30 Jan 2021 11:14:35 +0800 Subject: [PATCH] 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. --- man/systemd-system.conf.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. -- 2.47.3