Repository navigation
Closed
Description
Problem
ci-lint local-gate run runs the four lanes of local-gate.toml one after the other: lint, rust-test, cross, tier2-linux. All four are heavy lanes in the default group, so a lane starts only after the previous lane is complete. On a large local host, most cores are idle for most of the run.
Two settings cause this:
tier2-linuxhas nogroup. ci-lint can run heavy lanes in different groups as concurrent chains (linux-pipewire: Resume a screen capture after its monitor comes back #399). Its own documentation names this case: "a test suite in an isolated container beside host compiles".tier2-linuxruns in its own Docker container, with its own build and zccache volumes. It shares no build directory with the host lanes.rust_tests()inci/local_gate.pysets--test-threadstomin(4, os.cpu_count()). This value is correct for CI runners. On a larger host it limits nextest to 4 threads, and the value cannot be changed from the environment (a command-line argument overridesNEXTEST_TEST_THREADS).
Measurement
Host: Debian 13 LXC, 24 cores, 32 GiB (AMD Zen, shared with other guests). Head: the stamped head of #2763. --no-stamp --no-cache, OBS_CTEST_JOBS=16. One run each.
| Run | lint | rust-test | cross | tier2-linux | Wall time |
|---|---|---|---|---|---|
| Current settings (sequential) | 70 s | 278 s | 116 s | 568 s | 1031 s |
A: group = "docker" on tier2-linux |
34 s | 245 s | 30 s | 574 s | 574 s (−44 %) |
| B: A, plus 16 nextest threads | 34 s | 153 s | 29 s | 590 s | 590 s |
- With A, the Rust lanes run fully inside the time of
tier2-linux.tier2-linuxitself is not slower (574 s against 568 s). - The five real-time
test_deinterlace_2x_field_order_*tests (RUN_SERIAL, ci: isolate deinterlace timing test without relaxing assertions #1343, perf(test): remove nine serial barriers and fix output deactivation race #1643) passed in both runs, also under the load of the Rust compiles beside them. - With B, rust-test is 38 % faster. The wall time does not change at this time, because
tier2-linuxis the longest chain. It will become the longest chain whentier2-linuxgets faster (see "Related").
Proposal
- In
local-gate.toml, addgroup = "docker"(or a similar name) to[gate.lanes.tier2-linux]. - In
ci/local_gate.py, read the nextest thread count from an environment variable, for exampleOBS_GATE_TEST_THREADS, with the currentmin(4, os.cpu_count())as the default. CI does not set the variable, so CI does not change. - Make
ci/test_rust_execution.pyindependent of that variable (it compares the nextest command line with a fixed4, and fails when the caller sets the variable). - Add one line for each setting to the local-gate section of the CI guide.
Open question: does item 1 need a limit for small hosts? On a 4-core machine, two concurrent chains can be slower than one chain. A possible solution is to keep the group and document OBS_CTEST_JOBS and the new variable as the controls.
Related
- Of the 568 s of
tier2-linux, 294 s (147 s for each mode) are the fiveRUN_SERIALdeinterlace tests. They run alone while all other ctest jobs are idle. CI runs them on separate runners (perf(ci): cut the Tier 2 critical path of merge-queue runs (11 min, measured 2026-10-24) #2072), so this cost is local only. I will look at this in a separate issue. - The stamp only lets PR CI skip lanes for authors that GATE-008 trusts. The merge queue always runs every lane on the merge result. Thus, the main benefit of this proposal is faster local feedback before a push.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Oct 28, 2026
Claiming: investigation — the local gate's lane scheduling and the nextest thread count
Plan, one PR:
ci-lint local-gatesupports a per-lanegroup(heavy lanes in different groups run as concurrent chains) and thattier2-linuxshares no build directory with the host lanes, so adockergroup is safe.ci/test_*.pypin that fails on master —local-gate.tomlhas nogroupontier2-linux, andci/local_gate.pyignoresOBS_GATE_TEST_THREADS.group = "docker"on[gate.lanes.tier2-linux]; thread count read fromOBS_GATE_TEST_THREADSwithmin(4, os.cpu_count())as the default;ci/test_rust_execution.pymade independent of the caller's environment; the two settings documented in the local-gate section of the CI guide.local-gate runwall time on this host in the PR.Open question in the issue (a concurrency limit for small hosts) I will answer as: keep the group unconditional and document
OBS_CTEST_JOBSplus the new variable as the controls, because a core count that silently serializes lanes would make the gate's behaviour host-dependent and untestable offline.infra(gate): run tier2-linux beside the host lanes and lift nextest's…
zackees commentedon Oct 28, 2026
/ready
zackees commentedon Oct 28, 2026
Claiming: gate lane group + OBS_GATE_TEST_THREADS
PR opened: #2771 (RED
079d7ccb69, GREEN94d4dfc0bc).tier2-linuxnow hasgroup = "docker"inlocal-gate.toml(its own heavy chain, ci.yml#399), andci/local_gate.pyreadsOBS_GATE_TEST_THREADSfor nextest's--test-threadswithmin(4, os.cpu_count())as the default. Both are pinned byci/test_local_gate.pyandci/test_rust_execution.pyand documented indocs/ci-tooling.md.infra(gate): run tier2-linux beside the host lanes and lift nextest's…