Lesson295 words

Optimising pipeline concurrency

Optimize pipeline concurrency for performance and cost

Parallel jobs are the unit

Azure DevOps Services configures parallel jobs at organization level. A parallel job represents capacity for one actively running agent job. Private projects can have free or paid Microsoft-hosted capacity; billing/time limits depend on the offer rather than one universal rule.

That means the questions to ask are:

  1. How many jobs do we want running at once at peak?
  2. What is the cost of the queue when we exceed that?

Where concurrency is consumed

Each actively running agent job consumes a slot: that includes a running matrix leg or a job from another pipeline in the organization. Queued legs, individual steps, stages as containers, approval waits, and published artifacts do not independently consume parallel jobs.

yaml
strategy: matrix: linux: imageName: ubuntu-latest windows: imageName: windows-latest maxParallel: 2

maxParallel is how a single pipeline stays a good citizen. Remember it is only valid with matrix, and that parallel and matrix are mutually exclusive.

Self-hosted changes the shape

Self-hosted scale-out has two separate limits: available agent infrastructure and the organization's self-hosted parallel-job entitlement. VM Scale Set agents are customer-managed self-hosted agents that autoscale. Managed DevOps Pools is fully managed and scales from configuration, but pricing still combines Azure DevOps self-hosted parallel jobs with the Azure services used by the pool.

The trade-off to state

More capacity can reduce queue delay or the wall-clock time of work that can run independently; it does not make every pipeline faster. Cost depends on the selected Microsoft-hosted, self-hosted, or preview GitHub-hosted billing model plus any pool infrastructure. Measure queueing, utilization, elapsed time, and actual spend.

Primary sources

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free