AI Infrastructure·6 min read·

Scaling Milvus Vector Search on Enterprise NVMe SSDs for Billion-Scale RAG

Tune HNSW index graphs, memory-mapped vector segments, and disk-ann partitions for million-query-per-minute semantic retrieval architectures.

NB

Netbay Cloud Team

Netbay Engineering

On this page

As Retrieval-Augmented Generation (RAG) applications scale to hundreds of millions or billions of embedding vectors, keeping entire Hierarchical Navigable Small World (HNSW) index graphs in RAM becomes economically prohibitive. High-density RAM is expensive, and memory exhaustion causes sudden node crashes.

In 2026, modern AI infrastructure architectures leverage DiskANN and memory-mapped (mmap) vector indexes hosted on enterprise PCIe 4.0 NVMe solid-state storage. By combining smart caching in RAM with sub-millisecond NVMe random read performance, engineering teams can search billions of vectors with under 10ms p99 latency at a fraction of the cost.

DiskANN vs In-Memory HNSW: The Trade-Off

Traditional HNSW requires approximately 1.5x the raw vector data size in RAM. For 100 million 1536-dimensional float32 vectors, this demands over 1 TB of system memory.

With DiskANN:

  • Compressed Quantized Vectors (PQ): Kept in RAM for coarse candidate routing.
  • High-Fidelity Graph on NVMe: Full precision vectors and graph adjacency lists reside on NVMe SSD, accessed via Linux direct I/O (O_DIRECT) without operating system page cache pollution.
  • Latency Difference: Searching NVMe adds only 3 to 6 milliseconds compared to pure RAM, while cutting server hardware costs by over 75%.
Milvus Billion-Scale DiskANN Architecture Milvus Proxy gRPC Query Router Shards Hashing Port 19530 Query Node (Worker) Compressed Vectors in RAM (8 GB) Beam Search Candidate Selection Async O_DIRECT Queue Sub-5ms Query Routing Enterprise NVMe SSD DiskANN Full Graph Index ZFS RAID 10 High-Speed I/O > 120,000 Random IOPS Capacity: Multi-Terabyte Production Benchmark Results (50M 1536-dim Vectors) RAM Consumption: 16 GB (down from 180 GB) | P95 Latency: 7.2ms Hardware Infrastructure Cost Reduction: 78% on Netbay Cloud Dedicated NVMe

Milvus DiskANN Configuration Snippet

Configure the query node index building parameters to activate DiskANN:

yaml
# milvus.yaml
queryNode:
  mmap:
    vectorMemoryLimitRatio: 0.8
  disk:
    enabled: true
    path: /mnt/nvme-pool/milvus-data

index:
  type: DISKANN
  metric_type: COSINE
  params:
    search_list: 64
    beam_width: 8

With 'beam_width: 8', the search traverses the graph on disk in parallel asynchronous I/O requests, minimizing serialized wait times.

Expand
Vector Database Cluster Infrastructure
Vector database cluster storage

Video Reference on Vector Search and Transformer Attention

Review mathematical foundations of embedding spaces and vector indexes:

Vector Embeddings and Attention Mechanisms
YouTube

Scaling vector databases no longer requires exorbitant RAM expenditures when you pair modern DiskANN indexing with high-speed enterprise NVMe storage.

Deploy high-IOPS NVMe VPS instances on Netbay Cloud with guaranteed storage performance at netbayhosts.in.

Keep reading

Follow along on a real VPS

Deploy Linux in under 60 seconds

These guides are written against Ubuntu, Debian, and RHEL-family images — the same ones on NetBay.

Deploy an instance