Vector database sizing

Memory, infrastructure & embedding economics.

Workload

Memory overview

Required RAM / replica
147.9GiB
HNSW · FP32 · 25% safety buffer
Cluster memory
295.8 GiB
Across 2 copies
Vector bytes saved
0%
vs. FP32 baseline

Memory at scale

FP32FP16INT8PQ
Vector countPer replica, including headroom

72.5% less total RAM with INT8

107.3 GiB saved per replica. Benchmark recall first.

Cloud cost comparison

Illustrative USD / month · workload and capacity assumptions apply

ProviderSizing basisMonthlyAnnual

Budget estimates, not vendor quotes. Excludes tax, egress, backups, setup and operations.

Initial embedding cost

5B tokens · $0.13 / 1M tokens

$650one-time ingestion
Derived from this workload
compose.qdrant.yaml

The 10x vector memory bill

Oversized instances. Extra replicas. Full-precision vectors. Costs compound. Scalar quantization cuts vector bytes by 75%; metadata and index overhead stay. A 10x bill reduction needs more than INT8 alone.

FP32
147.9 GiB
INT8
40.6 GiB

Planning a production vector cluster?

Enterprise architecture & capacity review

※ 当サイトはアフィリエイトプログラムによる広告・提携リンクを含みます [PR]

Vector Database & Information Retrieval Engineering Books

SPONSORED / AFFILIATE
VECTOR SEARCH SYSTEMS

Search Systems: A Practitioner's Guide to Architecture

Detailed implementations of inverted indexes, approximate nearest neighbors (HNSW), and distributed vector stores.

View on Amazon ›
CLOUD NATIVE ARCHITECTURE

Cloud Native Distributed Storage Design Patterns

Replication topologies, sharding, consensus protocols, and NVMe tiering for petabyte-scale retrieval.

Explore on Amazon ›
RUST HIGH PERFORMANCE

Programming WebAssembly & Rust for High-Throughput Engines

Zero-cost abstractions, memory alignment, and SIMD vector operations for low-latency similarity search.

Check Books ›

*Disclosure: This site contains affiliate links.

Frequently Asked Questions (FAQ & Verification)

How much RAM does HNSW index require?
(Dimensions * 4 bytes + M * 8 bytes) * vector_count * 1.25 safety overhead.
Does Scalar Quantization (SQ8) degrade accuracy?
SQ8 reduces RAM by 75% with less than 1% degradation in recall@10.
When should I choose pgvector over Qdrant?
Use pgvector under 1M vectors with relational data; use Qdrant for dedicated scale.
How is embedding API cost calculated?
Token count divided by 1M multiplied by vendor rate (e.g. OpenAI text-3-large).
Does on-disk payload storage reduce cost?
Yes, keeping payloads on disk and only index vectors in RAM cuts memory bills by 60%.

Vector cluster architecture

Cost assumptions

Editable planning inputs in USD. These are illustrative bundles, not verified live prices. Provisioned costs follow total copies; managed serverless redundancy is included by the provider. Validate each estimate against your workload.

A month is 730 hours. Dedicated hosts reserve 16 GiB for the OS. Raw vectors and payload count toward disk; quantized codes are additional. Hardware prices exclude setup and tax.

Sizing model & limitations

Memory is a budget, not a benchmark

N is the number of vectors, not source documents. Presets assume one vector per document; chunked RAG corpora usually produce several. RAM is steady-state resident memory, with all metadata treated as resident. Payload indexes, allocator overhead, deleted points, WAL, query concurrency and build peaks need measurement.

Vector storage

FP32 = N x D x 4 bytes
FP16 = N x D x 2 bytes
INT8 = N x D bytes
PQ = N x ceil(D / 8) bytes + 256 x padded(D, 8) x 4

PQ assumes an 8-bit code per eight dimensions, about 32:1 vector compression at divisible dimensions. The shared codebook is included. Nonmultiples of eight are padded for this analytical estimate. Original FP32 vectors remain on disk for compressed indexes, and are added to RAM only when selected. FP16 is stored directly without a second FP32 copy.

Index structures

HNSW graph = N x M x 8 x 1.25 bytes
Metadata = N x bytes per payload
RAM per replica = (vectors + index + metadata + retained originals) x (1 + headroom / 100)
Cluster RAM = RAM per replica x total copies

The HNSW multiplier models upper layers and link allocation. efConstruction changes build work and recall, not this graph formula. Flat has no graph; compressed flat scans are approximate. IVF-PQ assumes round(sqrt(N)) lists, 4-byte centroid dimensions, 8-byte IDs and the PQ codes above. ScaNN uses the same coarse partition and code estimate as a representative approximation; actual ScaNN layouts and reordering caches differ. IVF-PQ and ScaNN therefore select PQ automatically.

Units and headroom

1 GiB = 1,073,741,824 bytes. 1 GB = 1,000,000,000 bytes. A 25% buffer means multiplying the resident subtotal by 1.25; it does not mean 25% of provisioned memory is unused. Comparisons use the same workload with retained originals disabled to isolate precision savings.

Costs and replicas

Qdrant and pods use editable RAM bundles, rounded up per complete replica. These are synthetic memory-capacity models, not official instance recommendations. Bare metal uses the larger of RAM and mirrored NVMe requirements, with an OS reserve. Serverless read/write units and OpenSearch OCUs are explicit workload assumptions; their costs are not inferred from RAM. Managed serverless costs include service-managed redundancy and do not multiply by the copies control. Read units are not request counts. One-time embeddings assume the entered tokens per vector and API rate; a zero rate excludes self-hosted GPU time.

Deployment exports

Qdrant templates form a local distributed reference cluster with persistent volumes and a required API key. Compose hosts are not independent failure domains. Collection setup is a separate export. Milvus Compose is a standalone reference deployment; production replicas need a distributed Milvus deployment. Templates require TLS, secret management, backups, load testing and version review before production.

Reference documentation

Qdrant optimization · Milvus indexes · ScaNN

Privacy

All calculations and exports run locally. No analytics, cookies, remote scripts or form submissions. Shared links contain the complete planning scenario, including custom rates. The review action prepares an email draft in your mail client.

Architecture & capacity review

Production sizing, index selection, recall targets and infrastructure costs. Your current sizing scenario is included in the review brief.

Opens a draft addressed to [email protected]. No request is submitted on this page.