Repository navigation
ci: halve Blacksmith runner vCPUs - #50
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Java Build(Gradle + Quarkus)Testphase aloneDocker BuildThe 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.