Add ability to set worker_threads based on number of processing units
Related: PROD-27869
Change-Id: I74fc85a39b2609f495af4d7f04743913290f9f29
diff --git a/salt/files/master.conf b/salt/files/master.conf
index fcd1f11..ececf3a 100644
--- a/salt/files/master.conf
+++ b/salt/files/master.conf
@@ -7,7 +7,9 @@
{%- endfor %}
{%- endif %}
-worker_threads: {{ master.worker_threads }}
+{% set nproc = salt['status.nproc'] %}
+
+worker_threads: {{ nproc * master.worker_threads_per_cpu if master.worker_threads_per_cpu is defined else master.worker_threads }}
timeout: {{ master.command_timeout }}
{%- if master.interface is defined %}
interface: {{ master.interface }}