Pre test report report · NVIDIA/hyperflare-inference #734

Raw Markdown for agents: https://autobot.eidonix.com/p/4dc0c21d-f4b1-4d0c-aa23-fe8b0962988c.md

Hardware test plan — PR #734 (selene: parallelize startup disk scan), head b7bd3fa9

0. What I verified before writing the plan

The review stack is consistent and the PR is at "Ready To Merge / Decision to Test: yes". The changed code and the instrumentation I rely on below are all present at the PR head:

Two facts that shape the plan:

  1. This code path never touches a GPU. It runs during startup directory inspection, before serving. GPU time is only spent on model load that both arms pay identically. So the whole mechanism, the two behaviour changes, and the scaling claim can be validated on CPU only — the GPU is needed for exactly one end-to-end confirmation pair.
  2. The exported core is arm-independent. It is produced by ignition from the model, and the namespace directory name comes from core/config identity+fingerprint (selene/src/offload.rs:642-657, 645), not from the changed code. Export once and reuse for both arms — this is the single biggest GPU-time saving (two builds, one export, one seeded dataset).

1. Hardware assignment

Test Machine Why GPU used
T1 correctness suites cn5 (48 CPUs, x86_64) and cn7 (arm64) both arches must compile/pass; 0o000 fail-closed tests must actually run (need non-root) none
T2 component A/B + ablation cn5 (48 CPUs) reproduces the .ckpt scaling claim on a many-core x86_64 host, and closes the PR's own disclosed gap: its x86_64 warm .input numbers came from WSL2, never bare metal. Also exercises available_parallelism≫16 → worker cap behavior none
T2b worker-cap ablation cn7 via taskset cn7 gives a job 10 CPUs, so workers = min(10,16,chunks); taskset -c 0-3 lowers it further. Confirms the 64/8/16 tuning curve the PR claims is a trade-off, and tests the <64 candidates serial path none
T3 end-to-end flare run A/B (cold+warm) cn7 (GB10, SM121, integrated memory, NVMe) the architecture the PR measured (20-core Grace); cn7 is 10 CPUs, so this is also a capacity-sensitivity check: expect a smaller speedup, and a null result here is itself a finding 1 (of 1)
T4 (optional) flare run A/B on x86_64 cn5, --gpus 0 only second arch for the served number; leave GPUs 1-3 free 1

Model choice (smallest first, to bound RAM and export time):

2. Test plan

T1 — Correctness gate (no GPU, ~15 min, run first on both machines)

cargo test --locked --release -p selene --features test-support      # expect 645 passed, 0 failed, 0 ignored
cargo test --locked --release -p selene --no-default-features --lib  # expect 620 passed (rayon-free path)
cargo test --locked --release -p selene-manager --lib                # expect 205 passed, 1 ignored

T2 — Component A/B and ablation (no GPU, ~45 min, cn5)

The PR's selene/examples/scan_bench.rs (not opened) is not in the branch (selene/examples/ holds only rank_node.rs (not opened)), so the engineer must recreate it. Minimal recipe (keep it out of the commit):

  1. Two clean trees: git archive be4092d7 (control) and git archive b7bd3fa9 (candidate).
  2. In each: printf '%s' "<source from the PR description <details>>" > selene/examples/scan_bench.rs (not opened), cargo build --locked --release -p selene --example scan_bench, then delete the example.
  3. Datasets (sparse, so 16 GiB scratch is ample — only the 4 KiB header per file occupies blocks): prep-ckpt <dir> 10000 (5,000 v3 + 5,000 v4, ~70 MB logical each), prep-ckpt <dir> 2000, prep-ckpt <dir> 500, prep-input <dir> 1000 (4,440 B each).
  4. Interleaved mirrored rounds, medians: Warm = 20 rounds n=20/arm after one warm-up pass per arm. Cold = 10 rounds with sync; echo 3 | sudo tee /proc/sys/vm/drop_caches before each invocation (check sudo -n true first; if not permitted, see §5).
  5. Ablation rows to reproduce (record::scan, / = control/candidate):
    • 10,000 .ckpt: 2,122 → 211 ms cold (10.0x), 61 → 17 ms warm (3.7x)
    • 2,000: 466 → 44 cold, 16 → 5 warm; 500: 119 → 11 cold, 3.3 → 1.7 warm
    • InputStore::start_bounded 1,000 files: cold 214 → 23 ms, warm 4.7 → 2.5 ms
    • .input sort ablation (3rd/4th columns): OsStr::cmp sequential (no par_map) vs Path::cmp + par_map vs candidate, warm. This is the row the x86_64 host has never produced natively.

T2b — Worker-cap / threshold ablation (no GPU, 10 min, cn7)

Same harness on cn7 at 10,000 records, warm, three cell counts:

taskset -c 0-0 ./scan_bench scan-ckpt <dir> 10000   # available_parallelism()=1 -> serial path (record.rs:1130)
taskset -c 0-3 ./scan_bench scan-ckpt <dir> 10000   # 4 workers
./scan_bench scan-ckpt <dir> 10000                  # 10 workers (job's CPU cap)

Plus a sub-threshold dataset of 40 records: both arms must be within noise (< 64 takes items.iter().map(f)). Record the scaling curve — this is the number the maintainer will need if MAX_SCAN_WORKERS = 16/threshold = 64 is ever revisited, and it tells you what to expect from T3 on a 10-CPU machine (roughly half of the 20-core GB10 gain).

T3 — End-to-end flare run A/B, cold and warm (cn7, 1 GPU)

  1. Export the core once (ignition is unchanged by this PR): .venv/bin/ignition export gemma-4-E4B-it --gpus 0 (or the 27B). Do not re-export per arm.
  2. Build both binaries from clean archives: cargo build --locked --release --manifest-path flare-cli/Cargo.toml (not opened) at be4092d7 and at b7bd3fa9. Keep the two flare binaries side by side.
  3. Populate the namespace directory with a small prefix cache and drain, to obtain one genuine .ckpt with the real identity/fingerprint/page_tokens/ranks from that core (PR method): one boot with --prefix-cache-disk <DIR> --prefix-cache-disk-limit 2000G --prefix-cache-drain-on-shutdown=30s, one 400-token chat request to /v1/chat/completions, SIGTERM, then read the header of the written .ckpt to learn the namespace directory name and geometry.
  4. Seed 10,000 sparse .ckpt files into that same namespace directory using the harvested geometry (5,000 v3 + 5,000 v4, roots surviving remove_orphans need either a row or a child — the PR used 1,000 ten-step chains), and 1,000 .input files of 4,440 B. truncate-style sparse files keep real usage ≈ 10k × 4 KiB.
  5. Verify before trusting the data: first boot must log 10000 records in the Prepare host prefix cache detail and /metrics must show flare_host_cache_disk_records 10000 (+ flare_input_cache_disk_records 1000 on an image-capable core). If the count is 0, the seeded headers do not match the running core and were deleted as invalid — regenerate (cheap) and recheck; snapshot the filename list first so this is detectable.
  6. Measure, n=5/arm interleaved (A,B,A,B,…), SIGTERM after /health:
    • Prepare host prefix cache OK-line elapsed (this is the number that improved 2,542 → 295 ms cold, 95.6 → 53.2 ms warm on 20-core GB10 — use it for warm, since scan prints at 0.1 s);
    • the scan x.xs in the phase detail (= timings.disk_scan);
    • spawn → /health 200;
    • record counts from /metrics;
    • file count in the namespace directory after shutdown (must be unchanged: 0 deletions).
    • Cold arm: sync; echo 3 | sudo tee /proc/sys/vm/drop_caches before each boot (root required, see §5); otherwise report warm only.
  7. Pass criteria: warm phase time candidate < control with non-overlapping ranges (or ≥1.3x); cold (if runnable) ≥3x at 10 parallel workers, with the 20-core PBX-style 8.6x as the ceiling NOT the expectation on 10 CPUs; identical record counts and zero deletions in every boot; spawn→/health not worse.

T4 — (optional) x86_64 served confirmation (cn5, --gpus 0)

Repeat T3 steps 5-7 with the same seeded dataset and the two binaries, one GPU only, 3 boots/arm. Purpose: a single-arch served number is enough for the charter, and cn5's 48 CPUs make the parallel path fire at the full 16-worker cap — a different operating point from cn7.

3. Time budget (GPU time is what matters)

Step Wall time GPU
T1 both machines 30 min 0
T2 (+builds) cn5 60 min 0
T2b cn7 15 min 0
core export (once) 20-40 min 1 GPU, once
T3: 10 warm boots + 6 cold (if allowed) 25 min (≈90 s/boot) 1 GPU
T4 optional 15 min 1 GPU on cn5

Total ≈2.5 h wall, of which < 1.5 h touches a GPU, and never more than one GPU at a time.

4. What each result proves

5. Pitfalls the engineer should not lose time to

  1. 16 GiB scratch. Do not create 650 GiB of real files: use sparse files (truncate -s, or write only the 4 KiB header then truncate). Logical size is what DiskBudget/--prefix-cache-disk-limit accounts (selene/src/offload.rs:766), so pass --prefix-cache-disk-limit 2000G — it is a number, not a free-space check, when given explicitly (default would be free/10, offload.rs:658-664).
  2. Cold cache needs root. drop_caches is the only clean cold state. If sudo is unavailable, report warm + freshly-recreated-directory numbers and say so; do not call page-cache-warm numbers "cold".
  3. cn7 gets 10 CPUs, not 20. available_parallelism() drives the pool (record.rs:1126-1129), so cap your expectation at ~half the quarantine GB10 speedup; a null result there is a real, reportable finding about the worker cap, not a broken build.
  4. --prefix-cache-memory 0 is tempting but changes what runs. With memory 0 and disk set, intake is still allocated via headroom_inner (offload.rs:178-192, 702-746) and InputStore only starts when input_staging != 0 (:767-776). Keep the PR's flags (--lossless-kv-compression cpu, explicit --prefix-cache-disk-limit) so the phase composition matches the published numbers; if the slab does not fit, report the slab/register sub-timings separately and compare only the scan sub-timing plus a warm phase delta.
  5. Phase total includes slab population and CUDA registration (offload.rs:694-749), which this PR does not change. Because those are constant across arms they only add noise — take medians and prefer the scan detail (0.1 s resolution) as the secondary signal, with the wall time as primary.
  6. Deletion risk is real and cheap to contain. Any seeded .ckpt whose header disagrees with the running core is deleted by design (record.rs:1343-1345). Snapshot the directory listing, use a throwaway directory, and check /metrics before running the A/B.
  7. Never measure with ignition debug-serve (docs/performance-work.md:9-13); it is diagnostic only.

6. If core export cannot be done in-job

Deliver T1 + T2 + T2b only. They fully exercise the changed code paths (both record::scan and Worker::scan, all four Inspection outcomes, budget accounting, determinism) with zero GPU, and they reproduce the mechanism claim that the PR's end-to-end number rests on. In that case, record explicitly that the served-workload number was not re-measured on our hardware, and that the PR's 8.60x cold / 1.80x warm remain author-reported from a 20-core GB10.