Skip to content

ci: halve Blacksmith runner vCPUs - #50

Merged
hbrombeer merged 2 commits into
mainfrom
ci/rightsize-runners
Jul 30, 2026
Merged

hbrombeer merged 2 commits into
mainfrom
ci/rightsize-runners

Conversation

@hbrombeer

Copy link
Copy Markdown
Member

Part of an org-wide review of Blacksmith runner sizing.

Why this is safe. Blacksmith prices per vCPU-minute and rounds every job up to a whole minute. Halving a runner therefore cannot cost more than the status quo: worst case (a perfectly parallel job) it is a wash, and all the size-independent overhead — image pull, checkout, cache restore, JVM and container startup, network — comes back as a straight 50% saving.

Measured, not assumed. Both halves were run at 2 vCPU against their 4 vCPU baselines on service-moderation, the heaviest repo in the org:

job 4 vCPU 2 vCPU ratio billed
Java Build (Gradle + Quarkus) 262s 314s 1.20x −40%
↳ Test phase alone 170s 187s 1.10x
Docker Build 292s 250s 0.86x −50%

The Docker job got faster at half the size — it was never CPU-bound. The Gradle test phase barely moved, because it waits on container and JVM startup rather than on cores.

Anything here that turns out to be genuinely CPU-bound can go back to a 4 vCPU label; this changes the default, not the ceiling.

Blacksmith prices per vCPU-minute and rounds each job up to a whole
minute, so this cannot cost more than the 4 vCPU status quo. Measured
on the org's heaviest repo: a Gradle build/test job runs 1.20x slower
at half the size (40% cheaper), and a Docker build job runs no slower
at all.
From an audit of all 205 workflow files in the org.

97 files had no concurrency group, so a push that superseded an in-flight
PR run left the old one running to completion on a paid runner. 116 jobs
had no `timeout-minutes`, so a hung job would run to GitHub's 6-hour
default at full vCPU rate — the longest job actually observed in 14 days
was 18 minutes, so 30 is a generous ceiling and 10 suffices for the
release-please and label jobs.

Cancelling is only applied where a half-finished run is harmless. Release,
publish, deploy and release-please workflows get a concurrency group that
serialises them without cancelling.
@hbrombeer
hbrombeer marked this pull request as ready for review July 30, 2026 09:39
@hbrombeer
hbrombeer merged commit 897eb2e into main Jul 30, 2026
1 check passed
@hbrombeer
hbrombeer deleted the ci/rightsize-runners branch July 30, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant