lecture 10 of 170 completed

Tuning parallelism, and when more workers is slower

Worker count has an optimum, and past it everything gets slower and flakier. Finding it is measurement, not guesswork.

What you'll learn

  • Why more workers eventually makes things slower
  • Why contention looks exactly like flakiness
  • How to find the optimum by measuring

A team doubled their CI machine size and set workers to 16. The suite got slower and started failing tests that had never failed. They concluded Playwright did not scale.

Playwright scaled fine. They had passed the optimum, and past the optimum every additional worker makes things worse in two ways at once.

Why more workers stops helping.

Each worker is a browser process. Browsers are memory-hungry. When workers exceed available memory, the machine swaps, and everything slows down at once rather than gracefully.

members only

Keep reading with the full course

The Foundations track and the first 5 lectures of each framework are free. This lecture is part of the paid course, which unlocks every lecture, all three frameworks, and downloads.

See the options →