🇪🇸 Cambiar a versión en español: Calculadora de RAM y Disco para Bases Vectoriales RAG (HNSW)
Calculate exact in-memory RAM and NVMe disk sizing for HNSW vector databases (pgvector, Qdrant, Milvus, Weaviate) and see how fp16, int8 scalar quantization, and binary quantization cut cloud RAM bills.
Quantization Sizing Breakdown for Your Dataset
| Memory Format | Bytes/dim | Hot HNSW + Vector RAM | Recommended Node RAM | Savings vs fp32 |
|---|
HNSW Graph & Embedding Memory Formula
Following pgvector (PostgreSQL HNSW & halfvec) and the Hierarchical Navigable Small World (HNSW) graph design, keeping the index inside hot RAM avoids catastrophic random SSD page faults:
Vector Bytes = N × D × Precision_Bytes
HNSW Graph Overhead ≈ N × (M × 2 × 4 bytes) × 1.08
Frequently Asked Questions
Why doesn't binary quantization make HNSW memory 32× smaller overall?
Because shrinking vector coordinates by 32× leaves the bidirectional HNSW adjacency pointers (M × 2 × 4B per node) untouched, making graph topology links the dominant share of hot RAM.
How much recall is lost moving from float32 to halfvec (fp16) or int8?
Switching to fp16 cuts vector RAM in half with typically <0.1% recall drop, while int8 and binary quantization achieve high accuracy when paired with oversampling + SSD rescoring on top candidates.
maintenance_work_mem in pgvector during index builds to avoid slow disk spills.