|
|
aa0848 |
From 4ec48c87803916e90a8f30afae6c8bdee5bb9ba5 Mon Sep 17 00:00:00 2001
|
|
|
aa0848 |
From: rpm-build <rpm-build>
|
|
|
aa0848 |
Date: Wed, 1 Aug 2018 13:19:39 +0200
|
|
|
aa0848 |
Subject: [PATCH] pid1: bump DefaultTasksMax to 80% of the kernel pid.max value
|
|
|
aa0848 |
|
|
|
aa0848 |
This should be hopefully high enough even for the very big deployments.
|
|
|
aa0848 |
|
|
|
aa0848 |
RHEL-only
|
|
|
aa0848 |
|
|
|
aa0848 |
Resolves: #2003031
|
|
|
aa0848 |
---
|
|
|
aa0848 |
man/systemd-system.conf.xml | 4 ++--
|
|
|
aa0848 |
src/core/main.c | 2 +-
|
|
|
aa0848 |
src/core/system.conf.in | 2 +-
|
|
|
aa0848 |
3 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
aa0848 |
|
|
|
aa0848 |
diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
|
|
|
aa0848 |
index 3805a010e2..b8e2b65625 100644
|
|
|
aa0848 |
--- a/man/systemd-system.conf.xml
|
|
|
aa0848 |
+++ b/man/systemd-system.conf.xml
|
|
|
aa0848 |
@@ -404,10 +404,10 @@
|
|
|
aa0848 |
<listitem><para>Configure the default value for the per-unit <varname>TasksMax=</varname> setting. See
|
|
|
aa0848 |
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
|
aa0848 |
for details. This setting applies to all unit types that support resource control settings, with the exception
|
|
|
aa0848 |
- of slice units. Defaults to 15% of the minimum of <varname>kernel.pid_max=</varname>, <varname>kernel.threads-max=</varname>
|
|
|
aa0848 |
+ of slice units. Defaults to 80% of the minimum of <varname>kernel.pid_max=</varname>, <varname>kernel.threads-max=</varname>
|
|
|
aa0848 |
and root cgroup <varname>pids.max</varname>.
|
|
|
aa0848 |
Kernel has a default value for <varname>kernel.pid_max=</varname> and an algorithm of counting in case of more than 32 cores.
|
|
|
aa0848 |
- For example with the default <varname>kernel.pid_max=</varname>, <varname>DefaultTasksMax=</varname> defaults to 4915,
|
|
|
aa0848 |
+ For example with the default <varname>kernel.pid_max=</varname>, <varname>DefaultTasksMax=</varname> defaults to 26214,
|
|
|
aa0848 |
but might be greater in other systems or smaller in OS containers.</para></listitem>
|
|
|
aa0848 |
</varlistentry>
|
|
|
aa0848 |
|
|
|
aa0848 |
diff --git a/src/core/main.c b/src/core/main.c
|
|
|
aa0848 |
index 57aedb9b93..7ea848ebeb 100644
|
|
|
aa0848 |
--- a/src/core/main.c
|
|
|
aa0848 |
+++ b/src/core/main.c
|
|
|
aa0848 |
@@ -98,7 +98,7 @@
|
|
|
aa0848 |
#include <sanitizer/lsan_interface.h>
|
|
|
aa0848 |
#endif
|
|
|
aa0848 |
|
|
|
aa0848 |
-#define DEFAULT_TASKS_MAX ((TasksMax) { 15U, 100U }) /* 15% */
|
|
|
aa0848 |
+#define DEFAULT_TASKS_MAX ((TasksMax) { 80U, 100U }) /* 80% */
|
|
|
aa0848 |
|
|
|
aa0848 |
static enum {
|
|
|
aa0848 |
ACTION_RUN,
|
|
|
aa0848 |
diff --git a/src/core/system.conf.in b/src/core/system.conf.in
|
|
|
aa0848 |
index 96fb64d2c1..c0dc6a7e17 100644
|
|
|
aa0848 |
--- a/src/core/system.conf.in
|
|
|
aa0848 |
+++ b/src/core/system.conf.in
|
|
|
aa0848 |
@@ -54,7 +54,7 @@
|
|
|
aa0848 |
#DefaultBlockIOAccounting=no
|
|
|
aa0848 |
#DefaultMemoryAccounting={{ 'yes' if MEMORY_ACCOUNTING_DEFAULT else 'no' }}
|
|
|
aa0848 |
#DefaultTasksAccounting=yes
|
|
|
aa0848 |
-#DefaultTasksMax=15%
|
|
|
aa0848 |
+#DefaultTasksMax=80%
|
|
|
aa0848 |
#DefaultLimitCPU=
|
|
|
aa0848 |
#DefaultLimitFSIZE=
|
|
|
aa0848 |
#DefaultLimitDATA=
|