From b24a61edf5f13d1c0a71d114b4704547c0b837d6 Mon Sep 17 00:00:00 2001 From: Sayan Chowdhury Date: Thu, 21 Jan 2021 15:55:53 +0530 Subject: [PATCH] sys-apps/systemd: Fix the DefaultTasksMax patch to default to 100% Signed-off-by: Sayan Chowdhury --- .../0007-core-use-max-for-DefaultTasksMax.patch | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0007-core-use-max-for-DefaultTasksMax.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0007-core-use-max-for-DefaultTasksMax.patch index 27c5147a96..f4265bb7eb 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0007-core-use-max-for-DefaultTasksMax.patch +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0007-core-use-max-for-DefaultTasksMax.patch @@ -8,24 +8,27 @@ to 512, later 15% of the system's maximum number of PIDs. This limit is low and a change in behavior that people running services in containers will hit frequently, so revert to previous behavior. --- - man/systemd-system.conf.xml | 2 +- + man/systemd-system.conf.xml | 5 +---- src/basic/cgroup-util.h | 4 ++++ src/core/system.conf.in | 2 +- - 3 files changed, 6 insertions(+), 2 deletions(-) + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml -index 0dea50f2fe..3847118881 100644 +index 0dea50f2fe..bcbed4cf59 100644 --- a/man/systemd-system.conf.xml +++ b/man/systemd-system.conf.xml -@@ -361,7 +361,7 @@ +@@ -361,10 +361,7 @@ 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. +- 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. + of slice units. Defaults to 100%. - 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. + + + diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h index bdc0d0d086..345a99aa5c 100644 --- a/src/basic/cgroup-util.h