Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Indexing & memory frugality

Memory frugality is Quiver’s wedge: serve large datasets from a laptop’s RAM budget at a fixed recall. The lever is the disk-resident graph index plus quantization. The full design — with cited papers — is in the architecture deep dive; this page is the practical overview.

Choosing an index

Set the index per collection at creation time.

IndexWhere it livesBest for
hnswRAMthe default; fast, high-recall in-memory search
ivfRAMclustered datasets; pairs with quantization
vamanaRAMthe DiskANN graph, in memory
disk_vamanadisk (encrypted) + PQ codes in RAMmemory frugality — large datasets, small RAM
colbertRAM (derived)multi-vector ColBERTv2/PLAID token pools

Quantization

Compress stored vectors to cut RAM at a small recall cost:

  • scalar — per-dimension 8-bit; simple, modest savings.
  • product (PQ) — subspace codebooks; the largest savings, tunable via pq_subspaces.
  • binary — 1-bit with a Hamming pre-filter and an exact re-rank.

The per-collection recall ↔ latency ↔ memory knobs and their measured trade-offs are tabulated in docs/benchmarks/quantization-tradeoffs.md.

The disk-resident path

disk_vamana keeps the graph and full-precision vectors in the encrypted on-disk index and holds only compact PQ codes resident. On SIFTSMALL it serves recall@10 up to 1.000 with a 32× smaller RAM-resident footprint than full-precision vectors — a reduction that is exact arithmetic and scales (e.g. a 10M × 768-d collection: ~1 GB resident vs ~31 GB). The head-to-head RSS vs Qdrant/LanceDB is reference-hardware-pending and never fabricated; method and numbers live in docs/benchmarks/results/disk-path.md.

Recall on SIFT1M

In-memory HNSW (M=16, efC=200), recall@10 vs exact ground truth — a property of the index and data, so host-independent:

ef_search163264128256
recall@100.7930.8950.9580.9860.995

Reproduce with cargo run --release --example sift_recall.

Incremental updates

Every index family applies inserts, updates, and deletes incrementally, so streaming workloads avoid an O(N) rebuild per write:

  • IVF — SpFresh-style LIRE rebalancing (cell split/merge).
  • HNSWO(1) soft-delete with an amortized rebuild.
  • Vamana / disk graph — FreshDiskANN StreamingMerge (a read-only base graph plus an in-memory delta graph and an O(1) deletion set, consolidated past a churn threshold).

All indexes stay derived and the disk artifact keeps its write-once contract, so the kill -9 crash gate is untouched. See the ADRs for the per-family designs.