Repository navigation
docs(cost): the CI speedup costs ~$30 a day, and nothing was measuring it - #499
Merged
Merged
Conversation
…g it Re-ran the three CUR probes against the November partition. One probe is unchanged and the spend underneath it is not. Split cost allocation is still producing nothing: 0 non-null out of 19,770 November rows, three days after the first probe said the same. Three more days of pod-level cost are permanently unrecoverable. The thing the re-run was not looking for is that November is on pace for roughly six times October. $160.47 in five days against $184.23 for all of October. S3 was not in October's top five; in November it is $76.27, and all of it is one line: 837 GB of `USE2-DataTransfer-Out-Bytes` from `er-ci-sccache` at $0.090/GB. That is internet egress — GitHub-hosted runners are not in the VPC, so a Gateway Endpoint cannot help and every sccache read leaves the region at the public rate. Nov 4 isolates the cause for free: that is the day the Actions billing block stopped CI running, and it egressed $0.00 against a $21.55 total. A day with no CI costs ~$20 and ships nothing; a day with CI costs $32-52 and the whole difference is this line. Nov 1 reads as $0.03 only because the first 100 GB a month is free, which was consumed during Nov 2. This is the price of the CI speedup and it was never measured. #424 removed rust-cache, which made sccache the only cache; the test job was then sharded, which multiplied the runners each pulling from it; and the hit rate is ~99%, so nearly every compilation unit downloads its object. PR wall time went 32-35 min to ~10 min. At ~$31 per CI day that is ~$600-900/month against a $600 budget that breaches mid-month. The baseline rose independently too — EC2 from ~$1.50/day to ~$7.60/day — which is the observability stack, the second web-api Deployment from #461 and the dispatcher. Real, new, and not sccache. Recorded as a decision with four options rather than a fix, because trading 25 minutes of wall clock for this is a judgement call and the defect was not knowing the number. The one thing the doc rules out is emptying the bucket: a cold sccache costs a 42-minute PR, which is what it was built to fix. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
The headline
November is on pace for roughly six times October, and $76.27 of it is
one line nobody was watching:
USE2-DataTransfer-Out-Byteser-ci-sccacheUSE2-Requests-Tier2er-ci-sccache837 GB at $0.090/GB. That is internet egress: GitHub-hosted runners are not
in the VPC, so an S3 Gateway Endpoint cannot help and every sccache read leaves
the region at the public rate.
Nov 4 isolates the cause, for free
That is the day the Actions billing block stopped CI from running at all:
A day with no CI costs ~$20 and egresses nothing. A day with CI costs $32–52 and
the entire difference is this one line. Nov 1 reads as $0.03 only because AWS's
first 100 GB/month is free — consumed during Nov 2, which is why the charge
appears to start then rather than scaling from the first run.
This is the price of the CI speedup
#424 removed
rust-cache, making sccache the only cache; the test job was thensharded, multiplying the runners each pulling from it; and the hit rate is ~99%,
so nearly every compilation unit downloads its object. PR wall time went 32–35
min → ~10 min.
At ~$31 on each day CI runs that is roughly $600–900/month against a $600
budget that breaches mid-month. The trade may well be worth it — the defect
is that nobody knew the number.
The baseline rose independently too: EC2 from ~$1.50/day in October to
~$7.60/day. That is the observability stack, the second web-api Deployment from
#461, and the dispatcher — all real, all new, none of it sccache.
Also: split cost allocation is still off
0 non-null out of 19,770 November rows for
split_line_item_split_cost,split_line_item_split_usage_ratioandsplit_line_item_parent_resource_id—three days after the first probe said the same. It does not backfill, so three
more days of pod-level cost are permanently unrecoverable.
Recorded as a decision, not a fix
Four options, cheapest-to-change first: accept and raise the budget; move
sccache to the GitHub Actions cache backend (free egress, but ~10 GB per repo
with LRU eviction, so measure the hit-rate loss); self-hosted runners inside
the VPC (in-region S3 is free and Actions minutes stop being metered — the
cluster and runner NodePools already exist); or narrow what sccache stores.
The one thing the doc rules out is emptying the bucket: a cold sccache costs a
42-minute PR, which is the problem it was built to fix.
Docs only — no behaviour change in this PR.
🤖 Generated with Claude Code