Skip to content

ci: cap ccache at 300M and evict entries unused for a day so depends caches stop getting evicted - #8009

Merged
PastaPastaPasta merged 1 commit into
dashpay:developfrom
PastaPastaPasta:ci/ccache-trim-1d
Nov 1, 2026
Merged

PastaPastaPasta merged 1 commit into
dashpay:developfrom
PastaPastaPasta:ci/ccache-trim-1d

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Member

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:

  • 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

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 (dashpay#7059) predates the
remote ccache, which now serves objects evicted mid-build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T03:38:09.956523Z ec0df91 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@PastaPastaPasta
PastaPastaPasta merged commit 9c119fc into dashpay:develop Nov 1, 2026
32 of 33 checks passed
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.

1 participant