research

Data-Movement Benchmark

The measurement behind the “A Measurement Anyone Can Reproduce” section of the article: one top-20 similarity query over a 102.4 GB embedding corpus, answered two ways, naive full scan vs. index-guided reads, to measure the gap between bytes moved and bytes needed.

Results (as measured)

Hardware: consumer laptop, 40 GB RAM, WD_BLACK SN7100 2 TB NVMe (PCIe Gen4; ~2.1 GB/s measured sequential read on this machine).

  Naive full scan Index-guided
Data moved 102.4 GB 0.80 GB
Wall time 355 s 1.6 s
Top-20 answer baseline identical (recall@20 = 1.0)
Bytes moved per useful byte ~2,500,000 : 1 ~19,500 : 1

Raw numbers: results.json.

Reproduce it

Requirements: Python 3.11+, NumPy, and ~103 GB of free disk on a drive you want to measure. The corpus is deliberately generated larger than RAM so the OS page cache cannot serve the scans from memory. On a machine with more than ~50 GB RAM, scale N_VECTORS up accordingly.

# 1. Edit OUT_DIR in both scripts to a path on the target drive, then:
python gen_corpus.py     # ~15-20 min (RNG-bound), writes 102.4 GB
python benchmark.py      # ~6 min, prints both runs + summary JSON
python rawread.py        # optional: raw sequential-read bandwidth baseline

The corpus is deterministic (seeded RNG); delete corpus.bin afterwards to reclaim the disk space.

Method notes

Method C: in-storage scoring, harness ready, hardware wanted

The article proposes a third method for computational-storage hardware (SmartSSD-class NVMe + FPGA): send the query + probe list to the device (~KBs down), score fp16 dot products in-device, return only top-20 candidates per probed cluster (~300 KB up), merge on the host.

method_c.py ships everything except the FPGA kernel:

python method_c.py --dir <corpus dir> --backend sim

Validated with the simulated backend (protocol facts, not hardware claims): 2,092 B down + 329,600 B up = 8.1 : 1 waste ratio (vs ~19,500 : 1 for Method B), top-20 identical to Method A ground truth (matches_method_a_top20: true).

Still needing real hardware: wall time and energy per query. A CPU simulating an FPGA proves nothing about either. Falsifier: if in-device scoring is slower or more energy-hungry than shipping clusters out, vector scoring belongs on the host and the article’s retrieval-plane claim weakens accordingly. If you have CSD dev hardware and run this, open an issue or PR. Results welcome either way.

Honest limitations

One query shape, synthetic clustered data, a single consumer drive, no energy instrumentation (the article’s energy figures use published pJ/bit-class constants, clearly hedged). The orders of magnitude, not the exact digits, are the finding.

Verifying the code without the corpus

pip install numpy psutil pytest
python -m pytest tests/

The suite generates a ~40 MB corpus with the real generator and runs the whole pipeline against it in a few seconds: wire-protocol round trips (the article’s 2,092-down / 322 KB-up figures are asserted as formulas), the device kernel against a brute-force oracle, the process-isolated device end to end, the compute-tax throttle, and a pinned regression for the fp16 query-quantization rank-boundary flip. CI runs it on Linux and Windows on every push.