Hardware Test Plan — PR #661 helios/scheduler: explore smaller prefill chunks under active age-priced streams
Head under test: 3d868f84c5118b40a9ee6112f1d551ecef3d32c4 (15 files, +2778/−186). Base for the reported A/B: main = 1fbcc3c9.
Latest Autobot re-review of this head: Ready To Merge, Blockers: None (earlier Changes-Requested reviews target superseded heads 29f2b5b / c588d61).
The plan below is deliberately small: one model, one machine, ~1 h of GPU time for the decisive gate, plus one optional 30-minute arm. It is built around one fact the PR body does not state plainly — this change is a no-op unless a decoding (or terminal-cleanup) request is resident while a prompt with an unmeasured smaller prefill shape is being scheduled. Most of the wasted-GPU-time risk here is running a trial where the code path cannot execute, or measuring a warm process where the discovery it is meant to test has already happened.
1. What must be true for #661 to do anything (the "canary" conditions)
Verified in the changed code; every trial below is designed so all six hold:
| # | Condition | Source |
|---|---|---|
| 1 | --scheduler-policy balanced (the default): decode_age_price = 0.1, terminal_age_price = 1.0 |
helios/src/scheduler/policy.rs:29-45 |
| 2 | An age-priced stream is resident: a slot in RequestPhase::Decode/Resume while decode_age_price > 0, or any terminal_cleanup (Snapshot) slot while terminal_age_price > 0 |
scheduler.rs:996-1005 |
| 3 | The prefill candidate is unmeasured and capacity <= nat_fit |
policy.rs:531-541 |
| 4 | Interpolation has a positive estimate: a measured sibling, or a measured larger peer, or a measured Decode/Speculative/Resume floor |
cost.rs:695-776 (floor at :715-726) |
| 5 | Catalog has several capacities: prefill_capacities(chunk) — for chunk = 4096 → 128, 256, 512, 1024, 1536, 2048, 2560, 3072, 3584, 4096 |
scheduler.rs:83-92 |
| 6 | For the deferred_prefill / terminal-window paths: a non-empty TERMINAL_PREFILL catalog. Without one, resolve_prefill_kind_from always returns Prefill and the deferred_prefill widening is unreachable |
scheduler.rs:827-845, :901-907 |
Consequences for scheduling the test:
- A pure-decode or pure-prefill load measures nothing. Every arm needs decode + prefill concurrent. (Note this also means the PR's own "pure workloads unchanged" claim is untestable on cn5 for the prefill family — see §5.)
- The
deferred_prefillexclusion and theresize_prefillterminal-catalog restriction are policy-independent (they apply underthroughputtoo) and require condition 6. If the core you prepare has noterminal_prefillgraphs, those two sub-changes are untested — say so in the report rather than claiming coverage.
Two traps that would silently void a run (both are real gaps in scripts/benchmark_scheduler.py):
- Warmup measures the very shapes under test.
--warmup-secondsruns the same request bodies (scripts/benchmark_scheduler.py:207-209), which executes the small prefill shapes and makes them measured, so the interpolation andPlanOrigin::Discoverynever fire in the measured trial. Use--warmup-seconds 0on cold arms. - Cost state persists. Estimates live in
ActionCostswithestimate_ttl_ns = 30 s(policy.rs:39), and discovery is one-shot and permanent once measured. Restart the server between cold arms. If you do want a decode warmup, do it with decode-only traffic: the interpolation floor is the fastest measured decode step (cost.rs:715-726), so decode warmup is legitimate and prefill warmup is not twice so.
2. Machine and model selection
Use cn5, not cn7.
| Need | cn5 | cn7 |
|---|---|---|
| GPU class the PR measured on (4× RTX PRO 6000, SM120) | ✅ 4× RTX PRO 6000 Blackwell | ❌ |
| Multi-GPU TP for one core | ✅ up to TP4 (48 CPUs / 125 GiB) | ❌ 1 GPU |
| Model present | nvidia/GLM-5.3-Flash-NVFP4, local-inference-lab/GLM-5.3-Flash-NVFP4 |
nvidia/GLM-5.3-Flash-FP4-Local (GLM also present) |
| Fits 16 GiB scratch? | Verify with flare inspect before committing |
n/a |
- cn7 cannot reproduce the GB10 result, and should not be used for it. The PR's GB10 line is 2× DGX Spark, TP2, GLM-5.3-Flash-FP4-Local; cn7 is a single GB10 with 10 CPUs. A 1-GPU run would be a new, unrelated configuration, and the isolated issue #676 (which reproduces the same stall with an independent prototype and offers GB10 validation) is the right vehicle for that hardware. Recommend declining the GB10 arm and saying why.
- Model substitution: the PR measured
DeepSeek-V4.1-Flash, which is not on cn5. Usenvidia/GLM-5.3-Flash-NVFP4(4 GPUs, TP4) — same model family as issue #676's independently reproduced stall, and present on the host. This makes the run a transfer check, not a reproduction: the PR's exact numbers (mixed-c32−32.2 % stalls,long-context-mixed−41.7 %,cold-heavy-mix−8.6 %) will not be matched, and the report should say so up front. Also cross-reference #676 so the two GLM prefill-stall efforts are not counted twice. - All models are listed with "0 GiB", so preparation or download happens inside the job. Do this once, from a CPU-only job on cn5 (48 CPUs, no GPU-lead time), then run the timed arms against the existing core.
3. Preconditions to check before taking any measurement (≈10–15 min, mostly CPU)
Run these and keep the outputs in the report; each one can invalidate a whole arm if skipped.
- Core has a
TERMINAL_PREFILLcatalog —flare inspect CORE --graphs(docs/cli-design.md:1622, table atflare-cli/src/inspect.rs:1350-1372listskind,batch,tokens,Timeper graph).- If empty: conditions 6 is false. Drop the terminal-specific arms, and note that only the interoperated-discovery and drain arms were exercised.
- If present: record the exact terminal capacities and the derived tail window (largest
PREFILLcapacity absent from the terminal catalog,scheduler.rs:847-857) — the arm in §4C depends on it.
prefill_chunk_sizeis not already minimal. Ifprefill_chunk_sizeis 128 or 256 the catalog has ~2–3 entries and there is nothing to explore. Set--prefill-chunk-size 4096(the PR's configuration) so the128…4096catalog exists.- Baseline binary is
mainat1fbcc3c9, not the PR base.5d53040e(the declared base) is behindmain; the reported A/B compared against1fbcc3c9. Use1fbcc3c9for the A/B or the deltas are not comparable to the claim. - CI on
3d868f84is green (cargo test --locked --release7 crates,pytest839,check.py (not opened) --mutations) — an engine failure mid-run otherwise costs the whole GPU slot.cargo-kaniwas not run by the author. - Free-GPU/no-contention: cn5 gives 48 CPUs for 4 GPUs; confirm no other job on the GPUs and pin clocks via the documented path if the host supports it (
--lock-gpu-clocks).
4. The test arms (ordered; stop as soon as the decisive question is answered)
Common server flags (the PR's, with --scheduler-policy varied per arm):
flare run CORE --gpus 0,1,2,3 --scheduler-policy balanced --max-concurrency 32 \
--mtp-draft-tokens 7 --mtp-adaptive-verification --mtp-max-verification-token-budget 128 \
--mtp-adaptive-verification-alpha 1.0 --embedding-table-cache-size 84GiB \
--kv-cache-limit memory --prefix-cache-memory 0 --prefill-chunk-size 4096
(--kv-cache-limit, --prefix-cache-memory, --max-concurrency verified at flare-cli/src/cli.rs:1148, 1179, 1231; --embedding-table-cache-size 84GiB is tight against 125 GiB RAM — if it fails to load, take the default rather than spending GPU time tuning the flag, and note the deviation.)
Arm A — Decisive: cold long prefills against steady decoders (the only arm the merge decision needs)
Purpose: prove the change actually executes on hardware and moves the metric the PR claims (decode stalls), not merely that throughput is preserved.
- Load: steady decoders (short prompts, e.g. 512 tokens,
--output-tokens 256) plus a staggered burst of cold long prompts (≈14K / 32K / 64K, the PR's cold-burst geometry). - Harness caveat (must handle):
scripts/benchmark_scheduler.pytakes one--prompt-tokensfor all lanes (:181, :200), so it cannot express mixed short-decode + long-cold-prefill in a single invocation. Two acceptable options, in order of preference:- Two concurrent invocations against the same server with different
--prompt-tokens(512 for decoders, 14000/64000 for prefill burst), started together; each writes its own JSONL. Cheap, uses only in-repo tooling. - Five to ten sequential curl/httpx requests as the cold burst, interleaved with one continuous benchmark run for the decoders.
Do not edit
scripts/benchmark_scheduler.pyfor this run — its--variant/--pair-order/--pair-indexflags are parsed (:187-189) but never used inmain(), so arm-labelling must be done from the JSONL filenames.
- Two concurrent invocations against the same server with different
- Trials:
--trials 3 --seconds 60 --warmup-seconds 0, fresh server process per arm (see §1 traps). Run interleaved order (main, PR, PR,main) to cancel drift. - Repetitions: n≥3 per arm. The PR itself ran
long-context-mixedandcold-heavy-mixat n=1, so this arm is also what makes the claim statistically meaningful. Budget: 4 arms × 3 trials × 60 s ≈ 12 min of GPU plus restarts.
Metrics — and the post-processing you must write, because the harness does not do it:
flare_scheduler_executions_total{reason="discovery"}from/metrics(helios/src/server/metrics.rs:931-939;TimingOrigin::Discoveryis set byis_unmeasured_candidate,policy.rs:545-548). This is the canary. If it does not increase on the PR arm on a cold run with decoders resident, #661 never fired and every latency number is meaningless — stop and report an activation failure instead of a performance verdict.- Decode inter-token gaps from the emitted
rows(groups[].seconds,:160-161). The harness computesburst_gap_median_seconds/burst_gap_p99_secondsbut has no>250 msstall count and no SLO evaluation — compute both fromrowsto compare against the PR's>250 msstall and SLO framing. Report stalls, gap p99, per-user tok/s, output tok/s, TTFT p50, and SLO pass rate separately; do not collapse them. flare_graph_launches_total{kind="prefill"}andflare_prefill_tokens_total(metrics.rs:1227-1247,:1042-1044). ⚠️PREFILL,TERMINAL_PREFILLandSCORED_PREFILLshare the singlekind="prefill"label (metrics.rs:406-418), so you cannot distinguish terminal from non-terminal prefill steps from/metrics. Treat "did it chunk" as inferable only from launch counts +prefill_tokens_total+ TTFT, and state this limitation. Per-graph detail exists only on the stderr TUI dashboard (server/dashboard.rs:102-135starts the trace, which needs a terminal) — not scriptable; note it as an observability gap, not a defect.
Pass/fail reading (write this down before running, so the result is not post-hoc):
- Validates the PR if:
reason="discovery"executions > 0 on the PR arm and ≈ 0 onmain; decode gap p99 / >250 ms stall count improves materially on PR; output tok/s and SLO pass rate do not regress beyond noise. - Refutes it if: the PR arm is not better on gaps, or SLO / output tok/s regress in the same direction as the PR's own reported regressions.
- Inconclusive if: discovery stays at 0 (activation failure — check conditions 1–6 and the
terminal_prefillcatalog), or the delta is smaller than the across-trial spread.
Arm B — The PR's own reported regression must be explained, not buried
The PR's table shows SLO dropping in all three mixes (91.1 → 89.4 %, 94.8 → 89.3 %, 89.0 → 81.6 %) and 4 → 7 client-side 45 s drain cutoffs under KV saturation on cold-heavy-mix, plus a worse cold-burst peak gap (277.4 → 433.7 ms). Arm A's SLO/throughput columns already cover this — do not spend a separate GPU slot re-deriving it; just report the SLO delta and drain-cutoff count explicitly alongside the stall win, and say whether Arm A reproduced the regression or not. This is the one place where a "no regression" result would be genuinely new information for the review.
Arm C — Optional (only if the TERMINAL_PREFILL catalog exists): throughput deliberately does not keep pipelining
Purpose: close the review's open item #2 in a way no test currently does. PolicyConfig::throughput() zeroes decode_age_price but leaves terminal_age_price = 1.0 (policy.rs:50-52), and has_active_age_priced_stream() returns true for a resident terminal_cleanup slot (scheduler.rs:996-1005), so prefill_step_requires_feedback() drains even under --scheduler-policy throughput (scheduler.rs:1187-1190) — contradicting the older PR-body wording and matching the corrected wording and docs/scheduling-runtime-design.md:620-622.
- Run the same mixed load as Arm A with
--scheduler-policy throughputon both binaries. - Expect: no discovery executions (age_price = 0 disables the interpolation gate,
policy.rs:531), non-terminal prefill pipelining preserved except while a finishing stream is in terminal cleanup. - Because the metric cannot split terminal prefills, keep this arm read-only: report
reason="discovery"= 0 and the gap/SLO numbers, and explicitly label it "throughput launch parity with a resident terminal-cleanup stream: not fully observable from/metrics". Do not let this arm gate the merge decision.
Do not spend GPU time on
- Pure decode / pure prefill runs to "prove" no regression. On a single engine build the prefill family's measured behavior is unchanged; a pure-prefill arm at TP4 is a long, expensive run to confirm a near-tautology. If a zero-regression claim is still wanted, do it once, decode-only, and label it a spot check.
- Re-running
learning.py (not opened) --preset validate. That is a CPU simulator gate already reported as ACCEPTED (64 seeds,35/35vsttl,35/35vsnative) and it does not establish GPU behavior (docs/design-review.md:207-208). Re-running it is cheap in GPU terms but adds nothing; re-run only if CI reporting for it is disputed. - The
cargo/pytest/check.py(not opened)/kanisuites on cn5's job slot. CPU work; run it where it does not hold a GPU.
5. What this plan can and cannot establish
Can: whether the new exploration executes at all on real SM120 hardware; whether it reduces decode stalls and/or SLO on a GLM-5.3 NVFP4 TP4 mixed load; whether balanced's new drain barrier and the throughput terminal-cleanup exception behave as documented; whether the interpolation's one-shot discovery converges (from reason="discovery" tapering across trials).
Cannot:
- Reproduce the PR's headline deltas (different model; different GPU count on the GB10 side).
- Validate the GB10 claim — cn7's single GB10 is the wrong topology for the PR's TP2 measurement; route that to #676.
- Distinguish
PREFILLfromTERMINAL_PREFILLlaunches on hardware (sharedkind="prefill"metric label,metrics.rs:406-418). - Establish the quality of the estimate itself (whether the interpolated duration is close to the real one) — that needs the
--graphsestimated-durations compared against post-run behavior, which the current metrics do not expose per graph without the interactive dashboard.
Minimum decisive budget: preparation on CPU-only early (once), then Arm A only: 4 interleaved arms × 3 trials × 60 s ≈ 15 min GPU + 4 server restarts. Add Arm C (~10 min) only if the TERMINAL_PREFILL catalog exists and someone wants the throughput wording closed.
6. Review findings that bear on the test plan
These are from the case file and my own reading of the changed code; none was introduced by the plan.
- Reported evidence is author-reported and outside the repo. Workloads live in
FujitsuPolycom/tokbenchv0.4.0; there is no in-repo harness for themixed-c32/cold-heavy-mixshapes, and thelearning.py (not opened) --configsfile is not committed. The hardware run in §4A is therefore also the first in-repo, reproducible datapoint for this change. - The PR's own numbers contain an unexplained regression (SLO down in all three mixes;
4 → 745 s drain cutoffs). Arm A measures it in passing; it should be surfaced in the merge decision, not averaged away. - Two undeclared behavior surfaces that hardware testing cannot adjudicate and that should stay as review items: the
service_ratesrepricing (service.rs:297-301) changesServicePricenormalization for defaultbalancedusers, and thedeferred_prefillkind widening (scheduler.rs:901-907) is policy-independent. Both are documented indocs/scheduling-runtime-design.mdbut were not in the original PR description. - A false-pass unit test remains in the shape described earlier in this PR's history (
prefill_must_complete_terminally_fromnever evaluated astruein the short-prompt case). Not testable on hardware; worth a one-line note to the author so the next revision's test actually exercisesservice.rs's guard. - Observability gap worth filing separately:
PREFILL/TERMINAL_PREFILL/SCORED_PREFILLcollapse intokind="prefill"in/metrics, and the per-graph trace is dashboard-only. Any future scheduler performance PR will hit the same wall — this is a cheap follow-up that would have made this plan half as long. - Simulator divergence is documented, not silent (
docs/scheduling-theory.md:558-565(not opened)) andinitial_discovery = "interpolated"is modeled inscripts/scheduling_sim/learning_policy.py(not opened) — my reading agrees with the final re-review that the Round-1 simulator blocker is resolved;docs/scheduling-theory.md:74-76(not opened)/:93-97still read as pre-#661 statements about the no-decode case and are defensible.
Bottom line: on the available hardware, #661 is testable cheaply and decisively on cn5 with GLM-5.3-Flash-NVFP4 TP4, provided the run is cold (no prefill warmup), restarted between arms, carries a resident decoder or finishing stream, uses a multi-capacity --prefill-chunk-size 4096 catalog, and is gated on flare_scheduler_executions_total{reason="discovery"} increasing. Without that canary the numbers cannot be attributed to this PR at all. cn7 should be skipped with the stated reason.