fix(queue): no light job beside a timed run, and a timed run on a busy PC says to run it again #2403

Merged
HumanBean merged 2 commits from HumanBean/Longshot:push-nunrwunzutuk into main 2026-11-23 20:24:10 +00:00
Owner

Summary

A timed run could be measured while the PC was busy, and nothing said so.

  • Light jobs ran beside timed runs. A test suite queued as light (tests/run_all.py --jobs 10) ran beside a timed game run and pushed the PC into swap (20–180 MB/s). The Market's p99 went from 13 to 25 ms and its 1% low from 76 to 40 fps. Light jobs now wait for a timed run, and a timed run waits for them, as builds already did (conflict in scripts/devtools/jobqueue.py). The docs now put the test suites and compile-and-run checks in build.
  • The queue now records how busy the PC was during a timed run. It samples the rest of the PC every 2 s: CPU, memory and disk stalls (PSI), the swap rate, the other CPUs' use, builds outside the queue and jobs of the queue beside it.
    • The noise record in dev.py queue history now holds all of this. A run past NOISY's limits is marked NOISY, run it again. Before, only CPU pressure over 20 % or a build outside the queue counted, and the spoiled run had about 5 % CPU pressure.
    • The limits are CPU stalls 20 %, memory stalls 1 %, disk stalls 10 %, swapping 8 MB/s, and the other CPUs 50 % busy. On this PC, idle sits at 0 %, 0.1 %, 0.3 %, about 2 MB/s and 6–10 %.
  • dev.py ab says which runs to do again. It passes queue run --noise FILE, judges each run on the samples of its measured stretch only, and adds a Noisy: line to the write-up naming those runs. Run lines get (NOISY: …) too.
  • A release-benchmark skill and scripts/release_bench.py. These compare a stable release against main from the two release AppImages' builds. Each run is one game session through Kokiri Forest, the Market and Hyrule Field, A, B, A, B, at 1080p and 4K. NOISY areas are left out of the medians.

Read first: noise_summary, noise_reasons and conflict in jobqueue.py, then measured_noise in ab.py.

Testing

Tested: Linux (CachyOS 7.3), RTX 3090. Run directly from the new code on this PC, Noise sampled the idle PC with no reasons given (memory_stall_max 0.1, swap_mb 9 in 4 s, other_cpus_busy 6). The release-benchmark procedure (builds, options and multi-area runs) is what produced the stable-vs-main numbers this session; release_bench.py is that runner, with the noise check added. The game-free tests cover the light rule (it fails on main, where a light job starts beside a timed run), each kind of noise, an idle PC's swap trickle, the samples file, and dev.py ab judging only the measured stretch. They were not run on this PC; CI runs them.

Still to test:

  • Windows: a timed run through dev.py ab, expecting no noise record and no Noisy line, as before (the sampler is Linux-only) (by hand)

Measurements

Nothing to measure: dev tooling, nothing the game runs changes.

Risks

  • While a timed run measures, light jobs (a copy, a quick check, dev.py vk) now wait for it. A long batch of timed runs holds them, as it already held builds.
  • Older copies of the queue on the PC still start a light job beside a timed run; this one waits for theirs. Their tickets are unchanged.
  • A limit set too tight marks quiet runs NOISY. It only adds a warning line: no run is refused, and the numbers are still written up.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). (CI)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.

πŸ€– Generated with Claude Code

