Repository navigation
ci: bump CCACHE_MAXSIZE to 600M - #7059
Conversation
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
WalkthroughA single environment variable configuration in the GitHub Actions build workflow is modified. The Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1){guix-build*,releases,**/guix-build*,releases/**,.github/**,depends/**,ci/**,contrib/**,doc/**}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This doesn't make a ton of sense to me; why is 400M not enough? I think when I did a build, I found the cache from a single build less than or around 50M |
You are probably confusing it with depends cache which is around 50MB https://github.com/dashpay/dash/actions/caches?query=key%3Adepends, ccache one is much larger https://github.com/dashpay/dash/actions/caches?query=key%3Accache. |
|
The ccache one is much larger; but I took a new docker container, installed ccache, built and saw usage around 50MB I think |
|
Wiped ccache cache on my remote node and rebuilt
|
|
sqlite CI jobs started to fail sometimes with |
Each develop push saved ~4.5 GB of ccache (10 targets at up to the 600M cap), most of it objects from older commits that no build hits anymore. Overlapping develop runs pushed the repository past GitHub's 10 GB cache limit, and LRU eviction then dropped fresh depends entries that PR runs had already been told were present. One build's working set is 0.1-0.25 GB per target (cold v24.0.x builds and freshly reset develop entries), so 300M still holds it. Hits refresh mtime, so evicting anything older than a day keeps exactly what recent builds used. The thrash that motivated the 600M bump (#7059) predates the remote ccache, which now serves objects evicted mid-build. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y so depends caches stop getting evicted ec0df91 ci: cap ccache at 300M and evict entries unused for a day (pasta) Pull request description: ## Issue being fixed or feature implemented PR builds are failing with "Depends cache restore missed and no built depends artifact was provided" (e.g. run 41252515931 on #8008: `aarch64-linux-build`, `linux64_tsan-build`, `linux64_multiprocess-build`). `Check cache` saw the depends entry at 23:27, the builds tried to restore it ~90 minutes later, and by then GitHub's LRU eviction had removed it. The eviction pressure is ccache. Every develop push saves one ccache entry per target, each sitting at the 600M cap: about 4.5 GB per push. Ten develop pushes landed in three hours, the runs overlapped, and `prune-ccache` only runs once all ten `src-*` jobs of a run are done. Between 22:32 and 00:12 nothing was pruned while ~14 GB of new entries were written against the 10 GB repository limit. Most of each 600M entry is objects from older commits. One build's working set is 0.1–0.25 GB per target: that's where cold v24.0.x builds end up, and where develop entries end up after a reset (multiprocess 182 MB, nowallet 220 MB, win64 241 MB). ## What was done? - Lower `CCACHE_MAXSIZE` from 600M to 300M. - Run `ccache --evict-older-than 1d` before the final cleanup. ccache refreshes a file's mtime on every hit, so this drops exactly the objects no build has used in a day, and the saved entry stays close to one build's working set. #7059 raised the cap from 400M to 600M because linux64/linux64_sqlite were thrashing at 400M. That was before the remote ccache: today an object evicted mid-build is fetched from the remote instead of recompiled. On recent develop pushes the remote served all but 1–2 of the local misses. ## How Has This Been Tested? - Ran ccache 4.12 locally: compiled two files, backdated both entries by two days, hit one again, then ran `--evict-older-than 1d`. The re-hit entry survived and the stale one was evicted (miss on rebuild). - CI on this PR does not exercise the change: `pull_request_target` runs the base branch's workflow, and ccache is only saved on develop pushes. The effect shows up in the `ccache` step summary and `gh cache list` sizes after merge. ## Breaking Changes None. ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation - [ ] I have assigned this pull request to a milestone _(if you have permission to set one)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Top commit has no ACKs. Tree-SHA512: cf2cec9b34ddcc75c437616c23c0a7cbe514f5e0016ebe5862b88673748682aead2bb54a558d93a2fc7244510531d4b7cda9a488a27002a8137c131f69f69ea8
Issue being fixed or feature implemented
A simple commit like bac6bfa should result in at least 90%+ cache hit.
But it's not the case for some jobs:
~22%: https://github.com/dashpay/dash/actions/runs/20113011572/job/57715279431
~25%: https://github.com/dashpay/dash/actions/runs/20113011572/job/57715279411
What was done?
Bump CCACHE_MAXSIZE to 600M
How Has This Been Tested?
Running CI on develop twice after this change:
~94%: https://github.com/UdjinM6/dash/actions/runs/20118156411/job/57736628182
~94%: https://github.com/UdjinM6/dash/actions/runs/20118156411/job/57736628179
Breaking Changes
n/a
Checklist: