Guides
How to size runners for Rust builds
Cargo builds scale with cores, but it is unclear how far that goes.
4 min read
Cargo builds scale with cores, but it is unclear how far that goes.
Why it happens
rustc parallelises across codegen units nearly linearly, so Rust benefits from larger runners more than most stacks.
How to fix it
- 16 vCPU for release builds; the scaling holds further than people expect
- Add sccache first — a cold cache wastes whatever size you pick
- Link time is single-threaded; consider lld or mold before buying more cores
- Debug builds saturate fewer cores than release, so size them separately
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.
Related
How to scale self-hosted runnersSelf-hosted runners either queue at peak or sit idle and expensive.How to use runner groupsAny repository can schedule jobs on any runner.How to design a runner label strategyLabels grew organically and nobody knows which to use.Hosted or BYOC: how to chooseYou are unsure whether to use hosted runners or deploy into your own cloud.