In 2019, five researchers working out of Microsoft Research India (Suhas Jayaram Subramanya, Devvrit, Rohan Kadekodi, Ravishankar Krishnaswamy, and Harsha Vardhan Simhadri) overturned the rule that billion-scale vector search belonged only in RAM or on GPUs. DiskANN indexes and searches one billion 128-dimensional vectors on one 64 GB workstation with commodity NVMe SSDs, sustaining over 5,000 queries per second at under 3 ms mean latency and above 95% 1-recall@1.

At the time, FAISS explicitly warned against searching from SSDs. Production retrieval teams either paid for multi-terabyte DRAM clusters or accepted steep recall ceilings from lossy quantization. DiskANN broke that tradeoff by co-designing its graph and 4 KB disk layout around SSD physics, establishing the blueprint behind modern disk-backed vector indexes.

  • Single-node billion-point scale: on SIFT1B (1B 128-dimensional vectors, 16 cores, 64 GB RAM), DiskANN serves over 5,000 QPS under 3 ms mean latency above 95% 1-recall@1 (peaking at 98.68% under 5 ms on a one-shot build).
  • Beating compressed RAM baselines: at the same 64 GB memory budget on SIFT1B, IVFOADC+G+P-16 plateaus at 37.04% 1-recall@1 and IVFOADC+G+P-32 stalls at 62.74%, whereas DiskANN saturates at 100% recall.
  • 2x to 3x fewer disk hops: Vamana’s multiplicative pruning rule (alpha > 1) shrinks search depth to 3 to 4 hops on SIFT1M, versus 8.5 to 11 hops for NSG and HNSW.
  • 5x to 10x higher density per node: storing the graph and full vectors on SSD while pinning only Product Quantization (PQ) codes and top BFS levels in DRAM replaces entire server clusters.
How DiskANN splits state between DRAM and NVMe SSD
1. DRAM layer (under 64 GB)
Guides navigation at memory speed without storing raw vectors or the full graph.
Compressed PQ codes (about 32 B per point)
Ranks candidate neighbors in memory to decide which nodes deserve a disk read.
BFS hub cache (C = 3 or 4 hops from medoid)
Absorbs the top of every search traversal in RAM before touching the SSD.
2. NVMe SSD layer (348 GB merged)
Fixed-stride 4 KB-aligned records avoid in-memory offset tables and extra reads.
Co-located full vector + R padded neighbor IDs
Fetching a node’s adjacency list loads its exact coordinates in the same 4 KB sector for implicit top-k re-ranking.

Architecture from Subramanya et al. (2019), Section 3.

Why naive disk and compressed indexes break

Before DiskANN, billion-scale vector search forced an ugly choice between multi-node RAM cost and poor top-1 precision.

In-memory graphs like HNSW and NSG store full vectors alongside graph edges in DRAM. An NSG index at degree 50 over 100 million 128-dimensional float vectors already takes roughly 75 GB. To serve two billion vectors, Alibaba’s Taobao sharded them across 32 separate machines, fanning every query out to all 32 nodes to reach 0.98 100-recall@100 in 5 ms. Moving those graphs straight onto SSD collapses throughput: retail NVMe drives take a few hundred microseconds per random read (around 300K to 500K IOPS total), and standard graphs issue hundreds of sequential round trips per query.

Compressed inverted indexes fit one billion vectors inside 64 GB RAM using k-means clustering plus Product Quantization or Optimized PQ (OPQ). While FAISS and IVFOADC+G+P answer queries under 5 ms, lossy codes distort fine neighborhood distances. On SIFT1B, IVFOADC+G+P plateaus at 37.04% 1-recall@1 with 16-byte codes and 62.74% with 32-byte codes, often masking weak top-1 accuracy behind looser 1-recall@100 numbers.

An earlier disk hybrid, Zoom, routed queries through an HNSW layer over k-means centroids, shortlisted candidates with PQ, and fetched K' full vectors from SSD to re-rank. The paper identifies two flaws: clustering 200,000 centroids (already needed at 10 million points) scales poorly to a billion vectors, and firing nearly 100 simultaneous random SSD reads in one burst at the end of every query clogs disk queues and spikes tail latency.

