Skip to content

local gate: run tier2-linux beside the Rust lanes, and make the nextest thread count configurable #2769

Closed

Description

@vpacher

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:

  1. tier2-linux has no group. 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-linux runs in its own Docker container, with its own build and zccache volumes. It shares no build directory with the host lanes.
  2. rust_tests() in ci/local_gate.py sets --test-threads to min(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 overrides NEXTEST_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

Proposal

  1. In local-gate.toml, add group = "docker" (or a similar name) to [gate.lanes.tier2-linux].
  2. In ci/local_gate.py, read the nextest thread count from an environment variable, for example OBS_GATE_TEST_THREADS, with the current min(4, os.cpu_count()) as the default. CI does not set the variable, so CI does not change.
  3. Make ci/test_rust_execution.py independent of that variable (it compares the nextest command line with a fixed 4, and fails when the caller sets the variable).
  4. 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 five RUN_SERIAL deinterlace 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

Activity

  1. zackees commented on Oct 28, 2026

    @zackees
    Member

    Claiming: investigation — the local gate's lane scheduling and the nextest thread count

    Plan, one PR:

    1. Verify on this host that ci-lint local-gate supports a per-lane group (heavy lanes in different groups run as concurrent chains) and that tier2-linux shares no build directory with the host lanes, so a docker group is safe.
    2. RED: a ci/test_*.py pin that fails on master — local-gate.toml has no group on tier2-linux, and ci/local_gate.py ignores OBS_GATE_TEST_THREADS.
    3. GREEN: group = "docker" on [gate.lanes.tier2-linux]; thread count read from OBS_GATE_TEST_THREADS with min(4, os.cpu_count()) as the default; ci/test_rust_execution.py made independent of the caller's environment; the two settings documented in the local-gate section of the CI guide.
    4. Record a measured before/after local-gate run wall 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_JOBS plus 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.

  2. added
    needs-investigation
    on Oct 28, 2026
  3. added
    infra
    on Oct 28, 2026
  4. zackees commented on Oct 28, 2026

    @zackees
    Member

    /ready

  5. added
    ready
    and removed
    needs-investigation
    on Oct 28, 2026
  6. zackees commented on Oct 28, 2026

    @zackees
    Member

    Claiming: gate lane group + OBS_GATE_TEST_THREADS

    PR opened: #2771 (RED 079d7ccb69, GREEN 94d4dfc0bc). tier2-linux now has group = "docker" in local-gate.toml (its own heavy chain, ci.yml#399), and ci/local_gate.py reads OBS_GATE_TEST_THREADS for nextest's --test-threads with min(4, os.cpu_count()) as the default. Both are pinned by ci/test_local_gate.py and ci/test_rust_execution.py and documented in docs/ci-tooling.md.

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

Metadata

Metadata

Assignees

Labels

infraready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions