All articles

The Next Generation of Vector Search Won't Fit in RAM. It Shouldn't Have To.

Billion-scale vector search needs selective reads, compact codes and storage-aware indexes. DiskANN, SPANN and production engines show how to reduce memory residency while measuring the costs in recall, latency and rebuild work.

A compact blue search head lifts a few selected layers from a much larger pale archive, leaving most stored data untouched.

Keeping a vector index in RAM makes distance calculations cheap. At a billion embeddings, it also turns memory capacity into a standing infrastructure requirement. Before optimizing another scoring loop, ask how much of that collection a query actually needs to touch.

Our position is that the next large efficiency gains in vector search will come from reading less data: pruning impossible matches, scanning compact codes and fetching selected candidates from storage. HNSW remains useful. The design mistake is assuming every workload should pay to keep its entire index permanently hot.

The HNSW explainer covers graph traversal and its memory budget; the IVF explainer covers routing into compressed lists. Here, we bring those mechanics together to explain why we favor IVF for cost-efficient, billion-scale search.

How much memory does a billion-vector index need?

The Faiss index guidelines estimate uncompressed HNSW memory at (4 * d + 8 * M) bytes per vector, where d is dimensionality and M controls graph connectivity. For one billion 768-dimensional float32 vectors with M = 32, the arithmetic comes out as follows. The figure lets you change the dimensionality and M:

Representation or componentCalculated size, decimal GB
Float32 vector payload3,072
HNSW graph links, estimated256
Uncompressed HNSW payload plus links3,328
One-bit-per-dimension code payload only96
32-byte PQ codes plus 8-byte IDs only40
Calculated storage for one billion vectors using the Faiss HNSW estimate, (4d + 8M) bytes per vector. With JavaScript, pick a dimensionality and M to compare; bars share one scale.

These are storage calculations, not benchmark results or complete system footprints. The compressed rows exclude centroids, graph links, codec metadata and any original vectors retained for rescoring. Quantized HNSW can reduce its vector payload too. Comparing a complete uncompressed index with bare compressed codes would exaggerate the advantage.

Storage hardware has also improved. Micron rates its 9650 SSD at up to 28 GB/s sequential reads and 5.5 million random-read IOPS. Those device limits are not query throughput: request size, concurrency and access dependencies decide how much an engine can use. Still, treating storage as merely a slow overflow for a memory-designed index leaves useful options unexplored.

Prune before reading, then before scoring

Pruning-first execution reduces the data a query must read or score before spending effort on distance calculations. It combines conservative exclusion from filters and metadata with approximate candidate selection. These stages have different guarantees: proving that a segment cannot match preserves correctness; guessing which vector clusters matter requires recall measurement.

A practical execution order is:

  1. Apply tenant, partition and time constraints to eliminate unrelated datasets.
  2. Inspect segment summaries, such as numeric minima and maxima, before opening their data.
  3. Select IVF lists likely to contain nearby vectors.
  4. Score compact codes, then fetch original vectors for the candidates worth rescoring.

The benefit depends on data layout. An IBM Research lakehouse preprint embeds per-file IVF indexes in Parquet footers and composes them with Iceberg file pruning. On its 11.5-million-vector, 768-dimensional table, a selective predicate excluded 355 of 444 files; warm-cache search was about 32 times faster than brute force at recall@10 of at least 0.90. The authors stress that file-level locality on the filter column is necessary. A filter scattered uniformly across every file offers much less opportunity.

Pruning also helps after a cluster has been selected. Tribase uses finer-grained cluster structures and triangle-inequality tests, reporting up to 99.4% fewer computations and up to 10 times the speed of its Faiss baseline. Those are scoring results, not evidence of an equivalent reduction in object-store reads. To save I/O, a decision must happen before the bytes are fetched.

Disk-native search already has working designs

Disk-native approximate nearest-neighbor search keeps a substantial part of its searchable representation on persistent storage and organizes retrieval around that storage's access costs. It still uses RAM for routing, cached data and query state. The goal is to reduce mandatory residency while meeting a measured recall and latency target.

Three research systems illustrate different parts of that design:

System Published result Engineering lesson
DiskANN, NeurIPS 2019 SIFT1B, 16 cores, 64 GB RAM: over 5,000 QPS, under 3 ms mean latency, 95%+ 1-recall@1 Graph search can work from SSD
SPANN, NeurIPS 2021 Twice DiskANN's speed at 90% recall and equal memory on three billion-scale datasets Keep centroids in memory and posting lists on disk
SPFresh, SOSP 2023 At a 1% daily update rate, 1% of DRAM and under 10% of peak cores compared with its global-rebuild baseline Local partition maintenance can reduce update resource peaks

These experiments use different configurations; the table is not a leaderboard. DiskANN also prevents a common misunderstanding: moving beyond RAM does not require abandoning graphs.

Production systems use several approaches. Elastic's DiskBBQ introduction compares partitioned search with HNSW BBQ on one million vectors, all fitting in memory. Build time falls from roughly 1,054 seconds to 94 seconds, while latency rises from about 3.4 to 4.0 ms and recall falls from 92% to 91%. The faster build comes with a search trade-off. Pinecone's slab architecture instead changes index type with slab size: SimHash-style codes for small slabs, fast-scan product quantization for medium slabs and IVF over PQ-coded clusters for large ones.

Object storage makes round trips part of the algorithm

An SSD and an object store present different constraints. Graph traversal discovers later candidates from earlier results, creating dependent read rounds. Beam search, caching and parallel I/O can mitigate those dependencies. A partitioned index exposes another useful option: choose clusters from a compact routing structure, then fetch selected lists concurrently.

turbopuffer's architecture documentation describes a centroid-based design built on SPFresh to reduce object-storage round trips and write amplification. Its published example reports p50 latency of 874 ms for a cold query over one million documents and 14 ms when cached. These are vendor measurements for that setup, not an object-store latency guarantee. They show why a warm benchmark cannot stand in for the first query after inactivity.

Bytes and requests both belong in the cost model. Fetching many tiny ranges can save bandwidth while increasing request overhead; fetching larger contiguous lists can reduce request count while reading more irrelevant vectors. Measure cold and warm p95/p99, bytes fetched, storage request count and cache hit rate at a fixed recall target. Include background indexing and compaction in the resource budget.

Our e-means follow-up examines the training side of that budget. Cheaper centroid training creates room for fresher or finer partitions, but any reduction in query bytes, requests or latency still needs to be measured at matched recall.

Storage duplication deserves the same attention. The COMPASS preprint, originally named DecoupleVS, separates graph metadata from vector data so each can be losslessly compressed differently. It reports up to 58.7% less storage than the evaluated disk-resident graph systems. Layout can reduce the bill even when the search algorithm remains graph-based.

Choose the residency budget from the workload

HNSW remains a strong candidate when memory is available and very low latency at very high recall matters most. Elastic's DiskBBQ comparison explicitly favors HNSW in the 99%+ recall regime. Graph implementations also keep improving: ACORN addresses predicate-aware traversal, while SSD-aware pgvector research combines parallel I/O and locality improvements, reporting up to 11.1 times higher query throughput than its baseline.

At WarpSearch, approximate vector retrieval uses IVF over quantized codes, with RaBitQ as the default and PQ available explicitly. Small segments use exact scans. Selected candidates are rescored with stored vectors. As described in our engine efficiency post, collection data lives in object storage, local storage acts as a cache, and conservative segment summaries exclude data that cannot match.

Exact rescoring does not recover neighbors excluded by approximate list or candidate selection. Evaluate recall against exact search using representative queries and filters, then compare memory, I/O and latency at that recall. This is how to decide whether a small hot routing structure and selective reads suit a workload better than a permanently resident graph.

Key takeaways

  • One billion uncompressed 768-dimensional vectors with HNSW links require about 3.3 TB under the Faiss estimate, before other overhead.
  • Metadata exclusion and approximate candidate selection have different correctness guarantees.
  • Disk-resident graphs and partitioned indexes are both established options; storage placement alone does not choose the winner.
  • Measure cold requests, bytes fetched, request count and maintenance work alongside recall and warm latency.
  • Keep data hot when the workload justifies it. Make that an explicit budget decision.

Cookie settings

Optional tracking stays off until you choose it. Your choice applies to this browser for 180 days. Read the details.

Essential storage keeps you signed in, protects forms, and remembers this choice. It is always available.