Why pre-DiskANN billion-scale baselines hit a wall
RAM graphs HNSW / NSG

High recall, but 100M vectors take ~75 GB RAM; placing directly on SSD triggers hundreds of sequential random reads.

Compressed IVFOADC+G+P

Fits 1B points under 64 GB RAM, but lossy OPQ distances cap SIFT1B 1-recall@1 at 37.04% (16B) and 62.74% (32B).

Burst re-rank Zoom

Needs 200K centroids at 10M scale and issues up to ~100 random SSD reads in one shot per query, spiking queue latency.

Baselines compared in Subramanya et al. (2019), Sections 1, 3.5, and 4.4.

Vamana: shrinking graph diameter for SSD hops

To keep SSD queries under 5 ms, traversal cannot spend dozens of serial hops crossing the corpus. DiskANN introduces Vamana, a directed graph algorithm built to trade edge degree directly for smaller diameter.

HNSW and NSG approximate the Sparse Neighborhood Graph (SNG) rule, pruning candidate p' whenever an existing neighbor p* satisfies d(p*, p') <= d(p, p'). That guarantees distance to the query strictly decreases each step, yet offers no bound on path length: on a 1D line, SNG degenerates into an O(n)-diameter chain linking only immediate neighbors. On SIFT1M, raising max degree from 64 to 512 barely budges the hop count at 98% 5-recall@5: HNSW stays near 11 hops and NSG stays around 8.5 to 9 hops.

Vamana fixes this in RobustPrune by multiplying the pruning threshold by alpha >= 1: candidate p' is pruned only if alpha * d(p*, p') <= d(p, p'). With alpha = 2, distances along a search route must shrink geometrically rather than linearly, forcing long-range shortcuts wherever out-degree R has room. Raising R from 64 to 512 on SIFT1M drops Vamana from roughly 7 hops down to under 3 hops, 2x to 3x fewer SSD round trips than NSG or HNSW.

Three implementation choices make Vamana practical at billion scale:

  • Two-pass build from a random graph: starting from a random R-regular directed graph anchored at medoid s, Vamana sweeps all points twice in random order. Pass 1 uses alpha = 1 to form local paths cheaply without degree blowup; pass 2 uses alpha = 2 to add long shortcuts. Random initialization beats HNSW’s empty start and avoids NSG’s heavy k-NN pre-build (DEEP1M indexing takes 149s for Vamana versus 219s for HNSW and 480s for NSG with EFANNA).
  • Pruning the entire visited path: during indexing, RobustPrune inspects the full visited vertex set V from GreedySearch rather than only the final L candidates as in HNSW, injecting long edges on one flat graph without hierarchical layers. Reverse edges (p', p) are also added and pruned when degrees exceed R.
  • Overlapping shards for 64 GB builds: building one global SIFT1B graph (R = 128, L = 125, alpha = 2) took ~2 days on a 1,792 GB VM (M64-32ms) using ~1,100 GB peak RAM (average degree 113.9). On the 64 GB z840 workstation, DiskANN clusters points into k = 40 k-means partitions, sends each vector to its l = 2 closest centroids (~5% of data per shard), indexes each shard (R = 64) in RAM over ~5 days, and unions all edges into one 348 GB SSD graph (average degree 92.1). Overlap bridges shard boundaries with at most 20% extra query latency over the one-shot graph.

Keeping SSD round trips under five

Even a low-diameter graph stalls on flash storage if every hop waits on serial disk I/O or PQ errors spoil top-1 ranking. DiskANN solves both problems with three systems techniques.

First, fixed-stride 4 KB blocks remove offset tables and yield free exact re-ranking. On SSD, each node i stores its full-precision vector x_i immediately followed by up to R zero-padded neighbor IDs. Uniform record sizes mean byte offsets are simple arithmetic, requiring zero offset metadata in DRAM. Because an NVMe drive reads a 4 KB-aligned page in the same time as 512 bytes, a 128-dimensional vector plus 4 * 128 bytes of degree-128 edges shares one 4 KB sector. Every neighbor-list read automatically delivers x_i into memory at zero extra disk cost, letting DiskANN re-rank visited nodes by exact Euclidean distance and erase PQ’s recall cap.

Second, narrow BeamSearch pipelines reads without backlogging NVMe queues. Instead of fetching W = 1 vertex per round trip, BeamSearch issues W concurrent random reads (W = 2, 4, or 8) for the closest unvisited candidates. Small read batches return in nearly the time of one sector while keeping SSD load at 30% to 40% (and threads at 40% to 50% I/O wait). Setting W = 16 or higher queues requests past 1 ms per read and wastes compute.

Third, BFS hub caching absorbs early traversal in DRAM. Pinning all vertices within C = 3 or 4 BFS hops of medoid s (or hot query-log hubs) avoids repeated disk contention at the root of every query.

Use the explorer below to inspect how each of DiskANN’s five tuning levers changes hop count, memory footprint, and recall on SIFT1B and SIFT1M.

Five engineering levers inside DiskANN

Select a component (or use Left and Right arrow keys) to inspect what breaks with the naive setting, DiskANN's mechanism, and the measured impact in the paper.

Multiplicative pruning (alpha > 1)

Vamana graph

Scaling the RNG pruning check by alpha = 2 turns spare edge budget into long-range shortcuts that slash SSD hop depth.

Why alpha = 1 breaks
Standard SNG/RNG pruning in HNSW and NSG can form O(n)-diameter chains and plateaus at ~8.5 to 11 hops on SIFT1M even at degree 512.
DiskANN's mechanism
Two-pass Vamana runs pass 1 at alpha = 1 for fast connectivity, then pass 2 at alpha = 2 pruning p' whenever 2 * d(p*, p') <= d(p, p').
Measured evidence
At 98% 5-recall@5 on SIFT1M (W = 4), Vamana drops from ~7 hops at R = 64 to under 3 hops at R = 512, 2x to 3x fewer hops than HNSW or NSG.
In-memory bonus
Even without an SSD, Vamana beats HNSW and NSG on 960-dim GIST1M and builds DEEP1M in 149s vs 219s (HNSW) and 480s (NSG).

Source: Subramanya et al. (2019), Sections 2 through 4.

Without clicking through the tabs, DiskANN’s performance comes from five coupled constraints:

  • Multiplicative pruning (alpha = 2): buys long-range shortcuts from degree R, cutting hop count 2x to 3x below HNSW and NSG.
  • Narrow beam search (W = 2 to 8): hides random-read latency via parallel I/O without queueing NVMe drives past 1 ms.
  • Overlapping sharding (k = 40, l = 2): builds a 348 GB billion-point graph inside 64 GB RAM with at most 20% latency penalty.
  • Co-located 4 KB blocks: loads exact vectors alongside neighbor lists for free, removing PQ’s 37% to 63% recall ceiling.
  • Shallow BFS DRAM cache (C = 3 or 4): keeps shared medoid prefixes in memory so SSD reads start near the target region.

Caveats and what came after DiskANN

Three practical boundaries qualify the 2019 paper’s results.

First, the index is static and read-only. Two-pass Vamana construction and fixed-stride SSD blocks do not handle streaming inserts or deletes, and dropping vertices in place breaks routing bridges for distant nodes. Subsequent work in FreshDiskANN solved live updates by pairing a small mutable RAM index with background SSD consolidation.

Second, the 2019 graph supports unfiltered Euclidean search only. Applying selective metadata filters post-search wipes out candidates, while filtering mid-traversal disconnects graph paths. Filtered-DiskANN later extended Vamana’s pruning criterion to preserve label-connected routes.

Third, build time and vector width shift the hardware equation. Merged 1B indexing still took 5 days on a 16-core z840, and SIFT1B (128 uint8s) plus DEEP1B (96 floats) are compact compared to 1,536-dimensional or 3,072-dimensional LLM embeddings, which occupy 6 KB to 12 KB per vector and span multiple 4 KB SSD pages unless compressed further.

For builders running vector retrieval today, DiskANN’s lesson endures: keep hot routing prefixes and compact PQ codes in RAM, store exact vectors next to adjacency lists on NVMe, and size your graph diameter for flash round trips rather than buying terabytes of DRAM.