Skip to content

perf(ci): Tier 2 Linux zccache restore takes 60-85 s because the 2 GiB bound never runs in the containerΒ #3026

Closed

Description

@zackees

The Rust Tier 2 Linux 🐧 (build) job (merge-queue critical path) spends 43–86 s restoring its zccache: queue run 41023136317 downloads a 2.13 GB archive in 21 s, then extracts for 37 s; master push 41020034958 took 10 s + 75 s extract. The build only uses 1490 artifacts (1.3 GB) (99.7% hits).

Cause: the archive is far bigger than the cache the build uses, because the Bound zccache 🧹 step never fires. The job runs in a container, and ${{ github.workspace }} inside a run: script body expands to the host path /home/runner/work/obs-studio/obs-studio, which is not mounted in the container (the workspace is /__w/obs-studio/obs-studio). So [ -d "$dir" ] is always false and the 2 GiB cap is a no-op; stale artifacts pile up across master saves. (Action inputs and step env: are translated to container paths, which is why restore/save and zccache itself work.)

Evidence: a local Tier 2 zccache volume of the same zccache 1.15.5 (1.55 GB tar) compresses to 199 MB with zstd -3 (decompress 2.2 s); the CI archive at the same level is 2.13 GB, i.e. roughly 10Γ— the data the build needs.

Fix: read the path from $GITHUB_WORKSPACE (the container path) in the bound step and print the size every run so it is visible. One cold master rebuild re-seeds a cache of about one build; restore should drop to a ~250 MB archive (~5–10 s).

Activity

  1. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Claiming: #3026 together with #3027 (same job, one PR). Plan: RED ci/test pin, GREEN workflow fix; PR today.

  2. added
    ready
    on Oct 30, 2026
  3. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Fixed by #3028 (merged bfae421). The first master push after it (run 41027144517) printed zccache dir is 13867 MiB: the restored dir was 13.9 GB of stale artifacts behind a 2.13 GB archive, for a build that uses 1.3 GB. The bound fired and the build ran cold, and the new saved entry is 239 MB (was 2,238 MB). Restore was 58–86 s (21 s download + 37–75 s extract), and with a ~10Γ— smaller archive it should drop to a few seconds. I'll confirm on the next PR/queue run that selects Tier 2. Unrelated and already known: that cold build hit the zccache daemon-lost recovery path (4 lost requests, rebuilt once, job green).

  4. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Restore measured after #3028 (bfae421).

    • Master push 41027144517 (bfae421): restored the old ad178c3e4 archive (2,134 MB compressed, 46 s), the bound reported zccache dir is 13867 MiB and started cold, build 618 s, saved zccache-tier2-linux-both-bfae421… at 228 MB.
    • First run after it, master push 41029415712 (2a1fcf3): restored that 228 MB archive (4 s vs 58-86 s; dir 1,504 MiB vs 13,867 MiB), build 245 s, saved 233 MB.
    • Same commit's merge-group run 41028316545 still restored the pre-fix ad178c3 key (86 s, 2,238 MB): the queue run started before the bfae421 save landed.

    Restore+build: 245 s before (master 41024205981: 84 + 161 s) vs 249 s now (4 + 245 s). Restore is 80 s faster; the build is ~80 s slower on its first run from a single-tree cache, so net neutral for now. Watching the next master/queue runs to see the build time settle; if it stays above ~170 s I will reopen the size cap.

  5. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Follow-up: the build time has settled. Restore + build in the next runs: queue 41032828133 7 + 206 s, master 41033952321 4 + 137 s. Before #3028 it was 58-86 s + 161-193 s. The restore is about 80 s faster with a 228-233 MB archive instead of 2,134 MB, and the build is back in its old range or below it. No regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions