Note
This feature is available starting from the MCP 2019.2.6 maintenance update. Before using the feature, follow the steps described in Apply maintenance updates.
You can configure the number of worker threads for Salt Master based on the number of CPUs available on your Salt Master node.
Also, you can set up batching for the pipeline jobs to run Salt states, targeted for a large number of nodes, on a batch of nodes and define the batch size. By default, batching is force-enabled for the Deploy - OpenStack and Deploy - upgrade MCP DriveTrain Jenkins pipeline jobs as they do not support node targeting. Batch sizing is by default supported by the Deploy - OpenStack, Deploy - update system package(s), and Deploy - upgrade MCP DriveTrain Jenkins pipeline jobs.
To configure Salt Master threads:
Open your Git project repository with the Reclass model on the cluster level.
In infra/config/init.yml
, specify the following pillar for the
cfg01
node:
salt:
master:
worker_threads_per_cpu: <value>
Depending on the amount of CPUs, the total amount of worker threads is based
on worker_threads_per_cpu
multiplied by the number of CPUs. By default,
the number of worker threads is set to 40 using the following pillar:
salt:
master:
worker_threads: 40
If both worker_threads_per_cpu
and worker_threads
are defined,
worker_threads_per_cpu
is prioritized.
Log in to the Salt Master node.
Apply the following state:
salt-call state.sls salt.master
Verify that the required settings have been applied:
cat /etc/salt/master.d/master.conf | grep worker_threads
To configure Salt Master batching:
Open the required Jenkins pipeline job.
Configure batch sizing:
For the Deploy - OpenStack,
Deploy - update system package(s), and
Deploy - upgrade MCP DriveTrain Jenkins pipeline jobs, set the
BATCH_SIZE
parameter to an integer or percentage. For example, 20
or 20%
.
Batch sizing applies using the following workflow:
Verifies that the BATCH_SIZE
pipeline job parameter exists.
Verifies the SALT_MASTER_OPT_WORKER_THREADS
environment variable.
Verifies the worker_threads_per_cpu
pillar parameter and the
available number of CPUs.
Verifies the worker_threads
pillar parameter.
If none of the steps above match:
Prior to the MCP 2019.2.8 maintenance update, disables batching.
Starting from the MCP 2019.2.8 maintenance update, sets batching to 2/3 of the available Salt Master worker threads.
For other pipeline jobs, to use batching, set the
SALT_MASTER_OPT_WORKER_THREADS
environment variable in the global
Jenkins settings or directly in the pipeline jobs to an integer or
percentage. For example, 20
or 20%
.
Batch sizing applies using the following workflow:
Verifies that the BATCH_SIZE
pipeline job parameter exists.
Verifies the SALT_MASTER_OPT_WORKER_THREADS
environment variable.
If none of the steps above match:
Prior to the MCP 2019.2.8 maintenance update, disables batching.
Starting from the MCP 2019.2.8 maintenance update, sets batching to 2/3 of the available Salt Master worker threads.