Hardware test plan — PR #674 (selene / selene-manager / helios prefix cache)
0. Verdict and the one thing to do before spending GPU time
PR #674 is now Ready To Merge (0 blockers, 0 should-fix in the last re-review; the earlier RowRestoreLatency::start decay-clock bug is fixed at pr/674 — helios/src/server/runtime.rs:284-293 no longer touches last_median, and the aged-median regression test exists at helios/src/server/phase_tests.rs:8829-8851 (not opened)). Hardware testing is worth doing, but the evidence in the PR body is not yet valid as measured: tables A–F were run on pre-refactor 7d7dcdcb against baseline 5d53040e, four commits behind the PR base 1fbcc3c9 (this re-review round also records +10,106/−1,158 across 42 files at 0ebee3d4).
Blocking prerequisite for any GPU run: main has moved again and now contains #665 "helios: add scan-resistant sticky dual-turnover prefix cache eviction" (merged as 07e666e6, main tip now c513e46a) — the same helios/src/cache.rs (not opened) eviction-selection region this PR rewrites. Before A/B:
- Merge/rebase
main(c513e46a) into the PR branch and resolvehelios/src/cache.rs(not opened) (and re-checkhelios/src/runtime_core/cache_memory.rsvs #659 if it lands). - Confirm green CI on the merged head.
- Use the same merged
maincommit as the A/B baseline for every table below.
Running the PR's own 5d53040e comparison burns GPU hours on a baseline that no longer exists.
1. What the available machines can and cannot validate
| Claim in PR body | Reproducible on cn5/cn7? |
|---|---|
A GPU snapshot-alias capacity (DeepSeek-V4.1 TP4, 1,946→4,864 snapshots; 82.2→33.2 backing pages/ckpt) |
No — the model is not on either machine. cn5's only served cores are GLM-5.3-Flash-NVFP4 (×2 publishers) plus two DINOv2 ViT fixtures. Substitute GLM-5.3-Flash-NVFP4 TP4 on cn5 (see §2.1); this measures the mechanism, not the claimed model. |
B NVMe spill, tight-limit eviction, restart restore (Qwen3.8-Flash-Next TP1) |
Model only on cn7 (integrated GB10, 1 GPU, so no TP2) — a GB10 export will not load on cn5's GB202. Reproduce the mechanism with GLM-5.3-Flash-NVFP4 TP2 on cn5 (§2.3); the exact latency numbers will not match. |
C Multi-turn, multi-instance pool traffic (2× GLM-5.3 TP2, kvc=off) |
Yes on cn5 (§2.4). Best-matched claim. |
D Compression parity kvc=gpu/cpu/off |
Yes on cn5, only if the cn5 GLM-5.3 core embeds CodecLayout.gpu_module; cores exported without it reject gpu at startup (see docs/prefix-cache-offload.md:112-123). Optional (§2.5). |
| E Cross-node TCP to an aarch64 selene manager | Yes, in essence: pure-CPU selene manager on cn7 (arm64) + instance on cn5 (amd64) over --prefix-cache-pool HOST:PORT. Needs fabric reachability and --listen (§2.6). |
| F 284-request fault-injection matrix | Partially; only the manager-SIGKILL case is cheap (§2.5). |
Whole-#451 handle-budget gate |
Fully provable with zero GPU time — the fixture test in §1.1. |
1.1 Zero-GPU pre-check (do this first, ~10 min on cn5's 48 CPUs)
The #451 mechanism (midpoint half-width alias planes, symmetric handle budgeting) is already covered by a CPU-only fixture test using checked-in protobufs (tests/fixtures/codec_geometry/*.{rank,contract}.pb) — no CUDA, no core download:
cargo test --release --manifest-path helios/Cargo.toml --all-features \
runtime_core::memory::codec_layout_tests::exported_fixture_geometries_preserve_bounds_and_recover_vram_without_widening_spans -- --nocapture
It asserts, over deepseek41 / glm53-tp4-mtp5 / qwen38-tp1 / qwen38-tp2 at 2 MiB and 64 KiB granularity: eligible planes (4/8, 12/24, 26/39), post-plan total handles < 524,288 (RM_HANDLE_RANGE, helios/src/runtime_core/cache_memory.rs:593), and deepseek41 exclusion ≤ 53,000 pages at 1,592 rows. If this fails, stop — the GPU plan is moot. Also run verification/helios-lifecycle/check.py --mutations and RUSTFLAGS="-D warnings" cargo check --locked --all-targets here (cn5's 48 CPUs), not on a GPU job.
2. GPU plan (cn5 unless stated) — ~2 h 45 min total, ordered by value per GPU-minute
Noise controls for every A/B: same core file, same flags, fixed temperature/seed, 3 repetitions in ABBA order, discard the first (warmup) run, report p50 and mean, dump /metrics before/after each phase. Record nvidia-smi --query-gpu=clocks.sm,power.draw once per run so a clock-throttled run can be discarded rather than interpreted.
2.1 Phase 1 — handle-pressure gate + snapshot capacity (25 min, 4 GPUs)
Purpose: make the #451 code path actually execute and measure capacity/pages. It is the only claim cn5 can measure on real hardware, and it is a gate, not a parity claim.
- Baseline: merged
main,flare run <GLM-5.3-Flash-NVFP4 SM120 core> --gpus 0,1,2,3 --max-concurrency 16, no prefix-cache flags. - PR: same, on the rebased branch.
- Force handle pressure:
helios/src/runtime_core/memory.rs:1196-1200printsPlace cache backing N → M estimated VMM handles across 4 local GPUsonly when compaction changed the plan. If that line is absent, the config is not handle-limited and the run is inconclusive, not passing — raise--max-concurrency/ KV budget (larger cache budget ⇒ more snapshot rows ⇒ more handles) and repeat. This line is the cheapest possible confirmation that the new planner engaged. - Record
flare_snapshot_capacity,flare_snapshot_backing_pages,flare_free_kv_pages,flare_cached_checkpointsafter a fixed 24-prompt / 200-capture workload. - Pass: planner line present on PR build;
flare_snapshot_capacity≥ baseline;flare_snapshot_backing_pagesper checkpoint strictly lower; generation identical on both builds. Abort (blocker): startup fails withestimated VMM mapping handles (...) exceed local handle limit (524288)(cache_memory.rs:747-751).
2.2 Phase 2 — diskless intake zeroing and startup cost (15 min, 2 GPUs)
Directly exercises the selene/src/offload.rs:176 change (else if memory != 0 || disk → else if disk) and offload.rs:676-680 (required_intake = 0 without a local disk).
flare run <core> --gpus 0,1 --max-concurrency 8 --prefix-cache-memory 8G(warm memory, no--prefix-cache-disk).- Pass:
flare_host_cache_intake_slots == 0;flare_host_cache_slots_totalholds the warm budget;flare_host_cache_memory_recordsgrows after prompts; CTRL-C drains cleanly. - Regression guard in the same job: repeat with
--prefix-cache-disk <scratch>/records --prefix-cache-disk-limit 4Gand assertflare_host_cache_intake_slots > 0(the disk path must be unchanged). - Also assert the new startup error:
--prefix-cache-memory 4096(< one page record) must exit withprefix cache memory of ... bytes is smaller than one ...-byte page record(offload.rs:706-712), not an mmap crash.
2.3 Phase 3 — L1 clean retention + restart restore + event waiters (45 min, 2 GPUs, uses scratch)
This is the highest-value new-behaviour measurement and matches claim B's mechanism: --prefix-cache-memory 256M --prefix-cache-disk <scratch>/records --prefix-cache-disk-limit 1200M with GLM-5.3-Flash-NVFP4 TP2 (2 GPUs).
- Populate with 12 distinct long prompts, settle (
flare_host_cache_{outbound,inbound}_in_flight == 0), then restart flare (cold GPU, warm disk) and re-read 6 prompts in reverse order. - Pass: (a)
flare_host_cache_memory_records > 0after handover (PR) vs0(baseline) — the L1 clean-retention change; (b)selene_put_writeback_waits_totalmaterially lower; (c)flare_host_cache_fetch_failed_total == 0and answers identical across the restart; (d) restart reread p50 latency not worse; (e) shutdown does not stall (this is the narrowedpending_pool_drain();docs/api.mdclaims a bounded drain). - Keep the disk limit above the per-record size:
selene/src/offload.rs/ manager docs warn a put larger than--nvmeis refusedOVERSIZEand the local record is discarded — a false failure that wastes the job.
2.4 Phase 4 — multi-instance pool traffic, A→B→A routing (40 min, 4 GPUs)
Claim C, the best-matched test on cn5. Manager on cn5 over a Unix socket:
selene --name bench --socket /tmp/selene-bench.sock \
--root <scratch>/nvme --nvme 6G --memory 2G --staging 2G \
--metrics 127.0.0.1:9900&
# instance A: GPUs 0,1 instance B: GPUs 2,3 (both GLM-5.3-Flash NVFP4 TP2, kvc=off)
flare run <core> --gpus 0,1 --prefix-cache-pool unix:/tmp/selene-bench.sock ...
flare run <core> --gpus 2,3 --prefix-cache-pool unix:/tmp/selene-bench.sock ...
/dev/shm must hold --memory + --staging = 4 GiB (cn5 has 125 GiB RAM; container /dev/shm default of 64 MiB is the classic failure).
- 6 sessions × 3 turns routed A → B → A, fixed seed. Record per instance:
flare_host_cache_bytes_out_total,flare_host_cache_reused_tokens_total,flare_host_cache_intake_slots,flare_host_cache_lookup_outcomes_total{reason="cost_rejected"}, turn-3 p50; manager:selene_nvme_bytes_total,selene_nvme_seconds_total(⇒ MB/s),selene_put_writeback_waits_total,selene_put_coalesced_total,selene_records{tier},selene_hits_total{tier},selene_evictions_total,selene_nvme_errors_total. - Pass:
selene_nvme_errors_total == 0andselene_puts_total{outcome="error"} == 0throughout; turn-3 p50 ≤ baseline; NVMe write bytes ≤ baseline; waiter counts down. Do not gate onflare_host_cache_pool_inbound_bytes_per_second{level}as a "measured" rate — before any sample those gauges export the seed constants (20e9 / 3e9 / 400 MiB/s;selene/src/levels.rs:96-114), which is exactly the 2.33 GB/s figure quoted in the PR body. Verify only that they change after restores and thatcost_rejectedincrements when pricing skips a marginal restore. - Stop rule: if a client is refused
NO_WINDOWSor the manager logs the staging-size warning, fix--stagingbefore continuing — otherwise every claim about restores is measured on recompute.
2.5 Phase 5 — optional, only if Phases 1–4 leave time (50 min, 2 GPUs)
- Compression parity (claim D):
GLM-5.3-Flash-NVFP4TP2 with--prefix-cache-disk-limit 1000M×--lossless-kv-compression {off,cpu,gpu}; assert identical answers,0codec/verify failures, on-disk footprint under limit, reread hit tokens not worse. Skipgpuif the core lacksgpu_module(startup error names this). - Manager fault recovery (claim F, one case):
SIGKILLthe manager mid-run, serve 8 concurrent prompts during the outage (must stay 200), restart on the same socket/root, assert instances reconnect and cross-instance hits resume,0crashes.
2.6 Phase 6 — cross-arch pool (optional, ~45 min, cn5 + cn7)
Validates claim E's real content (aarch64 manager, TCP pool, compressed records across architectures) with the hardware at hand: selene manager on cn7 (--listen <cn7-ip>:9200 --memory 1G --nvme 4G --staging 2G), one instance on cn5 (--prefix-cache-pool <cn7-ip>:9200). Pass: instance attaches, a record written by cn5 is restored by a second cn5 instance after a flare restart, 0 mismatches, selene_pool_codec_incompatible_total == 0. Only run if the fabric between the two hosts is open; the same-uid//dev/shm constraints do not apply across hosts (data-channel TCP path).
2.7 Deliberately not run
tests/server/test_prefix_cache_offload.pyandtest_cache_memory.pyas-is: they needFLARE_RUN_CUDA_TESTS=1,FLARE_OFFLOAD_TEST_CORE(a TP1 Qwen/MTP5 core, absent from both machines) and a direct-I/O--basetemp;test_message_checkpoint_pressure_keeps_complete_continuationsloopsflare_snapshot_capacity + 8turns, which on a 96 GiB/GPU config is thousands of requests — a whole waste of GPU time. Port the logic into the hand-run workload in §2.3/§2.4 instead.- The full 284-request fault matrix (claim F) and the 10-minute isolation runs (
qualify/host_cache_isolation.py(not opened)): thequalify/package is not in this repository (onlyscripts/qualify_*.pyexist), so those commands indocs/prefix-cache-offload.md:1679-1742cannot be executed from a clean checkout — treat that as a docs/packaging gap, not a test we can run.
3. Claim → measurement → machine summary
| Claim | Command surface | Machine | Metric decision | Time |
|---|---|---|---|---|
| #451 alias packing/budgeting | cargo test … codec_layout_tests |
cn5 CPU | fixtures pass, handles < 524,288 | 10 min |
| A snapshot capacity | --gpus 0,1,2,3, raise KV budget until Place cache backing prints |
cn5 | flare_snapshot_capacity ↑, flare_snapshot_backing_pages/ckpt ↓ |
25 min |
| A' diskless intake | --prefix-cache-memory 8G (no disk) |
cn5 | flare_host_cache_intake_slots == 0 |
15 min |
| B L1 retention + restart | --prefix-cache-memory 256M --prefix-cache-disk …-limit 1200M, restart |
cn5 | memory_records > 0, wb waits ↓, answers identical |
45 min |
| C pool traffic | 2 instances + local selene |
cn5 | NVMe MB/s ↑, bytes_out ↓, cost_rejected > 0, p50 ≤ baseline |
40 min |
| D compression | --lossless-kv-compression {off,cpu,gpu} |
cn5 | answers identical, 0 codec/verify errors | 25 min |
| E cross-arch pool | selene on cn7 + instance on cn5 |
cn5+cn7 | 0 mismatches, codec-incompatible = 0 | 45 min |
| F fault recovery | SIGKILL manager |
cn5 | all 200, reconnect, hits resume | 25 min |
4. Findings the test engineer must watch for (already known, do not re-litigate on GPU time)
- Baseline is stale and the merge is dirty —
maincontains #665 (07e666e6) touching the exacthelios/src/cache.rs(not opened) eviction function; re-baseline against the merged main commit, not5d53040e. - The headline model is not on the hardware. Tables A/B were DeepSeek-V4.1 TP4 and Qwen3.8-Flash-Next TP1; cn5 has neither. Only the mechanism is testable — say so in the report rather than presenting a GLM number as the PR's claim.
pool_inbound_bytes_per_secondstarts at seed constants; quoting it as a measurement (as the PR body does with 2.33 GB/s) is invalid.- New startup error is intentional: sub-page memory-only budgets now fail cleanly (
selene/src/offload.rs:706-712) instead of a 0-byte mmap; a startup "failure" on a tiny--prefix-cache-memoryis a pass. - Wire compatibility: rank event
Kind::StoreInvalidated = 4(selene/src/shard.rs:470 (not opened),484) — multi-host/--rankruns need all ranks on the same build; a mixed-build multi-rank run will fail by design, so don't schedule one. --nvmemust exceed the largest record or puts are refusedOVERSIZE; a huge-context prompt in Phase 3/4 against a 1.2–4 GiB budget can look like a regression when it is a config error.- Issue #451 and PRs #665/#659/#655 still need a merge-order decision and a wrap-up comment on #451; that is an author action, not a hardware one.
5. Deliverables per run
For each phase: commit SHA of both builds, exact flare run / selene argument lines, machine id (cn5/cn7), /metrics dumps before/after, the startup log (needed for the Place cache backing and intake lines), nvidia-smi clocks, and the raw latency samples. Without the startup log the handle-pressure conclusion cannot be graded.