In-memory buys predictability; on-disk buys cost efficiency
The in-memory team should expect low and stable latency, simple capacity planning, and expensive hardware. Their p50 and p99 will be close together because every distance computation hits RAM. Their operational concerns are memory pressure - the collection must fit, including the graph and payload indexes, not just the raw vectors - and the cost of the machine. Their startup time is longer because the vectors have to be loaded and mapped, but steady-state latency is predictable. Their scaling is bounded by the largest machine they can buy, and vertical scaling is the only lever until they shard. The on-disk team should expect much cheaper hardware, a much smaller RAM footprint, and variable latency. Their p50 may be nearly as good as the in-memory team's if the working set is hot, but their p99 will be worse and more variable because cold pages require disk reads. Their operational concerns are page-cache management, disk performance (NVMe matters a lot), and the accuracy cost of quantization. They can fit the collection on a much smaller machine and can scale storage independently of RAM.
The mechanisms behind these differences are worth being explicit about. The in-memory team's latency is dominated by CPU and memory bandwidth, so tuning is about ef, m, and thread counts. The on-disk team's latency is dominated by page-cache hit rate and disk latency, so tuning is about quantization, inline storage, oversampling, and keeping the hot set resident. The in-memory team's failure modes are OOM and memory fragmentation; the on-disk team's failure modes are cache thrashing and latency cliffs when a background process evicts their hot pages. The in-memory team's cost is dominated by RAM; the on-disk team's cost is dominated by disk (especially NVMe) and by the CPU cost of rescoring, which is higher because the rescoring step runs full-precision distance computations. Both teams need to measure recall against ground truth, but the on-disk team's recall is affected by quantization and rescoring settings in addition to the usual HNSW parameters.
Latency: in-memory is low and stable; on-disk is low at p50 and variable at p99, dominated by cache misses.
Cost: in-memory is RAM-dominated and expensive; on-disk is disk-dominated and much cheaper per vector.
Capacity: in-memory is bounded by the largest machine; on-disk can store far more than RAM at the cost of latency.
Tuning knobs: in-memory tunes ef, m, threads; on-disk additionally tunes quantization, oversampling, rescoring, and inline storage.
Failure modes: in-memory risks OOM and fragmentation; on-disk risks cache thrashing and latency cliffs.
Recall: on-disk has a quantization accuracy cost that must be measured and managed with rescoring.
Operational complexity: on-disk requires understanding the page cache and disk performance; in-memory requires capacity planning for graph and payload overhead.
The trade-off is cost against latency predictability. The in-memory team pays more for hardware and gets simpler operations and a tighter tail. The on-disk team pays less and accepts a more complex operational surface and a looser tail. The right choice depends on whether the application is latency-sensitive (in-memory) or cost-sensitive with tolerance for tail variance (on-disk). The hybrid - quantization with quantized vectors in RAM and raw vectors on disk - is often the best of both, giving near-in-memory traversal latency at a fraction of the RAM. The common mistake is assuming on-disk is just slower. It is not; it is different, and with quantization and rescoring it can be competitive at p50. The second mistake is assuming in-memory is always faster at p99. If the in-memory machine is under memory pressure from other workloads, it can also have a bad tail. The third mistake is comparing the two by raw vector bytes only, ignoring the graph and payload index overhead that the in-memory team has to fit in RAM too. Version note: the on-disk capabilities (inline storage, quantization options) and the in-memory footprint of the graph have changed across releases, so the cost and latency comparison should be re-run on your version rather than assumed.
Version-dependent: the on-disk features available (inline storage, quantization schemes, the on_disk flags) and the memory overhead of the graph and payload indexes have changed across Qdrant releases. If you are making a cost decision between the two configurations, compute the footprint on your version and re-check after upgrades, because both the storage layout and the defaults have shifted.
Two teams have the same collection and different latency profiles. List three reasons the on-disk team's p99 could be worse than the in-memory team's.
A teammate says on-disk is always cheaper. Explain what other costs the on-disk configuration introduces.
You have a 50M-vector collection and a fixed monthly budget. Walk through how you would decide between the in-memory and on-disk configurations and what you would measure to justify the choice.
The in-memory team is hitting OOM during peak hours. Explain how you would diagnose whether the graph, payload indexes, or the raw vectors are the cause.
Design a hybrid configuration for the 50M collection that gives near-in-memory p50 and a controlled p99, and describe the trade-off you are making versus each pure configuration.
You must reduce infrastructure cost by 50 percent without exceeding a 30ms p99. Compare moving to on-disk with quantization against sharding across smaller machines, and recommend one.
Derive the total cost per query for the in-memory and on-disk configurations, including hardware amortization, latency-driven autoscaling, and engineering effort. Which assumptions dominate the comparison?
You are designing a multi-year storage strategy for a growing collection. Describe the decision points at which you would switch configurations and how you would migrate without downtime.