From 1e05bb23ea3860a745e7e90ba43d8d6bdfd9b95f Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 12 Aug 2026 11:12:25 +0300 Subject: [PATCH] :zap: A desktop is not a settled device, and the boot that read 3.5 Hz spent its probe window compiling shaders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `scripts/perf-ab/perf-ab.sh` — settle 25 s after the desktop rather than 8 s. One boot of nine in the first interleaved run scored 3.5 Hz and 1 738 draws/s against a population of 50-58 Hz and 40-54 000. Its slice holds 69 `air_loading` records and 6 translates, so the probe drove a guest that was still compiling the shaders it was about to draw with. That is an outlier a reader has to find and exclude by hand, and the wait is what it was short of. The measurements this harness has taken so far are in `kb/` (gitignored) and are summarised here because they redirect the performance work: - On this Intel iGPU the chain's phase ranking is **inverted** against the discrete host every constant in `AGENTS.md` was priced on: `engine` 55-56 % and `store` 21 %, against 28 % and 35 % there. - This device is **CPU-bound** here — `gpu_span` reads 51-64 % GPU duty while the drain worker's own duty is ~1.0 — where `runtime::pipeline_resolve`'s doc correctly concludes the opposite about its host. - Inside the engine phase, `record_us` is **4.84 µs a draw**, ~40 % of the span. - Both experiments left in the tree for exactly this host class come back **null**: `PASS_CHURN=on` and `LAYOUT_CHURN=on` overlap shipping on `present_hz` and on `us/draw` over three interleaved rounds. - `passheld_*` says why the pass merge cannot be the lever here: the dominant reason a pass does not survive to the next draw is a **guest buffer gather** recorded outside it, on nearly every draw. `PASS_CHURN`'s doc measured the reachable share at 82 % on the discrete host; here it is a small minority. So the gather is both the record cost and the pass-merge blocker. Sparse buffer binding does not rescue it — ANV's sparse block is 64 KiB and the measured region is 14.7 KB — which leaves not gathering the same window twice, against a measured 91 % recurrence. That is a cache, it is the shape whose failure is occasional transient corruption, and it does not get built on a recurrence rate alone. # Verified `bash -n`. The measurements above are three plus nine driven macos-13 boots on a quiesced host, interleaved, one binary. Co-Authored-By: Claude --- scripts/perf-ab/perf-ab.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/perf-ab/perf-ab.sh b/scripts/perf-ab/perf-ab.sh index a903fe962..062aa26d8 100755 --- a/scripts/perf-ab/perf-ab.sh +++ b/scripts/perf-ab/perf-ab.sh @@ -100,7 +100,13 @@ for arm in $ARMS; do "$REPO/scripts/app-sweep-probe/wait-for-desktop.sh" --timeout 400 \ || { say "$tag: no desktop"; printf '%s\t%s\tNO-DESKTOP\n' "$round" "$arm" >>"$RESULTS"; \ pkill -f 'qemu-system-x86_6[4].*reims-vgpu'; sleep 6; continue; } - sleep 8 + # A desktop is not a settled device. One boot scored here read 3.5 Hz and + # 1 738 draws/s against a population of 50-58 Hz and 40-54 000 — and its slice + # holds 69 `air_loading` records and 6 translates, so the probe window was + # spent compiling the guest's shaders rather than drawing with them. The wait + # is long enough to put that behind the mark, and the cost is one settle per + # boot against an outlier that has to be found and excluded by hand. + sleep 25 # Everything before this point is boot noise; the scored window starts here. MARK=$(grep -c '' /tmp/reims-vgpu-fail.log)