- All playbooks
- Build on one machine when the long pole leaves it idle
Build on one machine when the long pole leaves it idle
Put the compile steps that waited on separate machines onto the box the long pole underuses.
Company examples
How Anthropic used this technique
Read what Anthropic changed and follow the original sources.
Build on one machine when the long pole leaves it idle
Bun's Rust build is the long pole and leaves its machine underused, so Bun builds C++, Rust and the link in one step on one machine. The C++ compile overlaps cargo there, and the separate C++ build agent and its archive download are gone.
26 to 13 build agents per build and about 93 to 69 agent-minutes, with one r8g.4xlarge build step replacing the c8g.4xlarge C++ and r8g.2xlarge build agents; every ThinLTO lane 23 to 43 seconds faster than the old build step alone (one build per lane), and the non-LTO lanes flat to about a minute slower. Source
- Use it when
- Two build jobs run on separate machines and one of them leaves its machine mostly idle while the other sets the critical path.
- Before applying it
- The combined job runs on a machine with the cores and memory both compiles need.
Company Playbooks
- Read Anthropic’s playbookRun only affected tests
- Read DoorDash’s playbookRun build and test in parallel, sharded across CI agents
- Read Linear’s playbookBenchmark the same job on faster hardware
- Read Mastra’s playbookStarSling runners for the slowest test workflow
- Read OpenAI’s playbookRank CI fixes by the minutes they save
- Read Ramp’s playbookMove a CPU-bound test suite to a faster CPU
- Read Shopify’s playbookLet an agent iterate against one CI metric
- Read Spotify’s playbookBuild arm64 on native arm64 runners
- Read Stripe’s playbookRun only the tests a change can reach
- Read Uber’s playbookBuild the merge-queue speculations most likely to be needed