Inferensys

Glossary

Throughput (QPS)

Throughput, measured in Queries Per Second (QPS), is the maximum number of search operations a vector database system can process per unit time while maintaining acceptable latency, defining its overall capacity.
Engineer reviewing vector database search results on laptop, embeddings visualization on screen, home office coding session.
VECTOR QUERY OPTIMIZATION

What is Throughput (QPS)?

Throughput, measured in Queries Per Second (QPS), is a fundamental performance metric for vector databases.

Throughput, or Queries Per Second (QPS), is the maximum number of search operations a vector database system can process per second while maintaining acceptable latency and accuracy. It represents the system's overall capacity for handling concurrent similarity searches, such as k-NN or filtered search requests. High throughput is critical for applications requiring real-time retrieval from large-scale embedding datasets, directly impacting user experience and system scalability. It is a key metric alongside P99 latency for defining service-level objectives (SLOs).

Throughput is determined by hardware resources (CPU, memory, I/O), vector indexing algorithm efficiency, and system architecture choices like sharding and load balancing. Optimizations such as batch querying, efficient distance metric computation (e.g., cosine similarity), and query planning that utilizes dynamic pruning can significantly increase QPS. Engineers must balance throughput against recall and latency, as aggressive optimizations for speed can compromise result quality. Monitoring QPS under load is essential for vector database operations and capacity planning.

VECTOR QUERY OPTIMIZATION

Key Characteristics of Throughput

Throughput, measured in Queries Per Second (QPS), defines a system's capacity for concurrent search operations. Its optimization involves balancing multiple, often competing, system parameters.

01

Inverse Relationship with Latency

Throughput and latency exhibit a fundamental trade-off. As the offered load (queries per second) increases towards a system's maximum throughput, queuing delays accumulate, causing average and tail latency (e.g., P99 Latency) to rise non-linearly. The goal is to operate at a throughput level that keeps latency within Service Level Objectives (SLOs). Pushing beyond the saturation point leads to thrashing and exponential latency growth.

02

Concurrency and Parallelism

High throughput is achieved by processing multiple queries simultaneously. This relies on:

  • Concurrency: The system's ability to handle multiple in-flight queries through techniques like asynchronous I/O and non-blocking operations.
  • Parallelism: The physical execution of multiple queries at the same instant, utilizing multi-core CPUs and SIMD (Single Instruction, Multiple Data) instructions for batched distance computations. Effective load balancing across threads and nodes is critical to prevent bottlenecks and maximize parallel resource utilization.
03

Resource Saturation Points

Maximum sustainable throughput is determined by the first resource to reach 100% utilization, known as the bottleneck. Common saturation points in vector databases include:

  • CPU Cores: Exhausted by distance calculations and graph traversal logic.
  • Memory Bandwidth: Overwhelmed by streaming large volumes of vector data from RAM.
  • Network I/O: Saturated in distributed clusters during query fan-out and result aggregation.
  • Disk I/O: Becomes a bottleneck for persistent indexes that are not fully memory-resident. Profiling identifies the limiting resource for targeted optimization.
04

Impact of Index Parameters

The choice of Approximate Nearest Neighbor (ANN) index and its parameters directly dictates the throughput-latency frontier. For example:

  • HNSW: Higher M (maximum connections) and efConstruction parameters create a more accurate, denser graph, increasing per-query latency but potentially allowing higher throughput at a given recall target due to more efficient search paths.
  • IVF indexes: A larger nlist (number of Voronoi cells) reduces the number of vectors per cell, speeding up individual queries (lower latency) but requiring more distance computations to centroids, which can impact throughput if not optimized via Inverted File Index pruning.
05

Query Batching

Processing multiple queries in a single batch is a primary technique for maximizing throughput. It amortizes system overheads and enables hardware-efficient operations:

  • Batch Size: The number of queries grouped together. Larger batches increase throughput but also increase the latency for the first query in the batch.
  • Hardware Utilization: Enables full utilization of SIMD units on CPUs and tensor cores on GPUs by performing many distance calculations in parallel.
  • System Overhead: Reduces per-query costs for network serialization, scheduling, and index access. Continuous batching, where batches are dynamically assembled from a queue, is used in high-throughput serving systems.
