Skip to content

Limiting parallelism

You can restrict the number of parallel workflow executions.

Controller-level

You can limit the total number of parallel workflow executions in the workflow controller ConfigMap:

data:
  parallelism: "10"

You can also limit the total number of parallel workflow executions in a single namespace:

data:
  namespaceParallelism: "4"

When namespace parallelism is enabled, it is plausible for a workflow with a lower priority to be run first if a namespace is at its namespace parallelism limits.

Note

Workflows that are executing but restricted from running more nodes due to other mechanisms will still count toward parallelism limits.

In addition to the default parallelism, you are able to set individual limits on namespace parallelism by modifying the namespace object with a workflows.argoproj.io/parallelism-limit label. Note that individual limits on namespaces will override global namespace limits. In order for this feature to work, you must provide get/watch/list verb permissions. The omission of these permissions is not a fatal error but will result in the feature not working. It may make sense to omit these permissions in certain cases, such as namespace installations.

Priority

You can set a priority on workflows:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: priority-
spec:
  priority: 3
  # ...

Workflows that have not started due to Controller-level parallelism will be queued: workflows with higher priority numbers will start before lower priority ones. The default is priority: 0.

Synchronization

You can also use mutexes, semaphores, and parallelism to control the parallel execution of workflows and templates.


Have a question?

Search on GitHub Discussions and Slack.