Revert "core: enable TasksMax= for all services by default, and set it to 512"
authorMartin Pitt <martin.pitt@ubuntu.com>
Mon, 9 May 2016 19:24:38 +0000 (21:24 +0200)
committerFelipe Sateler <fsateler@debian.org>
Thu, 6 Dec 2018 00:03:34 +0000 (00:03 +0000)
This reverts commit 9ded9cd14cc03c67291b10a5c42ce5094ba0912f.

Introducing a default limit on number of threads broke a lot of software which
regularly needs more, such as MySQL and RabbitMQ, or services that spawn off an
indefinite number of subtasks that are not in a scope, like LXC or cron.

15% is way too much for most "simple" services, and it's too little for others
such as the ones mentioned above. There is also no particular rationale about
any particular global limit, so even if we'd bump it higher we'd just make the
limit even less useful while still breaking software.

It is both much safer and also much more effective in terms of guarding against
berserk programs/bugs/unintended fork bombs etc. to set limits in units
individually. Once someone looks at one, this is then a great time to also flip
on the other resource and privilege limitations that systemd offers.

Bug: https://github.com/systemd/systemd/issues/3211
Bug-Debian: https://bugs.debian.org/823530
Bug-Ubuntu: https://launchpad.net/bugs/1578080

Gbp-Pq: Topic debian
Gbp-Pq: Name Revert-core-enable-TasksMax-for-all-services-by-default-a.patch

man/systemd-system.conf.xml
src/core/system.conf.in

index a914ef2523fc49f853eeae0f9dd46041705a442a..f0c17d5b5171796e42d9bbcecc8c8b526e49169a 100644 (file)
         <listitem><para>Configure the default value for the per-unit <varname>TasksMax=</varname> setting. See
         <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
         for details. This setting applies to all unit types that support resource control settings, with the exception
-        of slice units. Defaults to 15%, which equals 4915 with the kernel's defaults on the host, but might be smaller
-        in OS containers.</para></listitem>
+        of slice units.</para></listitem>
       </varlistentry>
 
       <varlistentry>
index f0a59a79a5f7c0b63b7540e3e613379dbb7111b3..901535e10b8d85ad31f2a623cf2239c10fbeaeca 100644 (file)
@@ -45,7 +45,7 @@
 #DefaultBlockIOAccounting=no
 #DefaultMemoryAccounting=@MEMORY_ACCOUNTING_DEFAULT@
 #DefaultTasksAccounting=yes
-#DefaultTasksMax=15%
+#DefaultTasksMax=
 #DefaultLimitCPU=
 #DefaultLimitFSIZE=
 #DefaultLimitDATA=