ci(docker): start the floor runtime download with the checkout, not in front of the smoke test #2514

Merged
jaylouisw merged 1 commit from ci/1124-0227 into main 2026-11-24 03:08:45 +00:00
Owner

What was slow

Server smoke and Docker build (task 26842, run 10300, push to main, 2026-11-24T02:11:09Z) took 48 s; over the 112 tasks of the two days to 2026-11-24T02:27Z it is p50 45 s, p90 57 s, max 90 s - against hourly medians of 21-25 s on 2026-11-21, before the smoke client needed a runtime of its own (#2491).

The step #2491 added downloads v22.23.5/node-v22.23.5-linux-x64.tar.gz (56,856,114 bytes) and unpacks it on the serial path: nothing after it can start until it finishes. Measured against that exact URL in a container here: 2.35 s download + 1.43 s unpack = 3.78 s that nothing overlapped, in a job that already overlaps its Docker CLI fetch and its smoke test.

The change

The checkout step above already spends ~5 s fetching the commit and a few more seconds classifying the diff, and neither needs the tarball's bytes. The download and unpack now start there - after the git fetch, so the two never compete for the same link - and Provide the runtime the smoke client needs waits on a marker file instead of starting the download.

  • The unpack lands in a staging directory and is moved into /opt/node-v22.23.5 only when complete, so a half-written tree can never look executable.
  • A prefetch that is missing, late, killed or half-written falls through to the same bounded curl, the same single retry and the same [ -x ... ] assertion the step always had. The only thing this can move is the clock.
  • A merged/closed pull request or a data-only diff stops the fetch (stop_prefetch), as this job already stops its Docker CLI prefetch.
  • Same tarball, URL, destination, assertion and check-node-floor.js run in every build.

Baseline / after

job duration evidence
before Server smoke and Docker build 48 s task 26842, run 10300, push to main
before (window) same p50 45 s, n=112 2026-11-22T00:00Z - 2026-11-24T02:27Z
after same 65 / 67 / 71 s tasks in runs 10341, 10345, 10350 (post-merge pushes)

The after numbers are not a like-for-like comparison and are reported as they are: those three pushes landed on a saturated host - their Test (Node 22) legs took 69/63/68 s where the same job on the baseline window is p50 54 s - so the job's end-to-end delta sits inside today's +-20 s host noise. The measured part is the step: 3.78 s of serialized download and unpack that is now overlapped with work the job was already doing. Dispatched A/B runs on a quiet host (baseline ci/1124-ab at 572494bf vs main) are recorded below as they complete.

Coverage unchanged: every suite still runs in both legs, the smoke test still runs on the floor runtime, the version assertion still runs, the image still builds; nothing is skipped, softened or retried that was not before. The patched workflow ran the full suite green on both Node legs in runs 10325, 10331 and 10333 before this merged.

Local: node scripts/check-ci-disk-hygiene.js and node scripts/check-canonical-urls.js pass, both edited step bodies pass bash -n, the YAML parses.

## What was slow `Server smoke and Docker build` (task 26842, run 10300, push to main, 2026-11-24T02:11:09Z) took **48 s**; over the 112 tasks of the two days to 2026-11-24T02:27Z it is p50 **45 s**, p90 57 s, max 90 s - against hourly medians of **21-25 s** on 2026-11-21, before the smoke client needed a runtime of its own (#2491). The step #2491 added downloads `v22.23.5/node-v22.23.5-linux-x64.tar.gz` (56,856,114 bytes) and unpacks it **on the serial path**: nothing after it can start until it finishes. Measured against that exact URL in a container here: **2.35 s download + 1.43 s unpack = 3.78 s** that nothing overlapped, in a job that already overlaps its Docker CLI fetch and its smoke test. ## The change The checkout step above already spends ~5 s fetching the commit and a few more seconds classifying the diff, and neither needs the tarball's bytes. The download and unpack now start there - after the `git fetch`, so the two never compete for the same link - and `Provide the runtime the smoke client needs` waits on a marker file instead of starting the download. * The unpack lands in a staging directory and is moved into `/opt/node-v22.23.5` only when complete, so a half-written tree can never look executable. * A prefetch that is missing, late, killed or half-written falls through to the same bounded `curl`, the same single retry and the same `[ -x ... ]` assertion the step always had. The only thing this can move is the clock. * A merged/closed pull request or a data-only diff stops the fetch (`stop_prefetch`), as this job already stops its Docker CLI prefetch. * Same tarball, URL, destination, assertion and `check-node-floor.js` run in every build. ## Baseline / after | | job | duration | evidence | |---|---|---|---| | before | `Server smoke and Docker build` | 48 s | task 26842, run 10300, push to main | | before (window) | same | p50 45 s, n=112 | 2026-11-22T00:00Z - 2026-11-24T02:27Z | | after | same | 65 / 67 / 71 s | tasks in runs 10341, 10345, 10350 (post-merge pushes) | **The after numbers are not a like-for-like comparison and are reported as they are:** those three pushes landed on a saturated host - their `Test (Node 22)` legs took 69/63/68 s where the same job on the baseline window is p50 54 s - so the job's end-to-end delta sits inside today's +-20 s host noise. The measured part is the step: 3.78 s of serialized download and unpack that is now overlapped with work the job was already doing. Dispatched A/B runs on a quiet host (baseline `ci/1124-ab` at 572494bf vs `main`) are recorded below as they complete. **Coverage unchanged:** every suite still runs in both legs, the smoke test still runs on the floor runtime, the version assertion still runs, the image still builds; nothing is skipped, softened or retried that was not before. The patched workflow ran the full suite green on both Node legs in runs 10325, 10331 and 10333 before this merged. Local: `node scripts/check-ci-disk-hygiene.js` and `node scripts/check-canonical-urls.js` pass, both edited step bodies pass `bash -n`, the YAML parses.
ci(docker): start the floor runtime download with the checkout, not in front of the smoke test
All checks were successful
CI / Server smoke and Docker build (pull_request) Successful in 59s
CI / Test (Node 22) (pull_request) Successful in 59s
CI / Typecheck (pull_request) Successful in 22s
CI / Test (Node 24) (pull_request) Successful in 1m7s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 14s
CI / Arm auto-merge (pull_request) Successful in 7s
b76d16b842
The `Provide the runtime the smoke client needs` step added for #2491 downloads
the v22.23.5 tarball (56,856,114 bytes) and unpacks it on the serial path, so
nothing can start until it has finished. Measured against that exact file on
this host: 2.35 s of download plus 1.43 s of unpack, 3.78 s in the middle of a
job whose median was 48 s on 2026-11-24 (task 26842, run 10300, push to main)
and 45 s over the 112 tasks of the preceding two days - against the 21-25 s
hourly medians of 2026-11-21, before the runtime was needed there at all.

The checkout above it already spends ~5 s fetching the commit and a few more
classifying the diff, and neither needs the tarball's bytes, so the download and
the unpack start there instead - after the git fetch, so the two never compete
for the same link - and the runtime step waits on a marker file. The unpack
lands in a staging directory and is moved into /opt/node-<release> only when it
is complete, so a half-written tree can never look executable, and a prefetch
that is missing, late or killed falls through to the same bounded curl, the same
single retry and the same `[ -x ... ]` assertion the step has always had. A
merged/closed pull request or a data-only diff stops the fetch, the same way
this job already stops its Docker CLI prefetch.

Coverage is unchanged: same tarball, same URL, same destination, same assertion,
same version check, in every run that builds. The legs prefetch their runtime in
their `still_open` step for the same reason.
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-24 02:56:10 +00:00
jaylouisw deleted branch ci/1124-0227 2026-11-24 03:08:49 +00:00
Author
Owner

Measured A/B, dispatched on this host after the merge, old workflow vs new, one run each in sequence:

ref workflow run docker job legs
ci/1124-ab @ 572494bf (before) old 10357 76 s 60 / 64 s
main (after) new 10358 73 s 97 / 76 s
ci/1124-ab @ 572494bf (before) old 10359 73 s 68 / 65 s
main (after) new 10360 48 s 55 / 51 s

The host was busy while these interleaved (10358's legs at 97 s are the tell), so the honest reading is: the step this PR overlaps is worth 3.78 s measured directly against the same tarball, and the job-level deltas above (73 -> 73, 73 -> 48) are dominated by how loaded the host was when each run landed, not by 4 s.

Coverage unchanged: full suite green on both Node legs in runs 10325, 10331, 10333 (patched branch), 10358 and 10360 (patched main), and in the merge's own push run 10341.

Measured A/B, dispatched on this host after the merge, old workflow vs new, one run each in sequence: | ref | workflow | run | docker job | legs | |---|---|---|---|---| | `ci/1124-ab` @ 572494bf (before) | old | 10357 | 76 s | 60 / 64 s | | `main` (after) | new | 10358 | 73 s | 97 / 76 s | | `ci/1124-ab` @ 572494bf (before) | old | 10359 | 73 s | 68 / 65 s | | `main` (after) | new | 10360 | 48 s | 55 / 51 s | The host was busy while these interleaved (10358's legs at 97 s are the tell), so the honest reading is: the step this PR overlaps is worth 3.78 s measured directly against the same tarball, and the job-level deltas above (73 -> 73, 73 -> 48) are dominated by how loaded the host was when each run landed, not by 4 s. Coverage unchanged: full suite green on both Node legs in runs 10325, 10331, 10333 (patched branch), 10358 and 10360 (patched main), and in the merge's own push run 10341.
Sign in to join this conversation.
No description provided.