Skip to content

ci: bump CCACHE_MAXSIZE to 600M - #7059

Merged
PastaPastaPasta merged 1 commit into
dashpay:developfrom
UdjinM6:ci_bump_CCACHE_MAXSIZE_600
Dec 23, 2025
Merged

PastaPastaPasta merged 1 commit into
dashpay:developfrom
UdjinM6:ci_bump_CCACHE_MAXSIZE_600

Conversation

@UdjinM6

@UdjinM6 UdjinM6 commented Dec 11, 2025 •

Copy link
Copy Markdown

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:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@UdjinM6 UdjinM6 added this to the 23.1 milestone Dec 11, 2025
@github-actions

Copy link
Copy Markdown

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

@coderabbitai

coderabbitai Bot commented Dec 11, 2025

Copy link
Copy Markdown

Walkthrough

A single environment variable configuration in the GitHub Actions build workflow is modified. The CCACHE_MAXSIZE parameter in .github/workflows/build-src.yml is increased from 400M to 600M, allowing the C compiler cache to retain more data during the build process.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Single file modified with one parameter value change
  • No logic, control flow, or functional behavior alterations
  • Straightforward configuration adjustment with no side effects to verify

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'ci: bump CCACHE_MAXSIZE to 600M' directly and clearly summarizes the main change: increasing the CCACHE_MAXSIZE environment variable from 400M to 600M in the CI configuration.
Description check ✅ Passed The description is directly related to the changeset, providing context about low cache-hit rates, the solution of bumping CCACHE_MAXSIZE to 600M, and evidence of improved performance from testing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bac6bfa and ae8464e.

📒 Files selected for processing (1)
  • .github/workflows/build-src.yml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
{guix-build*,releases,**/guix-build*,releases/**,.github/**,depends/**,ci/**,contrib/**,doc/**}

📄 CodeRabbit inference engine (CLAUDE.md)

Do not make changes to build system files (guix-build*), release artifacts, or avoid changes to .github, depends, ci, contrib, and doc directories unless specifically prompted

Files:

  • .github/workflows/build-src.yml
⏰ 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)
  • GitHub Check: Lint / Run linters
  • GitHub Check: Build container / Build container
🔇 Additional comments (1)
.github/workflows/build-src.yml (1)

93-93: Config change aligns with PR objectives and testing.

The increase from 400M to 600M addresses the reported low cache-hit rates and matches the testing improvement (~94% hit) documented in the PR description.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@PastaPastaPasta

Copy link
Copy Markdown
Member

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

@UdjinM6

UdjinM6 commented Dec 11, 2025

Copy link
Copy Markdown
Author

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.

@PastaPastaPasta

Copy link
Copy Markdown
Member

The ccache one is much larger; but I took a new docker container, installed ccache, built and saw usage around 50MB I think

@UdjinM6

UdjinM6 commented Dec 17, 2025

Copy link
Copy Markdown
Author

Wiped ccache cache on my remote node and rebuilt develop after make clean.

Cache size (GB): 0.6 / 10.0 ( 6.46%)

$ du -hd0 .cache/ccache/
618M	.cache/ccache/

@UdjinM6
UdjinM6 marked this pull request as draft December 18, 2025 09:25
@UdjinM6

UdjinM6 commented Dec 19, 2025

Copy link
Copy Markdown
Author

sqlite CI jobs started to fail sometimes with No space left on the device at Run unit tests step after this patch, #7075 should fix it by freeing 3GB+.

@UdjinM6
UdjinM6 marked this pull request as ready for review December 19, 2025 17:19

@kwvg kwvg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK ae8464e

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK ae8464e

@PastaPastaPasta
PastaPastaPasta merged commit 6458199 into dashpay:develop Dec 23, 2025
PastaPastaPasta added a commit that referenced this pull request Nov 1, 2026
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]>
PastaPastaPasta added a commit that referenced this pull request Nov 1, 2026
…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
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.

3 participants