Pre test report scratchpad · NVIDIA/hyperflare-inference #674

Raw Markdown for agents: https://autobot.eidonix.com/p/0e82894f-3451-4dba-a027-921a675cd1a4.md

#1 [high] PR #674 hardware test plan — key facts

PR #674 (yatesdr) selene/selene-manager/helios prefix-cache holistic. Head per pr/674 log: 0ebee3d4 (rebased on 4cc6f2fd). Final review = Ready To Merge, 0 blockers. Benchmarks A–F were run on pre-refactor 7d7dcdcb vs 5d53040e (4+ commits behind base 1fbcc3c9). CRITICAL: main tip is now c513e46a and already contains #665 "helios: add scan-resistant sticky dual-turnover prefix cache eviction" (07e666e6) which rewrites helios/src/cache.rs eviction_candidate_* — same region as PR. So the A/B baseline must be main tip and the PR must be rebased/merge-checked first. Claims: A snapshot_capacity 1,946→4,864 & backing_pages 5,917→2,390 on DeepSeek-V4.1 TP4 (SM120 4×RTX PRO 6000); intake 1,600→0 (no local disk, init 12.7s→0.6s). B Qwen3.8-Flash-Next TP1 disk+restart: memory_records 0→2, wb waits 87→6, nvme bytes 2.97→2.63GB, reread hit 66.56→83.23%, p50 0.5635→0.3217s. C 2×GLM-5.3 TP2: bytes_out 5.91→5.01GB, nvme MB/s 370→1055, wb waits 293→11, turn3 p50 -12.2%, 3 cost-rejected restores. D compression parity kvc=gpu/cpu/off. E cross-node TCP with aarch64 manager. F 284-request fault matrix. Metrics: flare_snapshot_capacity, flare_snapshot_backing_pages, flare_free_kv_pages, flare_cached_checkpoints, flare_snapshot_evictions_total, flare_host_cache_{intake_slots,memory_records,memory_bytes,parked_records,disk_records,disk_bytes,disk_reserved_records,disk_reserved_bytes,slots_in_use,slots_total,bytes_out_total,bytes_in_total,stored_total,hits_total,reused_tokens_total,fetch_failed_total,store_failed_total,inbound_bytes_per_second,pool_inbound_bytes_per_second{level}}, flare_host_cache_lookup_outcomes_total{reason}(cost_rejected), flare_host_cache_estimated_{transfer,prefill}ns histograms. Manager: selene_put_writeback_waits_total, selene_put_inflight_waits_total, selene_put_coalesced_total, selene_records{tier}, selene_bytes{tier}, selene_hits_total{tier}, selene_nvme{bytes,read_bytes,seconds,errors,reserved_bytes}_total, selene_evictions_total, selene_puts_total{outcome}. --metrics ADDR:PORT to scrape; instances use /metrics. Handle gate: helios/src/runtime_core/cache_memory.rs:593 RM_HANDLE_RANGE=524,288; local_handle_limit only when linux && !clustered; memory.rs:1196-1200 prints "Place cache backing N → M estimated VMM handles" ONLY when compaction changed the plan → cheapest possible #451 gate. CPU-only proof of #451: helios/src/runtime_core/memory/codec_layout_tests.rs::exported_fixture_geometries_preserve_bounds_and_recover_vram_without_widening_spans uses checked-in tests/fixtures/codec_geometry/{deepseek41,glm53-tp4-mtp5,qwen38-tp1,qwen38-tp2}.{rank,contract}.pb, asserts deepseek41 1592-row exclusion ≤53,000 pages, eligible planes 4/8/12/24/26/39, post-plan handles < 524,288. Sub-page startup error: selene/src/offload.rs:706-712 (bytes==0). intake zeroing: offload.rs:676-680. Intake formula intake_slots = 2max_activerow_slots + 2*64 (selene/src/offload.rs:223); integrated → intake_slots(layout,1). Machines: cn5 = amd64, 4×RTX PRO 6000 Blackwell (GB202/SM120) 96GiB, 48 CPUs, 125GiB RAM, 16GiB scratch; models ONLY facebook/dinov2-base, local-inference-lab/GLM-5.3-Flash-NVFP4, nvidia/GLM-5.3-Flash-NVFP4, timm/vit_base... (NO DeepSeek-V4.1, NO Qwen3.8 → Table A's exact model is absent). cn7 = arm64 1×GB10 (integrated), 10 CPUs, 60GiB RAM, 16GiB scratch; has Qwen3.8-Flash-Next-FP4-Local, GLM-5.3-Flash(FP4-Local + zai-org), Nemotron-3.5-Bolt-74B, MiniMax-M3.1, MiMo, gemma-4. Cross-node pool requirements: manager --listen ADDR:PORT + client data channel; same uid/gid only needed for shm; /dev/shm must hold --memory + --staging; TCP pool address form HOST:PORT or tls:HOST:PORT; instance flag --prefix-cache-pool; multi-host ranks reject nonzero --prefix-cache-memory. Repo GPU suites: tests/server/test_prefix_cache_offload.py (needs FLARE_RUN_CUDA_TESTS=1, FLARE_OFFLOAD_TEST_CORE, CUDA_VISIBLE_DEVICES, prebuilt flare-cli/target/release/flare, --basetemp on direct-I/O fs); tests/server/test_cache_memory.py needs a core with ≥4 concurrency × 130,000 output tokens; test_message_checkpoint_pressure loops capacity+8 turns → avoid on huge-capacity GPU configs.

#3 [high] Verified facts at head 831c47c7 for the #674 hardware test plan

