Skip to content

perf(ci): drop the redundant target cache from the Test job - #338

Merged
jmagar merged 1 commit into
mainfrom
perf/ci-test-drop-redundant-target-cache
Aug 7, 2026
Merged

perf(ci): drop the redundant target cache from the Test job#338
jmagar merged 1 commit into
mainfrom
perf/ci-test-drop-redundant-target-cache

Conversation

@jmagar

@jmagar jmagar commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #336. With Soma Contracts down from ~18min to ~3min, the Test job is the long pole at 19m02s. Profiled it the same way.

Where the 19 minutes goes

Step Time
cargo nextest run --profile ci 184s
cargo test --doc 174s
Reference component cross-runtime conformance 173s
Install Rust and kache 131s
Cache Cargo (restore) 95s
Post Cache Cargo (save) 80s
Set up job 71s

The change

Cache Cargo pulls a 2.7 GB target/ directory down at ~47 MB/s and pushes it back afterwards — 175s, roughly 15% of the job, spent purely on transfer.

That step predates kache. On the very same run, kache reported:

Store:      47.0 GiB / 80.0 GiB (6777 entries, 59%)
Hit rate:   96.4% (local: 8828, prefetch: 0, remote: 28, dup: 25, miss: 309)

kache is the compiler cache now, it hits ~96% from a local store via reflink, and it costs nothing to "restore". Paying a 2.7 GB network round trip to avoid compilation that kache already avoids is redundant.

Why the timeout also moves

30 → 45 minutes. Not a fix — a guard. This job hit exactly 30 minutes on the first run of #330, with every test passing and ~3 minutes of work left, so it was already brushing the ceiling. If my read is wrong and the target cache was pulling more weight than the numbers suggest, the job should get slower, not red.

How to tell if this was right

  • Baseline: Test = 19m02s with the cache.
  • Expected: ~16m, from removing 175s of transfer.
  • MCP Smoke caches target/ identically and is deliberately untouched, so it acts as a control.

If Test does not improve, revert this — the measurement is the point, and it is one file.

Not addressed

cargo test --doc (174s) and the wasm conformance step (173s) are real work, not overhead. They could move to parallel jobs to shorten the critical path, but each new job pays ~200s of runner setup and takes a slot from a small self-hosted pool, so that trade needs its own measurement rather than being bundled here.

The Test job restored and saved a 2.7 GB `target/` directory through
actions/cache on every run: 95s to pull it down at ~47 MB/s and 80s to
push it back, so 175s of the job's 19 minutes was cache transfer.

That predates kache. kache is now the compiler cache and reported a 96.4%
hit rate on the same run, served from a local 80 GiB store by reflink —
so the work the target cache exists to avoid is already avoided, far more
cheaply than a 2.7 GB round trip over the network.

Also raise the job's timeout from 30 to 45 minutes. It is not a fix for
anything, it is a guard: this job hit exactly 30 minutes on the first run
of soma#330 with every test passing and roughly three minutes of work
left, so it was already brushing the limit. If dropping the cache turns
out to cost more than it saved, the job should get slower rather than go
red.

Measurable either way: the Test job was 19m02s with the cache. MCP Smoke
caches `target/` the same way and is deliberately left alone, so it stays
a control for this change.
@jmagar
jmagar enabled auto-merge (squash) August 7, 2026 17:42
@jmagar
jmagar merged commit e876708 into main Aug 7, 2026
30 checks passed
@jmagar
jmagar deleted the perf/ci-test-drop-redundant-target-cache branch August 7, 2026 17:52
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