Memory and storage concepts
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?
- What is an array-of-structures memory layout?
- What is a structure-of-arrays memory layout?
- What is memory alignment?
- What is padding in a data structure?
- What are huge pages?
- What is prefetching?
- What is neighbor-ID width (32-bit vs. 64-bit)?
- What is a contiguous memory layout?
- What is bytes-per-vector memory accounting?
- What is peak build memory?
- What is steady-state memory?
- What is allocator overhead?
- What is serialized index size?
- What is a memory-mapped file (mmap)?
- What is on-disk record layout?
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.