## Summary A timed run could be measured while the PC was busy, and nothing said so. - **Light jobs ran beside timed runs.** A test suite queued as `light` (`tests/run_all.py --jobs 10`) ran beside a timed game run and pushed the PC into swap (20–180 MB/s). The Market's p99 went from 13 to 25 ms and its 1% low from 76 to 40 fps. Light jobs now wait for a timed run, and a timed run waits for them, as builds already did (`conflict` in `scripts/devtools/jobqueue.py`). The docs now put the test suites and compile-and-run checks in `build`. - **The queue now records how busy the PC was during a timed run.** It samples the rest of the PC every 2 s: CPU, memory and disk stalls (PSI), the swap rate, the other CPUs' use, builds outside the queue and jobs of the queue beside it. - The noise record in `dev.py queue history` now holds all of this. A run past `NOISY`'s limits is marked **NOISY, run it again**. Before, only CPU pressure over 20 % or a build outside the queue counted, and the spoiled run had about 5 % CPU pressure. - The limits are CPU stalls 20 %, memory stalls 1 %, disk stalls 10 %, swapping 8 MB/s, and the other CPUs 50 % busy. On this PC, idle sits at 0 %, 0.1 %, 0.3 %, about 2 MB/s and 6–10 %. - **`dev.py ab` says which runs to do again.** It passes `queue run --noise FILE`, judges each run on the samples of its measured stretch only, and adds a **Noisy:** line to the write-up naming those runs. Run lines get `(NOISY: …)` too. - **A `release-benchmark` skill and `scripts/release_bench.py`.** These compare a stable release against main from the two release AppImages' builds. Each run is one game session through Kokiri Forest, the Market and Hyrule Field, A, B, A, B, at 1080p and 4K. NOISY areas are left out of the medians. Read first: `noise_summary`, `noise_reasons` and `conflict` in `jobqueue.py`, then `measured_noise` in `ab.py`. ## Testing **Tested:** Linux (CachyOS 7.3), RTX 3090. Run directly from the new code on this PC, `Noise` sampled the idle PC with no reasons given (`memory_stall_max` 0.1, `swap_mb` 9 in 4 s, `other_cpus_busy` 6). The release-benchmark procedure (builds, options and multi-area runs) is what produced the stable-vs-main numbers this session; `release_bench.py` is that runner, with the noise check added. The game-free tests cover the light rule (it fails on `main`, where a light job starts beside a timed run), each kind of noise, an idle PC's swap trickle, the samples file, and `dev.py ab` judging only the measured stretch. They were not run on this PC; CI runs them. **Still to test:** - Windows: a timed run through `dev.py ab`, expecting no noise record and no Noisy line, as before (the sampler is Linux-only) (by hand) ## Measurements Nothing to measure: dev tooling, nothing the game runs changes. ## Risks - While a timed run measures, light jobs (a copy, a quick check, `dev.py vk`) now wait for it. A long batch of timed runs holds them, as it already held builds. - Older copies of the queue on the PC still start a light job beside a timed run; this one waits for theirs. Their tickets are unchanged. - A limit set too tight marks quiet runs NOISY. It only adds a warning line: no run is refused, and the numbers are still written up. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). (CI) - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. πŸ€– Generated with [Claude Code](https://claude.com/claude-code)
A test suite queued as light (tests/run_all.py --jobs 10) ran beside a timed run and swapped 20-180 MB/s: the Market's
p99 went from 13 to 25 ms. Light jobs now wait for a timed run and a timed run for them, as builds do; the test suites
go in build.

The queue samples the rest of the PC every 2 s while a timed run measures (CPU, memory and disk stalls, swapping, the
other CPUs' use, builds outside the queue, jobs beside it) and marks the history NOISY past NOISY's limits. dev.py ab
reads the samples of each run's measured stretch (queue run --noise FILE) and adds a Noisy line naming the runs to do
again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
feat(skills): release-benchmark, a stable release against main from release builds, and release_bench.py
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Workflow lint (actionlint) (pull_request) Successful in 11s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 11s
Third-party parts / As their notes say (pull_request) Successful in 13s
PR description / Description follows the template (pull_request_target) Failing after 5s
CI / Website build and checks (pull_request) Successful in 7m5s
89897292a7
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member

Possibly related, for context:

  • PR #2187 WIP: fix(dev): a timed run's noise names the queue's jobs that ran beside it β€” Overlapping timed-run noise recording and queue code
  • PR #2257 WIP: fix(queue): a light suite waits for a timed run or game β€” Same light-vs-timed queue serialization fix
Possibly related, for context: - PR #2187 WIP: fix(dev): a timed run's noise names the queue's jobs that ran beside it β€” Overlapping timed-run noise recording and queue code - PR #2257 WIP: fix(queue): a light suite waits for a timed run or game β€” Same light-vs-timed queue serialization fix
HumanBean changed title from WIP: fix(queue): no light job beside a timed run, and a timed run on a busy PC says to run it again to fix(queue): no light job beside a timed run, and a timed run on a busy PC says to run it again 2026-11-23 20:24:02 +00:00
HumanBean deleted branch push-nunrwunzutuk 2026-11-23 20:24:10 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2403
No description provided.