Skip to content

perf(ci): oversubscribe Fast Gate nextest to 8 threads with native_build capped at 2 (~13 s) #3071

Closed

Description

@zackees

Problem

Fast Gate's nextest step runs --test-threads 4 on a 4-vCPU runner (ubuntu-26.04). The 8 test binaries keep all 4 slots full (326 s of test time / 4 ≈ 82 s of run time in merge-queue run 41042404269), so the only remaining lever is oversubscription: many tests wait on I/O or subprocesses.

Measurement (local, pinned to 4 cores, OBS_PARITY_CASES=reduced)

Threads Wall CPU 30 s timeouts
4 150 s 417 s 0
6 not recorded not recorded 5 (all native_build::*)
8 124 s 408 s 1 (not captured)

The native_build::* tests drive cmake and compilers, so they compete for CPU and hit the #3012 per-test budget when oversubscribed.

Proposal

test-threads = 8 with a nextest test group for native_build::* (max-threads = 2) in ci/nextest.toml. Expected about 13 s per Fast Gate run in CI.

Acceptance

  • A ci/test_*.py pins the thread count and the test group.
  • No timeouts over at least 5 merge-queue runs; if any appear, back it out.
  • Before/after Fast Gate unit-test step times in the PR.

Refs #2888, #930.

Activity

  1. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Claiming: #3071 (the follow-up I filed from the Fast Gate measurement).

    Plan (one PR, RED then GREEN):

    1. RED: ci/test_nextest_oversubscription.py pins test-groups.native-build
      at max-threads = 2, a test-group override for native_build::* in both
      nextest profiles, and test_threads() returning 8. It fails on master.
    2. GREEN: ci/nextest.toml gains the test group and the native_build
      overrides; ci/local_gate.py's default bound becomes 8 with the
      OBS_GATE_TEST_THREADS override unchanged; ci/test_rust_execution.py
      follows the new default.
    3. Evidence: before/after of the Fast Gate unit-test step, plus a local
      reduced-parity run at 8 threads with the group, checking no test hits the
      slow-timeout terminate-after (perf(ci): 26 Rust tests take 48 % of the Fast Gate test time; add a per-test time budget #2888).

    The "no timeouts over at least 5 merge-queue runs" acceptance is a post-merge
    watch: if one appears, back the thread count out in a follow-up. The PR says
    so with Refs #3071.

  2. added
    ready
    on Oct 30, 2026
  3. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    PR opened: #3082 (draft until Fast Gate is green).

    RED b40f3f50a (ci/test_nextest_oversubscription.py fails on master), GREEN 91445826d (DEFAULT_TEST_THREADS = 8, native-build test group capped at 2 in the default and full profiles). Local --only self-test lane is green. The 5-merge-queue-runs no-timeout check stays open on this issue after merge.

  4. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Watch evidence for this issue's acceptance ("no timeouts over at least 5 merge-queue runs; if any appear, back it out").

    Since #3082 merged (2026-10-30T18:45Z) there have been 9 merge-queue runs. Three ended red, all on the Fast Gate nextest step, all with a single 30 s timeout:

    run head timed-out test
    41112622006 5f05631c4 source::audio_input::edge_downmix_model
    41115953781 0918ec95e source::audio_input::edge_downmix_model
    41133193773 d0daa4271 hotkey::translations_parity::large_templates_match_c

    Two of the three are the audio input proptest that #3103 fixed by scaling it with the CI level (merged 21:14Z, after both runs). The third is a deterministic test whose input sizes are fixed; it was SLOW [> 10.000s] on the next green run (41135249870) and is now tracked and fixed in #3109 / PR #3110 (7.725 s → 0.357 s locally at the reduced level).

    So: no timeout is attributable to the thread count itself, and every cause found has a fix on master or in review. Recommendation is to keep the oversubscription and re-run this watch after #3110 merges rather than backing it out; if a timeout appears again with neither test in the log, back it out.

  5. zackees commented on Oct 31, 2026

    @zackees
    MemberAuthor

    Watch re-run after #3110 (test(ci): scale the hotkey large templates by the parity level, merged 2026-10-30T23:11Z in run 41142896027).

    Merge-queue runs since then:

    run created result
    41142896027 23:11Z success
    41143587390 23:17Z success
    41145844746 23:40Z success

    3 of 3 green, no 30 s timeout in any Fast Gate nextest step. Both causes named in the previous watch comment now have their fix on master (#3103 for source::audio_input::edge_downmix_model, #3110 for hotkey::translations_parity::large_templates_match_c), so nothing is attributable to the thread count.

    Acceptance asks for 5 merge-queue runs without a timeout; 2 more and this issue closes with the oversubscription kept. If a timeout appears with neither test in the log before then, it gets backed out.

  6. zackees commented on Oct 31, 2026

    @zackees
    MemberAuthor

    Acceptance met: 5+ merge-queue Pull runs green with no Fast Gate nextest timeout.

    Runs since the previous watch comment:

    run created head result
    41149359331 00:17Z 9bf89c2d6 success
    41150472923 00:29Z fb0b95780 success
    41151618163 00:42Z b60d442cb success
    41145844746 23:40Z 1d07cff8a success
    41143587390 23:17Z 72eca93fc success
    41142896027 23:11Z 3df7c10de success

    Six consecutive green merge-queue runs, each with the whole Fast Gate ⚡
    nextest step passing — so no test hit the 30 s slow-timeout terminate-after.
    Both causes from the earlier red runs already have their fix on master (#3103
    for source::audio_input::edge_downmix_model, #3110 for
    hotkey::translations_parity::large_templates_match_c); nothing left is
    attributable to the 8-thread oversubscription.

    Keeping test-threads = 8 with native_build::* capped at 2 (#3082,
    merged 2026-10-30T18:45Z). Closing; a later timeout whose log names neither
    of those two tests is reason to reopen and back the thread count out.

  7. moved this from In progress to Done in obs-rust Multiviewon Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions