Compute the raw storage needed for a 10M-doc index at dimension 1536 (float32)
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
You're sizing infrastructure for an embedding index. The corpus has 10,000,000 documents. You're using text-embedding-3-small at its native dimension of 1536, stored as float32. Compute the raw vector storage required (vectors only, no index overhead, no metadata). Express the answer in GB (1 GB = 10^9 bytes).
10M × 1536 × 4 bytes = 61.44 GB raw vector storage; index overhead and quantization shift the total but the raw number is the anchor.
Picture a giant spreadsheet with 10 million rows and 1,536 columns, where every cell holds one decimal number that takes 4 bytes of space. The total size of the spreadsheet is just the count of cells multiplied by the size of each cell. Multiply 10 million by 1,536 to get the cell count, then multiply by 4 bytes per cell, and you have your total in bytes. Divide by a billion to get gigabytes. The answer falls out cleanly: 61.44 GB. The rest of the work (adding index overhead, picking a smaller dim, switching to a smaller number format) is layered on top of this one straight multiplication.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Compute 61.44 GB explicitly via N × d × 4, distinguish GB from GiB, walk through what the raw number excludes (HNSW overhead, payload, replication), and close on the four design knobs to shrink it.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Mixing up GB and GiB (10^9 vs 2^30 bytes) and getting a 7% off answer. The question specifies 10^9 explicitly; honor it.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.