Skip to content

Cap the compiler cache so it survives to the next run - #368

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:perf/cap-the-compiler-cache
Sep 5, 2026
Merged

Cap the compiler cache so it survives to the next run#368
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:perf/cap-the-compiler-cache

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A repository gets 10 GB for every Actions cache it holds, and the
distribution workflow allows each job 5 GB, so a matrix of seven
architectures overruns the budget and GitHub evicts least-recently-used to
make room. The entries that lose that race are the small ones.

The Linux leg reads cache hit (direct) 0, cache miss 724,
cache hit rate 0.00 %, so every object compiles from scratch and the
single "Build extension (inside Docker)" step takes 46 minutes of a
51-minute job. It is not branch scoping: run 33743717496 is a push to main,
reading and writing the default-branch scope, and misses the same way.

Naming a ceiling in test_env_variables reaches the build because that
input is appended to the Docker environment file after the workflow writes
its own defaults, and a later assignment wins there. 500M is generous
against what the base branch holds, 33 to 54 MB per architecture, so it
bounds the budget without bounding any real working set. The macOS and
Windows legs take their ceiling from the ccache action rather than this
file and are unchanged.

With an entry left to restore, the same Linux leg reads cache hit rate 49.65 % and finishes in 7 minutes, and the macOS leg in 4.

A repository gets 10 GB for every Actions cache it holds, and the
distribution workflow allows each job 5 GB, so a matrix of seven
architectures overruns the budget and GitHub evicts least-recently-used to
make room. The entries that lose that race are the small ones.

The Linux leg reads `cache hit (direct) 0`, `cache miss 724`,
`cache hit rate 0.00 %`, so every object compiles from scratch and the
single "Build extension (inside Docker)" step takes 46 minutes of a
51-minute job. It is not branch scoping: run 33743717496 is a push to main,
reading and writing the default-branch scope, and misses the same way.

Naming a ceiling in `test_env_variables` reaches the build because that
input is appended to the Docker environment file after the workflow writes
its own defaults, and a later assignment wins there. 500M is generous
against what the base branch holds, 33 to 54 MB per architecture, so it
bounds the budget without bounding any real working set. The macOS and
Windows legs take their ceiling from the ccache action rather than this
file and are unchanged.

With an entry left to restore, the same Linux leg reads `cache hit rate
49.65 %` and finishes in 7 minutes, and the macOS leg in 4.
@estebanzimanyi
estebanzimanyi merged commit 94eef4c into MobilityDB:main Sep 5, 2026
10 checks passed
@estebanzimanyi
estebanzimanyi deleted the perf/cap-the-compiler-cache branch September 5, 2026 04:30
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