One Million Chunks: 1.4 GiB or 15.4 GiB of Vector Index

📘 Tutorials 2026-11-23 5 min read

A vector index is sized by guesswork, then doubles in RAM after load because HNSW links and payload were never counted, or a 4,096-dimension model turns out not to fit the half-precision column type.

📜 Table of Contents

A million chunks, one index, and the storage bill lands anywhere between 0.5 GiB and 15.4 GiB depending on three numbers you pick on day one: the vector dimension, the number format, and the graph degree. None of the three is a tuning knob you revisit later — changing any of them means rebuilding the index.

Every figure below is arithmetic on values read from the model repos and the database source on 23 November 2026. No benchmarks, no vendor pages, no estimates dressed up as measurements.

The three numbers that decide index size

Dimension comes from the embedding model and is fixed. Number format is your choice: float32, float16, int8, or binary. Graph degree is the HNSW setting m, and it sets how many neighbour references each node stores. Payload and document ids add a fourth term that people forget until the index is half again as large as planned.

Vectors are the bulk. For one million chunks the arithmetic is 1,000,000 x dim x bytes_per_number, which is 4 GiB per 1,024 dimensions at float32, 2 GiB at float16, and 1 GiB at int8. Nothing about your data changes that; only dimension and format do.

Real dimensions, read from six model configs

model (Hugging Face, 23 Nov 2026)dimmax positionindex for 1M chunks, float32 + m=16
all-MiniLM-L6-v23845121.55 GiB
nomic-embed-text-v1.57682,0482.98 GiB
bge-m31,0248,1943.93 GiB
multilingual-e5-large1,0245143.93 GiB
jina-embeddings-v31,0248,1943.93 GiB
Qwen3-Embedding-8B4,09640,96015.38 GiB

Two 1,024-dimension models cost the same and behave nothing alike: e5-large stops at 514 tokens, bge-m3 runs to 8,194. Dimension sets storage, context limit sets what a chunk can contain, and teams routinely conflate them.

The arithmetic for one million chunks

dimfloat32float16int8binary
3841.43 GiB0.72 GiB0.36 GiB0.04 GiB
7682.86 GiB1.43 GiB0.72 GiB0.09 GiB
1,0243.81 GiB1.91 GiB0.95 GiB0.12 GiB
1,5365.72 GiB2.86 GiB1.43 GiB0.18 GiB
3,07211.44 GiB5.72 GiB2.86 GiB0.36 GiB
4,09615.26 GiB7.63 GiB3.81 GiB0.48 GiB

The single decision that saves the most is format. A 4,096-dimension model at float16 takes 7.63 GiB where float32 takes 15.26, and int8 takes 3.81. That is the difference between a 16 GiB box and an 8 GiB box for the same million chunks.

HNSW links are not free: 0.12 GiB at m=16, four times that at m=64

Each node stores a neighbour list. With m neighbours per side at layer zero, the links cost 1,000,000 x 2 x m x 4 bytes — an unsigned 32-bit id per neighbour. At m=16 that is 0.12 GiB, at m=32 0.24 GiB, at m=64 0.48 GiB, at m=8 0.06 GiB. Small next to 3.81 GiB of vectors, and still worth counting because it scales with m alone, not with dimension, so it matters most on small models: at 384 dimensions the graph is 8% of the index at m=16.

Ids and payload are the term nobody budgets. Eight bytes per id is 8 MB per million; a 128-byte payload per chunk is 0.12 GiB; a 1 KB JSON blob per chunk is 0.95 GiB and will outgrow your vectors. If your metadata is fat, store it outside the index and keep a key in the payload.

What breaks inside the actual databases

pgvector, README of 23 November 2026: HNSW defaults to m = 16, ef_construction = 64, and halfvec supports up to 4,000 dimensions. That last number is a real constraint, not a footnote: a 4,096-dimension model cannot be stored as halfvec(4096). You get float32 or you cut the vector. sparsevec allows up to 1,000 non-zero elements, which rules out dense vectors entirely.

Qdrant, source of 23 November 2026: HnswConfig defaults to m: 16 and ef_construct: 100. Same arithmetic, different name for the setting, and the same rebuild if you change it after loading data.

Ten lines to compute your own number

N = 1_000_000
dim = 1024
for fmt, b in (("f32", 4), ("f16", 2), ("int8", 1), ("binary", 0.125)):
    vec = N * dim * b
    links = N * 2 * 16 * 4          # m=16, 4-byte ids
    print(fmt, round((vec + links) / 1024**3, 2), "GiB")

Run it with your own N, your model's dimension, and the format you are willing to pay for in recall, then add 8 bytes per id and your payload estimate. That whole calculation takes a minute and it is the difference between a database that fits and an outage on a Saturday.

Context cost, once the retrieved chunks are back in the prompt, is a different bill: what a token of context costs in VRAM. The per-question retrieval bill is in the RAG cost measurement, whether your retrieval actually got better is in the Ragas harness, and a self-hosted stack that ships most of this by default is in the RAGFlow container notes.

Where this arithmetic stops being true

Quantized vectors change recall, and this article does not measure by how much — that depends on the model and the data, and claiming a number without running it would be inventing one. Matryoshka models (jina-embeddings-v3 lists 32 to 1,024, Qwen3-Embedding supports shrinking too) let you cut dimension, which changes index quality in a way storage math cannot see. On-disk indexes trade RAM for latency without changing the byte counts above. And every figure here assumes one copy: replicas multiply it, and so does a rebuild running next to the live index.

Related Articles
2026-07-23
Azure Machine Learning Pipelines Complete Guide 2026: Build and Deploy
2026-08-13
Cursor Rules Examples 2026: 12 Real .cursorrules for Python, React and Data Work
2026-08-01
Img2Img Tutorial 2026: Transform Images With AI - The Complete Guide
2026-07-19
AnythingLLM Tutorial: Manage All AI Models in One Interface
2026-07-19
OWASP Top 10 LLM Security Risks: Prompt Injection and Data Leakage Take Center Stage
2026-08-10
AI Image Maker 2026: First Steps With Stable Diffusion and ComfyUI

Written by our editorial team; tools listed here are tested or verified against public sources. Links point to official sites or GitHub repos for reference only — no paid placements.

💬 Comments (0)

No comments yet. Be the first!

Login to comment