CI perf (settings): merge queue builds 5 entries at a time — a 13-PR burst took 100 min to drain on a 21-min CI run (~21 min per PR past the 5th)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1 小時以內
- 新手友好度
- 12/100
- Issue 類型
- 重構
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- github-actions
- 領域
- ci-cd
研究方向
The change is a GitHub merge-queue ruleset setting (ruleset 24668460, merge_queue rule, max_entries_to_build), not a file in the repository, so there is no code to open. Only a maintainer with admin access can decide and apply it, and the issue itself says the implementer routine cannot. Done means a human has made the decision and either applied the new value or closed the issue with a reason.
由索引模型根據 Issue 內容生成。
描述
Filed by the CI profiler routine (observer only). This is a ruleset change, so a human has to decide; the implementer routine can't apply it.
Measurement
Window: 2026-10-08 08:17 → 2026-10-09 08:17 UTC. Sources: ruleset 24668460, 157 CI merge_group runs, job detail for 52 of them, and REST timelines of the 14 most recently merged PRs.
Current merge_queue rule: max_entries_to_build: 5, max_entries_to_merge: 5, min_entries_to_merge: 1, grouping_strategy: ALLGREEN, check_response_timeout_minutes: 120.
| metric | value |
|---|---|
| PRs merged / 24h | 69 |
merge_group CI success, created → done, p50 / p90 |
23.4 / 46.1 min (n=80); 21.5 / 23.0 min since 04:17 (n=16) |
| Last enqueue → merge, p50 / p90 (14 PRs merged 03:14–08:01) | 64 / 69 min |
| First enqueue → merge, p50 / p90 | 65 / 82 min |
What happened in the 06:19–08:01 burst. 13 PRs were enqueued between 06:19 and 06:52: #1215, #1209, #1208, #1217, #1193, #1218, #1036, #1041, #1226, #1230, #1229, #1228, plus #1007. They were tested in waves of at most 5 CI runs, and each wave started only after the previous one finished:
| wave created | runs | outcome |
|---|---|---|
| 06:19–06:20 | 5 | all cancelled. test (windows-latest, 1) failed in 37892957346 and evicted #1215; the other 4 were rebuilds (37892958452 etc.) |
| 06:34–06:35 | 5 | 2 ok, 3 cancelled (coverage-docker (sbt) failure in 37894279963) |
| 06:56 | 5 | all ok → merged 06:56 / 07:19 |
| 07:17–07:19 | 5 | all ok → merged 07:38–07:41 |
| 07:38–07:41 | 4 (+1 cancelled) | merged 08:01 |
So the queue's throughput is 5 PRs per ~21 min (≈14/h). The 6th–13th PRs of a burst wait one or two full waves before their own run even starts. Of the 64-min p50, about 21 min is the PR's own run and ~40 min is waiting behind earlier waves.
Where the time goes
- Per wave:
test (windows-latest, 2)(Run tests 15.0 min p50 + Build 2.2),coverage-docker (sbt)→coverage-merge(#1225), and the Gradlee2e_redirect_gradle_build … gradle_hosted_blegs (13.4 min p50, #1171) all finish at 20–22 min. Queue wait for those jobs is ≤0.1 min (Linux/Windows) and 0.2 min p50 (macOS), so the waves are not runner-starved. The limit is the build depth. - Rebuild cost when an entry is evicted (52-run sample):
- 15 runs cancelled purely as rebuilds behind an evicted entry: 4,311 job-min, 287 avg
- 10 runs with a genuine failure: 4,110 job-min
- 27 successful runs: 12,795 job-min, 474 avg
- A deeper build window raises the first number.
Root cause
max_entries_to_build: 5 caps the speculative pipeline at 5 entries. With ALLGREEN groups of up to 5 and every wave taking about the same ~21 min, the queue advances in lock-step waves. During the agent bursts that now produce most merges, every PR past the 5th waits at least one extra full wave.
Proposed fix (ruleset 24668460, merge_queue rule)
- Raise
max_entries_to_build5 → 8, and keepmax_entries_to_mergeat 5 (or raise it to 8 too, so a fully green window lands in one merge). - Leave
grouping_strategy, timeouts and the required checks (ci-ok,clippy) unchanged. - Roll back if any of these hold over the following 24h:
- macOS job queue-wait p90 goes above ~5 min (it is 1.8 min now)
- the merge_group eviction rate stays above ~20%. Then the extra rebuilds cost more than the latency buys; prefer landing the ci-janitor flake fixes (#1237, #1238, #1222, #1244) first.
Expected saving
- Latency: ~21 min off enqueue → merge for every PR that is 6th–8th in line. In the window above that was 8 of 13 PRs. Over the day, assuming about a third of 69 merges arrive in bursts, that is ~20 PRs × ~21 min ≈ 7 PR-hours/day. Merge-queue p50 should fall from ~64 toward ~45 min during bursts.
- Critical path per affected PR: −21 min (one wave).
- Cost:
- Each eviction during a burst can rebuild up to 7 entries instead of 4: ≈ +3 × 287 ≈ +860 job-min per eviction.
- At ~5–8 burst evictions/day that is +4–7k job-min/day, ~11% of it macOS (51 mac-min per full run).
- Peak concurrent macOS jobs from the queue would go from 50 (measured at 06:42 with 5 entries; 28.9 mac jobs per run) to roughly 80.
- #1176 / #1234 (fewer e2e-macos legs) would offset most of that.
Coverage and risk
- No test moves; every job still runs on every merge_group run.
- Required check names are unchanged.
- Main risk: macOS pool pressure. It is shared with push-to-main runs (42/day × ~56 mac-min) and every other merge_group run. Watch macOS queue wait on the CI performance dashboard after the change.
- Second risk: more cancelled rebuild minutes while the eviction rate is still ~20–30%.
Effort
S (one ruleset field, reversible in seconds).
ROI
About 7: (≈21 critical-path min − ≈7 weighted for +5k job-min) × confidence 0.5 ÷ effort 1. Same scale as the dashboard.
- 主要語言
- Rust
- 星號
- 9
- 分支
- 2
- 平均合併
- 20 小時 47 分鐘
- 30 天內合併 PR
- 681
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
SocketDev/socket-patch 的其他 Issue
-
agent:triaged arch-audit priority:p3 refactor
難度 2/5 1-3 小時 新手友好度 83/100
SocketDev/socket-patch#1860 ·
維護者通常 1 天內回覆
-
agent:triaged arch-audit priority:p3 refactor
難度 2/5 1-3 小時 新手友好度 78/100
SocketDev/socket-patch#1838 ·
維護者通常 1 天內回覆
-
arch-audit refactor
難度 4/5 3-5 天 新手友好度 54/100
SocketDev/socket-patch#1993 ·
維護者通常 1 天內回覆
-
arch-audit refactor
難度 3/5 1-2 天 新手友好度 66/100
SocketDev/socket-patch#1992 ·
維護者通常 1 天內回覆
-
agent:triaged arch-audit priority:p3 refactor
難度 4/5 3-5 天 新手友好度 35/100
SocketDev/socket-patch#1987 · 1 則留言 ·
維護者通常 1 天內回覆
查看 SocketDev/socket-patch 的全部 Issue
相似的 Issue
-
Perl - Readme Drift可能已有人在做 @Omnideth 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
CommunityToolkit/Aspire#2375 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 86/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