Vector Database Storage Estimator

Plan a retrieval system before you build it: how many vectors your documents make, how much disk and memory the index needs, how that grows, and what it costs at your prices.

Hufanya kazi kwenye kivinjari chako. Faili zako hazitoki kamwe kwenye kifaa. Tazama jinsi ya kuthibitisha

…

Jinsi ya kufanya

  1. 1
    Describe the documents

    Enter the number of documents and their average length in tokens.

  2. 2
    Set chunking

    Enter chunk size and overlap in tokens and check the vectors-per-document figure.

  3. 3
    Choose the model

    Pick an embedding preset or type the dimensions and price per million tokens.

  4. 4
    Choose storage

    Pick precision, index type and its settings, metadata size and whether to store text.

  5. 5
    Enter prices

    Type your disk and RAM prices, replicas, monthly growth and how many months to project.

  6. 6
    Compare and export

    Save scenarios, compare them in the table and export the CSV.

Kuhusu zana hii

Vector search gets expensive in a way that surprises teams: the vectors themselves are small numbers, but there are many of them, every chunk overlap multiplies them, and the fast indexes keep most of it in memory. A hundred thousand documents can become half a million vectors, and a 3,072-dimension model at full precision needs 12 KB for each before any index or metadata. This estimator walks through the whole chain. You enter the number of documents and their average length in tokens, the chunk size and overlap, and it computes chunks per document, total vectors and the tokens you pay to embed, including the share that overlap adds. Pick an embedding model preset or type the dimensions, choose how vectors are stored (float32, float16, int8, binary or product quantization) and choose the index (flat, HNSW with its M setting, IVF-Flat or IVF-PQ with nlist). The result splits storage into vectors, index graph or centroids, ids, metadata, stored chunk text and the full-precision originals that quantized indexes usually keep for rescoring. It shows disk and RAM with replicas, a growth table at your monthly growth rate, the one-time embedding cost, and monthly cost at your own disk and RAM prices. Save up to five scenarios to compare them.

The formulas

Chunks per document are 1 when a document fits in one chunk, otherwise 1 plus the remaining tokens divided by the step, rounded up, where the step is chunk size minus overlap. Vector bytes are dimensions times 4 for float32, 2 for float16, 1 for int8, one eighth for binary, or the code size m for product quantization. HNSW stores about 2M neighbour ids of 4 bytes on its bottom layer plus a small share for upper layers, so M = 16 adds roughly 132 bytes per vector. IVF keeps nlist centroids at full precision plus an id per vector; IVF-PQ stores only the m-byte codes per vector.

RAM versus disk

Graph indexes such as HNSW answer fast only when the vectors and graph sit in memory, so RAM is usually the cost that matters. By default the estimate keeps vectors, index and ids in RAM and puts metadata and text on disk; switch to everything in RAM for in-memory databases. With int8 or binary storage the RAM need falls 4 to 32 times, while disk grows a little because the float32 originals are kept for re-scoring the top results.

Choosing settings

Overlap of 10 to 20 percent of the chunk is a common starting point; the advice list warns when it passes half. For IVF, nlist around four times the square root of the vector count is a usual choice, and PQ needs the dimension to divide evenly by m. Over a million vectors, brute-force flat search becomes slow and an index is worth it.

Limits

Real engines add write-ahead logs, segment files, deleted-vector tombstones and compaction space, so plan 20 to 50 percent headroom. Managed services price by pods, read and write units or storage tiers rather than per gigabyte; convert their plan to the two prices here or treat the cost line as a rough guide, not a quote. Embedding prices in the presets are list prices at review time and change often.

Mfano uliotatuliwa

A help centre has 50,000 documents of about 2,000 tokens. With 512-token chunks and 64-token overlap the step is 448, so each document makes 5 chunks and the index holds 250,000 vectors. Embedding 112.8 million tokens with a 1,536-dimension model at $0.02 per million costs about $2.26, and overlap adds 11.3 percent of those tokens. At float32 each vector takes 6,144 bytes, 1.43 GB in total, the HNSW graph with M = 16 adds 31.5 MB, stored text adds 488 MB and metadata 47.7 MB, for 1.99 GB on disk and 1.46 GB in RAM, about $4.59 a month at $0.10 per GB of disk and $3 per GB of RAM. Switching to int8 cuts RAM to 400 MB and the bill to about $1.41.

Kwa ufupi

Maswali yanayoulizwa mara kwa mara

How do I find my average document length in tokens?

Count words in a sample of documents and multiply by about 1.3 for English, or by roughly 1.5 to 2 for many other languages. One page of prose is about 500 words, or roughly 650 tokens.

Which index should I pick?

HNSW is the default in most vector databases and gives fast, accurate search with everything in memory. IVF uses less memory and builds faster on very large sets, and IVF-PQ compresses vectors heavily at some cost in recall.

Does quantization hurt search quality?

A little. int8 usually keeps recall close to float32, and binary needs a re-scoring step with the original vectors. Test recall on your own queries before you switch.

Why is chunk text counted?

Many setups store the chunk text next to the vector so results come back ready to use. It can be larger than the vectors; untick it if your text lives in another database.

What do replicas do to the estimate?

Disk, RAM and monthly cost are multiplied by the number of replicas, since each copy holds the full index.

Can I compare settings?

Yes. Save the current inputs as a named scenario, change them, and the comparison table shows vectors, disk, RAM and cost for up to five saved scenarios plus the current one.

Bila malipo kabisaHakuna ada, hakuna usajili
Faili hubaki za faraghaKila kitu hufanya kazi kwenye kivinjari chako
Rahisi katika lugha yakoInapatikana kwa lugha nyingi