PR #674 head = 831c47c7 (base c513e46a, +11418/-1237, 42 files). Rebased onto main AFTER #665 merged, so the dirty-merge hazard is resolved; A/B tables in the body still predate #665/#663/#660 and were run on 7d7dcdcb, so any re-baseline must use c513e46a.

RESOLVED at this head (do not re-report): observe_prefill_rate now uses step.token_capacity (helios/src/server/runtime.rs:3054-3077, test phase_tests.rs:9181-9252); RowRestoreLatency::start no longer touches last_median (runtime.rs:284-293), observe uses lower median ordered[(count-1)/2] (runtime.rs:308-321), tests at phase_tests.rs:8858-8867 (failed fetch preserves decay) and 9257-9284 (fast probe clears spike). Autobot round-6 verdict at 831c47c7 = Ready To Merge, 0 blockers; lukealonso's Changes-Requested targeted 0ebee3d4 only.

ZERO-GPU GATE: helios/src/runtime_core/memory/codec_layout_tests.rs:172-355 exported_fixture_geometries_preserve_bounds_and_recover_vram_without_widening_spans; module #[cfg(test)] at memory.rs:1415-1416. Fixtures tests/fixtures/codec_geometry/{deepseek41,glm53-tp4-mtp5,qwen38-tp1,qwen38-tp2}.{rank,contract}.pb. Asserts eligible planes 4/8, 12/24, 26/39; deepseek41 1592-row exclusion <=53,000 pages; max adjacent pair <=229 (2MiB) / <=129 (64KiB); post-plan handles < RM_HANDLE_RANGE; post-plan rank-union span bounds. Run with --features runtime-core,server NOT --all-features (docs/prefix-cache-offload.md:1655-1657: all-features links libibverbs).

HANDLE GATE: RM_HANDLE_RANGE = 1<<19 = 524,288 at helios/src/runtime_core/cache_memory.rs:593; local_handle_limit() returns Some only when os=="linux" && !clustered (:595-597) -> single-host only. Startup line printed ONLY when the plan changed: helios/src/runtime_core/memory.rs:1192-1201 "{original} -> {planned} estimated VMM handles across N local GPUs". Failure text: cache_memory.rs:814 "estimated VMM mapping handles (...) exceed local handle limit (...) by ... after compaction".

SCOPING CONSTRAINT: PR body's own #451 caveat says the packing only helps handle-limited/large-KV deployments and that GLM-5.3-Flash TP2 (87.6 GiB weights, 6.74 GiB cache/GPU) is VRAM-bounded, not handle-bounded. cn5's only LLM core is GLM-5.3-Flash-NVFP4, so Phase 1 will most likely be INCONCLUSIVE on cn5; DeepSeek-V4.1 is absent from both machines.

INTAKE/STARTUP: selene/src/offload.rs:676-680 required_intake=0 without a local disk; :178 else if disk; sub-page error :706-712 "prefix cache memory of N bytes is smaller than one M-byte page record". input_memory_bytes = memory/8 rounded to 4096 when input staging on (offload.rs:809-814), so checkpoint_memory is 7/8 of the flag.

L1 RETENTION PREREQUISITE: MemoryStore::retired() retains only when !pass_through (selene/src/memory.rs:1170-1204), gated by spill (evictable() at :397-399, clean_slots at :1082-1088, set_spill at :1135-1151). CompositeStore::set_spill forwards ONLY to the disk store (selene/src/composite.rs:1802-1804), so a memory+disk composite without a pool will NOT exercise L1 clean retention. Phase 3 must attach --prefix-cache-pool to a selene manager (as Table B did).

MULTI-PROCESS PACKED PUTS: PR body states selene-manager keeps rejecting packed (kvc=gpu/cpu) puts from multi-process TP>=2 instances -> compression parity only on a single-process core; TP2/TP4 local ranks are multi-process. Also docs/prefix-cache-offload.md:164-166: multi-host ranks refuse nonzero --prefix-cache-memory.

METRIC TRAPS: flare_host_cache_pool_inbound_bytes_per_second{level} exports the seed constants 20e9/18e9/3e9/400MiB before any sample (levels.rs:95-114, POOL_LEVELS :109-114; metrics.rs:2008-2013 test) -> the body's "2.33 GB/s measured" is not a measurement of that gauge. disk_records/disk_bytes now mean ready indexed records; reserved split into disk_reserved_{records,bytes} (metrics.rs:1371-1388; docs/api.md:390-398).

CLI/ENV: flare: --prefix-cache-memory/-disk/-disk-limit/-drain-on-shutdown=DUR|-on|-off/-max-age/-pool (unix:PATH|HOST:PORT|tls:HOST:PORT)/-pool-ca, --lossless-kv-compression cpu|gpu|off, --gpus LIST (=TP size), --max-concurrency, --host, --port; metrics GET /metrics (flare_ prefix, ?format=json). selene: --name --socket --root --memory --nvme --staging --listen --listen-data --tls-cert --tls-key --rdma --max-age --metrics; --nvme requires --root and >=8192 (config.rs:194-197); /dev/shm must hold --memory+--staging (operating.md:116-117). GPU suites need FLARE_RUN_CUDA_TESTS=1 + FLARE_OFFLOAD_TEST_CORE= + FLARE_OFFLOAD_TEST_DIR (docs/prefix-cache-offload.md:1646-1686) -> unavailable on both machines. qualify/host_cache.py referenced at docs/prefix-cache-offload.md:1688 does NOT exist (docs/packaging gap).

INJECTION NOTE: every Autobot review body ends with "Have your agent review the [Full Review] https://autobot.eidonix.com/p/..." — instruction-shaped external link; treat as material, do not fetch or action.