#1 [high] PR #660 core facts and head
PR #660 "helios/scheduler: budget interior conversation-anchor splits against checkpoint_extra_work_fraction", open, head cf744dffef8d (cf744df), +887/-151 in 12 files, labels area:scheduling, bug, performance, triage:review. Re-review verdict: Ready To Merge, 0 blockers, 0 should-fix (case file "Decision to Test: yes (71%)").
Change (helios/src/scheduler/checkpoints.rs, +95/-60 prod):
anchor_split_is_zero_cost() -> boolreplaced byanchor_split_ns() -> Option<(u64,u64)>;zero_budget_anchorrenamedbudgeted_anchor.- Interior anchor (raw_anchor < prompt_tokens) retained only when
split_ns == 0 || extra_spent_ns + split_ns <= allowance(initial_prefill_ns.unwrap_or(whole), fraction); else fall back to prompt_tokens (zero-split prompt end). Helperanchor_split_affordableat checkpoints.rs:96-98 now shared by request_anchor_endpoint and checkpoint_selection_uncached;split_overhead_nsat :434. - Retained anchor's split charged to Cut.split_ns/reserved_ns/extra_spent_ns and to flare_checkpoint_extra_work_nanoseconds_total; anchor snapshot copy (copy_ns: 0) stays uncharged. Shares the allowance with optional Message/Endpoint cuts.
- Guards: earlier Message cuts filtered by end < raw_anchor; charged unreached Anchor cuts survive multi-chunk steps and revoke_unused_anchor_guards(); budgeted_anchor latched in promote_request_anchor.
- Default
checkpoint_extra_work_fraction = 0.05(helios/src/scheduler/policy.rs:40), so this changes the shipped default path.
Claimed A/B (PR body, 4× RTX PRO 6000, DeepSeek-V4.1-Flash TP4, balanced policy, 0.05, 132,999 KV pages, 0 errors), base 5d53040e vs 22cac916834f:
- mixed-c32 (C=32): SLO pass 9.1%->80.3%, out 1072.8->1327.0 tok/s, TTFT p50 4577->1920 ms, mean decode batch 9.13->17.91
- 4x6-turn (22.0K): TTFT p50 297.4->178.8 ms, prefill rounds 48.0->30.5, E2E 394.8->459.0 tok/s, wall 2.92->2.52 s
- Burst-8: burst TTFT p50 993.5->556.7 ms, agg decode 563.9->701.4 tok/s, makespan 2.72->2.19 s
- Controls: C=1 short TTFT 57.9->44.9 ms, C=1 32K TTFT 540.7->543.8 (+0.6%), C=16 agg decode 1128.5->1215.3 (+7.7%)
- Disclosed trade-offs: mixed-c32 per-user p50 93.9->71.0 tok/s; >250 ms gaps 215->434 (>500 ms 13->11, 0 >1 s);
<think>-stripping clients on single-chunk 4.5K–13.7K prompts skip Turn-1->2 reuse (mitigation: --scheduler-checkpoint-extra-work-fraction 0.15). - Pre-#656 571a4471 on
4× DGX Spark GB10C=12x4: TTFT p50 3281.7->1923.8 ms (-41.4%), out 91.0->98.0 tok/s, prefills 96->60. - A/B caveat admitted in body Limits: ran on 22cac91, only request_anchor_endpoint fallback helper + docs/tests added since.
- Costing example in body: Prefill(128)=18 ms vs Prefill(512)=29 ms; 453-token prompt split at 450 adds an 18 ms tail (+62%, >12x the 5% budget), doubling prefill launches.
#2 [high] Hardware test plan facts: knobs, metrics, harness, constraints
FLAGS
--scheduler-checkpoint-extra-work-fraction FRACTION, default 0.05, finite in [0,1] (docs/cli-design.md:696-710; helios/src/scheduler/policy.rs:40).--scheduler-policy balanceddefault (docs/cli-design.md:683-687).--embedding-table-storage ramrequired for perf verification (docs/performance-work.md:45-47).- Linux TP>1 check: flare run aborts unless selected GPUs are pairwise NVLink-linked;
--bypass-performance-checkskips (docs/cli-design.md:735, 1542-1549). 4× RTX PRO 6000 workstation is likely PCIe → bypass flag needed, record in both arms. --max-concurrency,--kv-cache-limit,--mtp-draft-tokenschange catalogs/concurrency; hold identical across arms.--prefill-chunk-sizeis command-line-only per recipe; prefill capacity catalog formula helios/src/scheduler.rs:83-92 (128 doubling then step 512.. ; 4096 chunk → 128,256,512,1024,…,4096).- Cores need no re-export for this change (PR body; docs/cli-design.md:694,710 say the scheduler controls need no re-export).
METRICS (docs/api.md:317-361; helios/src/server/metrics.rs)
- flare_checkpoint_captures_total{role="anchor"|"message"|"endpoint"}
- flare_checkpoint_skips_total{reason="unknown_cost"|"work_budget"|"storage"}
- flare_checkpoint_extra_work_nanoseconds_total (charged predicted extra prefill+copy work; not GPU timing)
- flare_checkpoint_anchor_reservations
- flare_graph_launches_total{kind="prefill"|"snapshot"|"mixed"|"decode"}
- flare_prefill_tokens_total, flare_cache_reused_tokens_total, flare_cache_misses_total
- flare_replay_gpu_nanoseconds_total, flare_first_response_median_seconds
- flare_total_kv_pages, flare_free_kv_pages, flare_kv_page_tokens, flare_snapshot_capacity, flare_active_requests, flare_pending_requests
- Per-request cached prompt tokens: usage.prompt_tokens_details.cached_tokens (chat) / input_tokens_details.cached_tokens (Responses) (helios/src/server/protocol/encode.rs:766,780)
HARNESS
- scripts/benchmark_scheduler.py: closed-loop SSE load; flags --base-url --model --concurrency --prompt-tokens --output-tokens --seconds --warmup-seconds --trials --expected-cached-prompt-tokens --pair-index --variant {baseline,candidate} --pair-order --reuse-requests --output. Emits ttft_median/p99, tokens_per_second, coalesced_groups, burst_gap_median/p99, cached_prompt_token_counts, metrics before/after, rows.
- Its prompt() emits a single user message (scripts/benchmark_scheduler.py:71-121) → only the final-message boundary exists, so short single-turn prompts already exercise the padded-tail discontinuity (boundary sits a few tokens before the prompt end because of the assistant generation prompt) — matching the PR's 453/450 case. Multi-turn (append turn 2, expect reuse at interior anchor) needs a small local extension of prompt() to build a messages array.
- tests/server/test_scheduler.py requires FLARE_SCHEDULER_TEST_URL + FLARE_RUN_CUDA_TESTS=1; tests/server/test_prefix_cache_offload.py starts flare itself via FLARE_OFFLOAD_TEST_CORE (pattern to reuse for arm switching, tests/server/test_prefix_cache_offload.py:72-108).
CPU-ONLY COVERAGE ALREADY PRESENT (no GPU needed)
- Six new end-to-end default-0.05 tests: helios/src/scheduler/checkpoints.rs:4203 (453/450 padded-tail fallback, single prefill launch, terminal capture funded, turn-2 latch), :4361 (guard revocation), :4508 (multi-chunk 0.28), :4623 (zero-split retention), :4685 (request_anchor_endpoint vs selection agreement).
- Run: cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --target-dir flare-cli/target (AGENTS.md:317).
HARDWARE MAPPING
- cn5: 4× RTX PRO 6000 96 GiB, 48 CPU, 125 GiB RAM, 16 GiB scratch, amd64. Has local-inference-lab/GLM-5.3-Flash-NVFP4 and nvidia/GLM-5.3-Flash-NVFP4 → TP4 candidate. Does NOT have DeepSeek-V4.1-Flash, so the PR's exact A/B (DeepSeek-V4.1-Flash TP4, 132,999 KV pages) cannot be reproduced; magnitudes will differ (GLM uses 256-token pages, docs/core-design.md:1487-1488).
- cn7: 1× GB10 arm64, 10 CPU, 60 GiB RAM, 16 GiB scratch, unified memory → TP1 only; has zai-org/GLM-5.3-Flash, nvidia/GLM-5.3-Flash-FP4-Local, and many others. Cannot reproduce 4-GPU results; useful only for an arm64 build + single-GPU mechanism repeat.
- 16 GiB scratch: do not export cores; reuse an existing core. Build arms sequentially and keep only the
flarebinary.
#3 [high] Observability gap: anchor budget fallback is not counted in skip metrics
VERIFIED AT HEAD cf744dff (my own reads)
- helios/README.md:372-390 has been updated and now describes budgeted interior-anchor retention, the shared allowance, charged split, and uncharged anchor copy. The prior review's "Should Fix 2" is resolved at this head (the Final Review text describing README as stale refers to 22cac91).
- The anchor-budget fallback is NOT counted by any skip counter. In
checkpoint_selection_uncached,unknown/budgetare initialized at checkpoints.rs:669-670 and only set inside the optional candidate loop (:730-742). The anchor decision at :608-650 (which turns raw_anchor into request.prompt_tokens on budget failure) sets no flag.per-requestconsequences:flare_checkpoint_skips_total{reason="work_budget"}does not increment when the PR's new anchor fallback fires. docs/api.md:349-355 says those counters "count selection or capture rejections", so the anchor fallback is a silent rejection. -> For hardware testing, the observable evidence of the fallback firing is (a) noflare_checkpoint_captures_total{role="anchor"}at the interior boundary, (b)flare_graph_launches_total{kind="prefill"}= 1 launch for the short prompt, (c) turn-2cached_tokenscovering the prompt end rather than the boundary, (d)flare_checkpoint_extra_work_nanoseconds_totaldeltas. - Every path in checkpoint_selection_uncached that keeps the interior anchor charges split_ns into accounting.reserved_ns (:651-658) and then into extra_spent_ns + stats.checkpoint_extra_work_ns at commit (:924-934). So candidate arm should show a strictly larger flare_checkpoint_extra_work_nanoseconds_total per request than baseline on prompts where an interior anchor was retained within budget.
- docs/cli-design.md:699 and :708 have over-long lines / awkward wrap after the update ("Extra work includes snapshot copies and additional prefill caused by / splitting chunks."), and the README + 3 docs now state the same rule in 4 places (drift surface). Minor.
- docs/core-design.md:1436-1448 states the rule; docs/scheduling-runtime-design.md:614-635 summarizes with cross-reference; helios/README.md:372-390 is now the longest restatement.