Memory and storage concepts

Memory and storage concepts cover how vectors and edges are laid out, accounted for, mapped, and serialized - the difference between a clever algorithm and an index that fits in RAM or on disk.
Created: Updated: 2 min read

These are the topics in this section, each on its own page with a stable path you can bookmark or share.

What topics are covered in this section?

Memory and storage concepts cover how vectors and edges are laid out, accounted for, mapped, and serialized – the difference between a clever algorithm and an index that fits in RAM.

Why does layout dominate HNSW cost?

Graph search is irregular, but storing neighbors and vectors contiguously still wins on caches. Array-of-structures versus structure-of-arrays, alignment, padding, huge pages, and prefetching change miss rates. Neighbor-ID width trades address space for bytes per edge. Bytes-per-vector accounting, peak build memory, steady-state memory, and allocator overhead explain cloud bills. Serialized index size, mmap, and on-disk record layout govern persistence and warm start.

These terms pair with compression hubs when RAM is the binding constraint.

How does Weaviate reflect these ideas?

In-memory HNSW keeps graph and vectors hot for latency; quantization shrinks vector bytes; HFresh moves bulk postings to disk with a compact in-memory navigator. Snapshots and commit logs persist structure without naive full dumps. Planning Weaviate capacity means estimating vectors, dimensions, connections, and whether the index is RAM- or disk-primary – exactly the accounting this glossary teaches.

Memory literacy prevents surprise OOM during build and silent swapping at query time.

Where next?

Read contiguous layout, bytes-per-vector, peak build memory, and mmap pages, then Part IV’s memory-layout chapter and the compression glossary. For durability formats, see persistence concepts.

This section is about fitting HNSW into bytes and devices. Next, open “What is bytes-per-vector memory accounting?” or Part IV’s layout chapter, then compression when RAM is still too high.