Size RAM and SSD separately for each copy of your vector index. RAM = resident embeddings + resident HNSW graph + resident payloads and filter indexes + serving and rebuild headroom. SSD = retained originals + other persisted vector and graph files + stored payloads and filter indexes + logs + rebuild disk space. Add the copies assigned to each node, then sum the node budgets across the deployment.
Start with the raw embedding
Multiply the vector count by the dimensions per vector and the bytes per component. Count every embedding when a document produces multiple vectors.
Embedding bytes = vector count × dimensions × bytes per component
Float32 uses 4 bytes per component. Qdrant’s 8-bit scalar quantization uses 1 byte per component, giving a quarter of the raw float32 embedding bytes. Qdrant quantization documentation.
| Dimensions | Float32 bytes per vector | Float32 bytes for 1 million vectors |
|---|---|---|
| 384 | 1,536 | 1.536 GB |
| 768 | 3,072 | 3.072 GB |
| 1,536 | 6,144 | 6.144 GB |
| 3,072 | 12,288 | 12.288 GB |
Convert bytes to GB by dividing by 10^9 and to GiB by dividing by 2^30. Keep the units consistent when comparing the estimate with a node’s capacity. NIST binary prefixes.
The graph is a separate, dimension-independent cost
In HNSW, M controls how many neighbors the graph links to. Faiss gives dimensions × 4 + M × 2 × 4 bytes per vector for its float32 HNSW index. The second term estimates graph cost. Faiss index-selection guide.
Estimated graph bytes per copy = vector count × 2 × M × 4
At M = 16, that is 2 × 16 × 4 = 128 bytes per vector. Doubling M doubles this term. Reducing dimension or precision leaves the term unchanged, so the graph takes a larger share of a compressed index.
Use the Faiss term as a starting estimate. Engines can add graph structures beyond this term, such as Qdrant’s extra edges for indexed filter fields. Qdrant indexing documentation.
Quantization changes the ratio, not just the total
Qdrant’s one-bit binary encoding brings the raw embedding payload to one thirty-second of float32. The graph still takes the same estimated space at a fixed M and vector count. Qdrant quantization documentation.
A hybrid layout keeps compressed vectors in RAM for search and retains original vectors on SSD. Rescoring can read those originals to rerank candidates. Include their full size in the SSD budget and allow for any original-vector pages your engine keeps cached during serving. Qdrant quantization documentation.
Everything else that wants memory
Fill in the remaining rows for each copy. Use the storage layout of your engine and a representative sample with the same vector encoding, payload fields and filters.
| Input | Add to RAM | Add to SSD |
|---|---|---|
| Embeddings and graph | Resident vector representations and graph | Retained originals and other persisted vector and graph files. Count the originals once if they are already inside an index file. |
| Payloads and metadata | Resident payloads and the resident part of filter indexes | Stored payloads, filter-index files and write logs |
| Peak serving and rebuild needs | Query buffers, cache and any extra working memory or resident replacement index during rebuild | Temporary build files and any replacement files that coexist with files already counted |
Estimate stored payload bytes from the sample’s average serialized payload size times the target count. Budget filter indexes separately because they can use both memory and disk. Check the engine’s write-log allocation as well. Qdrant indexing documentation, Qdrant storage documentation.
For a rebuild during serving, budget the peak overlap. Add concurrent build workspace and resident replacement structures to serving RAM. Add temporary build files and overlapping replacement files to live SSD usage. Qdrant’s optimizer, for example, keeps the old segments readable while it builds a replacement. Qdrant optimizer documentation.
A replica is another copy of the data it serves. Sum the copies or shard copies on each node, then add shared process and operating-system resources once per node. Size each node from its own total, including the busiest rebuild you expect it to handle. See the sharding guide for placement decisions.
Worked example
Assume 5 million vectors at 768 dimensions, M = 16, and two total copies on separate nodes. Both layouts keep the estimated graph and their serving vector representation in RAM. Both retain one float32 original per vector on SSD. These are placement assumptions for the arithmetic below.
| Per-copy calculation | Float32 in RAM | 8-bit scalar (int8) in RAM |
|---|---|---|
| Resident embedding bytes | 5,000,000 × 768 × 4 = 15.36 GB | 5,000,000 × 768 × 1 = 3.84 GB |
| Resident graph estimate | 5,000,000 × 2 × 16 × 4 = 0.64 GB | 0.64 GB |
| Index RAM subtotal | 16.00 GB (14.90 GiB) | 4.48 GB (4.17 GiB) |
| SSD originals alone | 15.36 GB (14.31 GiB) | 15.36 GB (14.31 GiB) |
With one copy per node, each node starts with its column’s RAM and SSD subtotals. Across two nodes, the index RAM is 2 × 16.00 = 32.00 GB for float32 or 2 × 4.48 = 8.96 GB for int8. The retained originals alone total 2 × 15.36 = 30.72 GB on SSD in either case.
For the int8 RAM subtotal, 4,480,000,000 ÷ 2^30 ≈ 4.17 GiB. Add the remaining worksheet rows before choosing node capacities. The HNSW index sizer calculates the embedding and graph subtotals for other dimensions, precisions and copy counts.
When RAM is the wrong answer
If the resident index exceeds the RAM budget, check which vector representations your engine can serve from disk. Qdrant documents keeping the originals on disk with compressed vectors in RAM, or serving both from disk. Recalculate the resident and persisted bytes and account for disk reads when estimating search and rescoring latency. Qdrant quantization documentation.
A sizing checklist
- Set a target vector count for each copy, including growth. Multiply by dimensions and bytes per component for every representation you plan to keep.
- Estimate HNSW graph bytes with
count × 2 × M × 4. Put vectors and graph bytes in the RAM budget according to their placement. - Add retained originals and other persisted index files to SSD. Use file sizes from the chosen engine and count each file once.
- Fill in payload, metadata, filter-index and log bytes for each copy. Include resident structures in RAM and persisted structures on SSD.
- Map each copy to its node. Sum copy budgets locally, add shared serving overhead once per node, and include peak rebuild RAM and SSD needs. Sum the node budgets for the fleet total.
- Convert bytes to GB or GiB to match the node specifications and check both capacity limits on each node.
For index choice, see HNSW vs IVF: vector index tradeoffs compared. For an existing index returning poor matches, see low vector search recall: causes and fixes. For background, see vector search fundamentals.
Evidence and limits. The estimates are based on the rolling Faiss wiki and Qdrant documentation, including memory tiers introduced in Qdrant v1.19. The sizing steps were not run against a deployment.