daandemeyer / rpms / systemd

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