CI: macOS relinker jobs wait ~40 min in queue on most PRs; bookkeeping jobs wait 10-15 min (data from 1,000 runs) #14396

Closed
opened 2026-11-01 11:24:49 +00:00 by LeandroLP23 · 0 comments
LeandroLP23 commented 2026-11-01 11:24:49 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-11-01T11:24:49Z.


I measured where CI time goes, from the last 1,000 workflow runs: 2,141 jobs, 09:56–11:19 UTC today, 1.4 h. The bottleneck is runner queueing, not job length. The worst case is macOS.

Method. Data from the Actions API (runs/{id}/jobs). Queue is started_at − created_at; run time is completed_at − started_at, for completed jobs only. Many cancelled jobs were cancelled while still queued (259 of the 278 cancelled Build jobs ran no step), so counting their time as runner use would overstate waste. Cancelled jobs that did run cost only about 130 runner minutes in the window, so cancellation is not where time goes.

Queue per job (completed jobs):

Workflow / job n Queue median Queue p90 Run median
Build / relinker (macos-latest, clang++) 18 38.9 min 48.3 4.7
Build / relinker (macos-latest, clang++, x86_64) 15 31.9 min 49.6 6.4
PR labels / labels 142 15.4 23.1 0.1
Conventions / conventions 124 13.0 19.5 0.3
PR intake / intake 42 9.6 12.7 0.3
Progress comment / comment 91 9.3 16.9 0.1
Build / relinker (ubuntu-latest, g++) 41 8.6 13.9 4.3
Build / eligibility 136 7.4 12.1 0.1
Build / windows 61 5.7 11.4 15.6
Build / linux (self-hosted) 16 0.0 0.1 28.7

Hosted runners were busy about 31 at a time on average (2,592 completed-job minutes in 84 minutes). Build / windows is the largest single consumer, at 1,041 minutes (40%). Its ccache works: one run had 91% hits, with 189 of 2,172 compiles missing. So there is little to gain there without a bigger change.

1. macOS: two jobs per relinker-relevant PR, each queued ~35–40 min. relinkerHosts always adds both macos-latest variants. select().relinker turns on for any change under tools/, cmake/, core/shader/recompiler/, libc, CMakeLists.txt, .github/pull_request_template.md and .github/workflows/pr-overlap.yml. So a PR that only edits a Python tool, or the PR template, waits about 40 minutes for two macOS slots that finish in 5–6 minutes. #14341 (a SPIR-V emitter change) sat with only the two macOS jobs pending well after every other check had passed. Options:

  • On pull_request, run one macOS variant (arm64) and keep x86_64 for push to main and workflow_dispatch. That halves macOS demand.
  • Build both architectures in one macOS job.
  • Narrow the tools/ prefix to the tools the relinker tests run.

2. Bookkeeping jobs wait 10–15 minutes to run for seconds. PR labels (142 runs in 1.4 h, every edited/synchronize), Progress comment (91), PR intake (42) and Conventions (124) together are about 400 jobs and under 80 runner minutes. Each still takes a hosted slot plus setup, and Conventions feedback arrives about 13 minutes after a push. Folding the label, intake and progress-comment steps into fewer workflows (one job per PR event), and skipping PR labels on edited events that only touch the body, would cut the job count.

3. Smaller:

  • Conflict label runs on every push to main with cancel-in-progress. In the window 13 of 16 runs were cancelled and 2 finished. It also runs hourly, so the per-push trigger could go.
  • Emscripten library portability and Progress report have no concurrency group, so a quick second push to a PR leaves the first run going.

I can turn 1 (one macOS variant on PRs) or 3 into a PR if either is wanted. 2 changes several workflows, so I'd rather hear which shape you prefer first. The data and the script that produced the tables are attached on request.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6146324905 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/14396). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-11-01T11:24:49Z. --- I measured where CI time goes, from the last 1,000 workflow runs: 2,141 jobs, 09:56–11:19 UTC today, 1.4 h. The bottleneck is runner queueing, not job length. The worst case is macOS. **Method.** Data from the Actions API (`runs/{id}/jobs`). Queue is `started_at − created_at`; run time is `completed_at − started_at`, for completed jobs only. Many cancelled jobs were cancelled while still queued (259 of the 278 cancelled `Build` jobs ran no step), so counting their time as runner use would overstate waste. Cancelled jobs that did run cost only about 130 runner minutes in the window, so cancellation is not where time goes. **Queue per job** (completed jobs): | Workflow / job | n | Queue median | Queue p90 | Run median | |---|---|---|---|---| | Build / relinker (macos-latest, clang++) | 18 | **38.9 min** | 48.3 | 4.7 | | Build / relinker (macos-latest, clang++, x86_64) | 15 | **31.9 min** | 49.6 | 6.4 | | PR labels / labels | 142 | 15.4 | 23.1 | 0.1 | | Conventions / conventions | 124 | 13.0 | 19.5 | 0.3 | | PR intake / intake | 42 | 9.6 | 12.7 | 0.3 | | Progress comment / comment | 91 | 9.3 | 16.9 | 0.1 | | Build / relinker (ubuntu-latest, g++) | 41 | 8.6 | 13.9 | 4.3 | | Build / eligibility | 136 | 7.4 | 12.1 | 0.1 | | Build / windows | 61 | 5.7 | 11.4 | 15.6 | | Build / linux (self-hosted) | 16 | 0.0 | 0.1 | 28.7 | Hosted runners were busy about 31 at a time on average (2,592 completed-job minutes in 84 minutes). `Build / windows` is the largest single consumer, at 1,041 minutes (40%). Its ccache works: one run had 91% hits, with 189 of 2,172 compiles missing. So there is little to gain there without a bigger change. **1. macOS: two jobs per relinker-relevant PR, each queued ~35–40 min.** `relinkerHosts` always adds both `macos-latest` variants. `select().relinker` turns on for any change under `tools/`, `cmake/`, `core/shader/recompiler/`, libc, `CMakeLists.txt`, `.github/pull_request_template.md` and `.github/workflows/pr-overlap.yml`. So a PR that only edits a Python tool, or the PR template, waits about 40 minutes for two macOS slots that finish in 5–6 minutes. #14341 (a SPIR-V emitter change) sat with only the two macOS jobs pending well after every other check had passed. Options: - On `pull_request`, run one macOS variant (arm64) and keep x86_64 for `push` to main and `workflow_dispatch`. That halves macOS demand. - Build both architectures in one macOS job. - Narrow the `tools/` prefix to the tools the relinker tests run. **2. Bookkeeping jobs wait 10–15 minutes to run for seconds.** `PR labels` (142 runs in 1.4 h, every `edited`/`synchronize`), `Progress comment` (91), `PR intake` (42) and `Conventions` (124) together are about 400 jobs and under 80 runner minutes. Each still takes a hosted slot plus setup, and `Conventions` feedback arrives about 13 minutes after a push. Folding the label, intake and progress-comment steps into fewer workflows (one job per PR event), and skipping `PR labels` on `edited` events that only touch the body, would cut the job count. **3. Smaller:** - `Conflict label` runs on every push to `main` with `cancel-in-progress`. In the window 13 of 16 runs were cancelled and 2 finished. It also runs hourly, so the per-push trigger could go. - `Emscripten library portability` and `Progress report` have no `concurrency` group, so a quick second push to a PR leaves the first run going. I can turn 1 (one macOS variant on PRs) or 3 into a PR if either is wanted. 2 changes several workflows, so I'd rather hear which shape you prefer first. The data and the script that produced the tables are attached on request. AI-assisted: yes (Claude Code)
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#14396
No description provided.