teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0003-pid1-bump-DefaultTasksMax-to-80-of-the-kernel-pid.ma.patch

ff6046
From b924c79720cc2bf2edf75fa3ff43bb4954fccf1f Mon Sep 17 00:00:00 2001
ff6046
From: rpm-build <rpm-build>
ff6046
Date: Wed, 1 Aug 2018 13:19:39 +0200
ff6046
Subject: [PATCH] pid1: bump DefaultTasksMax to 80% of the kernel pid.max value
ff6046
ff6046
This should be hopefully high enough even for the very big deployments.
ff6046
ff6046
Resolves: #1523236
ff6046
---
ff6046
 man/systemd-system.conf.xml | 2 +-
ff6046
 src/basic/cgroup-util.h     | 2 +-
ff6046
 src/core/system.conf.in     | 2 +-
ff6046
 3 files changed, 3 insertions(+), 3 deletions(-)
ff6046
ff6046
diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
ff6046
index a914ef2523..085086200a 100644
ff6046
--- a/man/systemd-system.conf.xml
ff6046
+++ b/man/systemd-system.conf.xml
ff6046
@@ -339,7 +339,7 @@
ff6046
         <listitem><para>Configure the default value for the per-unit <varname>TasksMax=</varname> setting. See
ff6046
         <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
ff6046
         for details. This setting applies to all unit types that support resource control settings, with the exception
ff6046
-        of slice units. Defaults to 15%, which equals 4915 with the kernel's defaults on the host, but might be smaller
ff6046
+        of slice units. Defaults to 80%, which equals 26214 with the kernel's defaults on the host, but might be smaller
ff6046
         in OS containers.</para></listitem>
ff6046
       </varlistentry>
ff6046
 
ff6046
diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h
ff6046
index 1a28a8163a..f10c26ad51 100644
ff6046
--- a/src/basic/cgroup-util.h
ff6046
+++ b/src/basic/cgroup-util.h
ff6046
@@ -100,7 +100,7 @@ static inline bool CGROUP_BLKIO_WEIGHT_IS_OK(uint64_t x) {
ff6046
 }
ff6046
 
ff6046
 /* Default resource limits */
ff6046
-#define DEFAULT_TASKS_MAX_PERCENTAGE            15U /* 15% of PIDs, 4915 on default settings */
ff6046
+#define DEFAULT_TASKS_MAX_PERCENTAGE            80U /* 80% of PIDs, 26214 on default settings */
ff6046
 #define DEFAULT_USER_TASKS_MAX_PERCENTAGE       33U /* 33% of PIDs, 10813 on default settings */
ff6046
 
ff6046
 typedef enum CGroupUnified {
ff6046
diff --git a/src/core/system.conf.in b/src/core/system.conf.in
ff6046
index f0a59a79a5..653ec6b8c9 100644
ff6046
--- a/src/core/system.conf.in
ff6046
+++ b/src/core/system.conf.in
ff6046
@@ -45,7 +45,7 @@
ff6046
 #DefaultBlockIOAccounting=no
ff6046
 #DefaultMemoryAccounting=@MEMORY_ACCOUNTING_DEFAULT@
ff6046
 #DefaultTasksAccounting=yes
ff6046
-#DefaultTasksMax=15%
ff6046
+#DefaultTasksMax=80%
ff6046
 #DefaultLimitCPU=
ff6046
 #DefaultLimitFSIZE=
ff6046
 #DefaultLimitDATA=