Guide / how much RAM for 1 million embeddings
How Much RAM for 1 Million Embeddings?
One million vectors can look small in row count and large in memory once dimensions, precision, index overhead, metadata, and replicas are included.
Quick answer
Raw RAM for embeddings is vector count multiplied by dimensions multiplied by bytes per dimension. For 1 million 1536-dimensional float32 embeddings, the raw vector payload is about 6.14 GB before index structures, metadata, replicas, allocator overhead, and rebuild headroom.
That raw number is the floor, not the production budget. A vector database also stores IDs, payload indexes, filters, graph links or centroid lists, deleted markers, and capacity margin.
The formula
Use bytes = vectors x dimensions x bytesPerDimension. Float32 uses 4 bytes per dimension, float16 uses 2 bytes, and int8 uses 1 byte. Convert bytes to GB by dividing by 1,000,000,000 for decimal GB or by 1,073,741,824 for GiB.
After raw payload, add an index multiplier and operational headroom. HNSW commonly needs more RAM than Flat or IVF because graph neighbor links live beside the vector payload.
Production budget
For planning, keep raw vectors, index overhead, metadata, replicas, and spare memory as separate line items. Mixing them into one number hides the part that actually breaks first.
If the estimate is close to machine RAM, treat the design as already risky. Compaction, rebuilds, background indexing, and cache pressure need room to breathe.
Complexity Table
| Example | Raw payload | Index and metadata risk | Planning note |
|---|---|---|---|
| 1M x 384 float32 | About 1.54 GB | Moderate | Small embedding models fit easily before replicas |
| 1M x 768 float32 | About 3.07 GB | Moderate | Add metadata and HNSW before choosing instance size |
| 1M x 1536 float32 | About 6.14 GB | High | Often needs 10 GB or more once overhead is included |
| 1M x 1536 float16 | About 3.07 GB | Moderate | Compression lowers payload but not every overhead item |
When to Use This
- Use this estimate before selecting a vector database tier or cloud instance.
- Use it to compare float32, float16, int8, and quantized storage choices.
- Use it as a sanity check before assuming 1 million vectors is operationally small.
When Not to Use This
- Do not treat raw vector RAM as the full bill for HNSW, filters, replicas, or managed services.
- Do not use this estimate as a replacement for measuring the exact database implementation you deploy.
Production Failure Modes
The common failure is multiplying vectors by dimensions and stopping there. The database later fails because graph edges, payload indexes, replicas, and headroom were not budgeted.
Another failure is sizing for steady state only. Rebuilds, compaction, and ingestion spikes can temporarily need more memory than query serving.
Animated SVG Diagram
Next Topics
FAQ
How much RAM does 1 million 1536-dimensional float32 embeddings need?
The raw vector payload is about 6.14 GB. Production RAM is higher after index overhead, metadata, replicas, allocator overhead, and headroom.
Does float16 cut embedding RAM in half?
It cuts the raw vector payload roughly in half, but IDs, metadata, graph links, and other database overhead do not all shrink by the same amount.
What should I calculate after raw embedding memory?
Add index overhead, metadata and filter indexes, replicas, sharding headroom, rebuild buffers, and operating-system memory pressure.