06

Measurement and Load Testing

Throughput is not a single number but a curve dependent on load and latency constraints. It is characterized through:

  • Load Testing: Systematically increasing the request rate until latency SLOs are violated or resource saturation occurs.
  • Percentile Analysis: Throughput must be evaluated alongside P50, P95, and P99 Latency metrics. A system may sustain 10k QPS at P50 latency <10ms but only 5k QPS at P99 latency <50ms.
  • Steady-State vs. Burst: Sustainable throughput is the rate a system can maintain indefinitely, distinct from short-term burst capacity which may rely on transient resource buffers.
VECTOR QUERY OPTIMIZATION

The Throughput-Latency Trade-Off

A fundamental engineering constraint in vector database performance where increasing the rate of processed queries (throughput) typically increases the time to complete each query (latency).

Throughput, measured in Queries Per Second (QPS), is the maximum number of search operations a system can handle per unit time. Latency is the time taken to complete a single query. In vector databases, these metrics are intrinsically linked: pushing a system to its maximum QPS often increases average and P99 latency as resource contention (CPU, I/O, network) grows. System architects must define an SLO (Service Level Objective) that balances acceptable response times with required processing capacity.

Optimizing this trade-off involves tuning index parameters (like HNSW's ef or IVF's nprobe), managing system resources, and implementing techniques like query concurrency limits and load shedding. The goal is to achieve the highest sustainable throughput while keeping latency—especially tail latency—within strict bounds for real-time applications like semantic search and retrieval-augmented generation (RAG).

SYSTEM ARCHITECTURE & CONFIGURATION

Factors Influencing Throughput

A comparison of key architectural decisions and their impact on the maximum sustainable Queries Per Second (QPS) for a vector database system.

FactorHigh Throughput ConfigurationBalanced ConfigurationHigh Precision Configuration

Index Algorithm

IVF (Inverted File Index)

HNSW (Hierarchical Navigable Small World)

Exhaustive (Flat) Search

Quantization / Compression

Product Quantization (PQ)

Scalar Quantization (SQ)

No Compression (Full Precision)

Search Parameter (e.g., ef_search, nprobe)

Low (e.g., ef_search=16, nprobe=1)

Moderate (e.g., ef_search=64, nprobe=8)

High (e.g., ef_search=256, nprobe=all cells)

Query Concurrency Model

Asynchronous I/O with Continuous Batching

Thread Pool with Connection Pooling

Synchronous Request-Response

Data & Index Placement

Fully In-Memory (RAM)

Hybrid (Hot in RAM, Cold on SSD)

On-Disk / Persisted Storage

Sharding Strategy

Vector Dimension-Based Sharding

Metadata-Based Sharding

Single Shard (No Distribution)

Distance Metric Computation

Hardware-Accelerated (e.g., SIMD, GPU)

Optimized CPU Libraries

Native Floating-Point

Filtered Search Strategy

Post-Filtering

Pre- & Post-Filtering Hybrid

Pre-Filtering

THROUGHPUT (QPS)

Frequently Asked Questions

Throughput, measured in Queries Per Second (QPS), is a fundamental metric for vector database performance, defining the system's capacity to handle concurrent similarity searches. This FAQ addresses common technical questions about optimizing, measuring, and scaling QPS in production environments.

Throughput, measured in Queries Per Second (QPS), is the maximum number of vector similarity search operations a database system can process per second while maintaining acceptable query latency. It quantifies the system's capacity for concurrent request handling under a defined load. High QPS is critical for applications like real-time recommendation engines, semantic search interfaces, and retrieval-augmented generation (RAG) systems that must serve many users simultaneously. Throughput is not an isolated metric; it exists in a direct trade-off with latency and recall. Increasing QPS often requires optimizations (e.g., reducing index search depth) that may increase latency or reduce result accuracy. System throughput is ultimately constrained by hardware resources—CPU cores, memory bandwidth, and network I/O—and the efficiency of the underlying approximate nearest neighbor (ANN) index.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.