Skip to content

ci: reduce ccache size on GHA runners - #35176

Closed
willcl-ark wants to merge 1 commit into
bitcoin:masterfrom
willcl-ark:gha-cache-reduction
Closed

willcl-ark wants to merge 1 commit into
bitcoin:masterfrom
willcl-ark:gha-cache-reduction

Conversation

@willcl-ark

Copy link
Copy Markdown
Member

The GHA cache backend has a 10 GB per-repository limit, so jobs that save multiple 2 GB ccache entries can evict each other before slower jobs have a chance to reuse their caches. This was observed in #35024.

Set CCACHE_MAXSIZE to 500M only for jobs using GitHub-hosted runners, including matrix entries that explicitly opt into GHA. Keep the 2G limit for Cirrus runners, where the larger cache does not compete for the same constrained GHA cache quota.

The GHA cache backend has a 10 GB per-repository limit, so jobs that
save multiple 2 GB ccache entries can evict each other before slower
jobs have a chance to reuse their caches. This was observed in bitcoin#35024.

Set CCACHE_MAXSIZE to 500M only for jobs using GitHub-hosted runners,
including matrix entries that explicitly opt into GHA. Keep the 2G limit
for Cirrus runners, where the larger cache does not compete for the same
constrained GHA cache quota.
@DrahtBot DrahtBot added the Tests label Apr 28, 2026
@DrahtBot

DrahtBot commented Apr 28, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35176.

Reviews

See the guideline for information on the review process.

Type Reviewers
Concept ACK fanquake

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Conflicts

No conflicts as of last run.

@willcl-ark

Copy link
Copy Markdown
Member Author

Extra GHA cache seems very cheap according to this page:

Cache size Monthly cost (if fully utilized)
50GB $2.80
200GB $13.30
1000GB $69.30

And IMO would be the better option all round. Let me know if we don't want to buy more cache space from GH, and I'll undraft this.

One advantage of this change though, might be that forks get "better" GHA cache hitrates (at our own expense though, to be clear).

@fanquake

Copy link
Copy Markdown
Member

200GB $13.30
1000GB $69.30

Concept ACK.

@maflcko

maflcko commented Apr 29, 2026

Copy link
Copy Markdown
Member

Yeah, not sure how easy it would be to set up billing for this, but if it is possible, going for 200 GB (or more) would be nice.

@hebasto

hebasto commented Apr 29, 2026

Copy link
Copy Markdown
Member

Cache size Monthly cost (if fully utilized) 50GB $2.80 200GB $13.30 1000GB $69.30

And IMO would be the better option all round.

I concur.

@willcl-ark

Copy link
Copy Markdown
Member Author

Well, if we find someone willing to shell out the whole $13/month for it, an admin will want to visit and configure billing information on https://github.com/organizations/bitcoin/settings/billing/payment_information

Then, I think, they need to "set a budget" at https://github.com/organizations/bitcoin/settings/billing/budgets for actions to increase what can be spent on actions.

It's unclear to me whether https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-cache-settings-for-your-repository is needed too, I think a bit of trial and error to work out which knobs we need to press could be in order...

@maflcko maflcko added this to the 32.0 milestone May 6, 2026
@fanquake

Copy link
Copy Markdown
Member

The additional caching should now be enabled.

@fanquake

fanquake commented Jun 1, 2026

Copy link
Copy Markdown
Member

Is this still relevant?

@willcl-ark

Copy link
Copy Markdown
Member Author

No I think we can close this now

@willcl-ark willcl-ark closed this Jun 1, 2026
@fanquake fanquake removed this from the 32.0 milestone Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants