process_count_max: add defaults and documentation

This commit is contained in:
Silvio Moioli 2017-09-20 14:35:11 +02:00
parent 6baadf7a77
commit 4d181ea523
3 changed files with 27 additions and 0 deletions

View File

@ -689,6 +689,12 @@
# for a full explanation.
#multiprocessing: True
# Limit the maximum amount of processes or threads created by salt-minion.
# This is useful to avoid resource exhaustion in case the minion receives more
# publications than it is able to handle, as it limits the number of spawned
# processes or threads. -1 disables the limit.
#process_count_max: 20
##### Logging settings #####
##########################################

View File

@ -2419,6 +2419,23 @@ executed in a thread.
multiprocessing: True
.. conf_minion:: process_count_max
``process_count_max``
-------
.. versionadded:: Oxygen
Default: ``20``
Limit the maximum amount of processes or threads created by ``salt-minion``.
This is useful to avoid resource exhaustion in case the minion receives more
publications than it is able to handle, as it limits the number of spawned
processes or threads. ``-1`` disables the limit.
.. code-block:: yaml
process_count_max: 20
.. _minion-logging-settings:

View File

@ -337,6 +337,9 @@ VALID_OPTS = {
# Whether or not processes should be forked when needed. The alternative is to use threading.
'multiprocessing': bool,
# Maximum number of concurrently active processes at any given point in time
'process_count_max': int,
# Whether or not the salt minion should run scheduled mine updates
'mine_enabled': bool,
@ -1258,6 +1261,7 @@ DEFAULT_MINION_OPTS = {
'auto_accept': True,
'autosign_timeout': 120,
'multiprocessing': True,
'process_count_max': 20,
'mine_enabled': True,
'mine_return_job': False,
'mine_interval': 60,