Skip to main content
Version: Deploy 23.3

Configure the task execution engine

This topic provides information about how to configure task execution engine.

In Deploy, deployment tasks are executed by dedicated worker instances. A Deploy master generates a deployment plan that contains steps that a Deploy worker's task execution engine will carry out to deploy an application.

For more information, read more about masters and workers here

Tuning the task execution engine

You can tune the Deploy workers' task execution engine with the following settings in deploy-task.yaml:

SettingDescriptionDefault
deploy.task.shutdown-timeoutTime to wait for the task engine to shut down.1 minute
deploy.task.max-active-tasksMaximum number of simultaneous running tasks allowed in the system. If this number is reached, the tasks will appear as QUEUED in the Monitoring section. Each QUEUED task will automatically start after a running task completes.100
deploy.task.recovery-dirName of the directory in XL_DEPLOY_SERVER_HOME where task recovery files are stored.work
deploy.task.step.retry-delayTime to wait before rerunning a step that returned a RETRY exit code.5 seconds

You can configure the thread pool that each worker has available for step execution in deploy-task.yaml:

SettingDescriptionDefault
deploy.task.step.execution-threadsAmount of threads in the pool.32
important

Threads are shared by all running tasks on a worker; they are not created per deployment.

Task execution example

The following example illustrates how you can adjust the deploy.task.step.execution-threads setting to impact task execution.

note

This example assumes that no other tasks are active in the system, and uses the out-of-the-box internal worker setup. Note that this is not a production setup. This example is only for illustration purposes.

Assume there is an application that contains six deployables, all of type cmd.Command. Each one is configured with a command to sleep for 15 seconds.

In deploy-task.yaml, set the deploy.step.execution-threads property to 2:

deploy.task.step.execution-threads=2

Restart the Deploy server so the settings take effect.

After the server starts, set up a deployment of the application to an environment. In the Deployment Properties, set the orchestrator to parallel-by-deployed. This ensures that the deployment steps will be executed in parallel. Your deployment will look like:

Sample deployment plan with parallel-by-deployed orchestrator

Click Execute to start the execution. Because the core pool size is 2, only two threads will be created and used for step execution. The Deploy execution engine will start executing two steps and the rest of the steps will be in a queued state:

Deployment with limited core pool size

Because you set the deploy.step.execution-threads property to 2, a maximum of two steps are executed at a time. After the first two steps are executed, the next two steps will be picked for execution until all tasks are complete.