Skip to main content

Performance Testing and Analysis

This document presents the query and ingestion performance benchmark results of the Apache Doris vector index (ANN Index). All tests are performed with VectorDBBench, and the results help you:

  • Evaluate whether Doris vector retrieval meets your business requirements.
  • Understand the trade-offs among recall, query performance, and ingestion speed.
  • Reproduce the test results locally and verify production-environment behavior.

For benchmark results on larger datasets (10M / 100M scale) under single-node and distributed deployments, see Large-Scale Performance Benchmarks.

Test Environment

ItemConfiguration
Machine spec16C 64GB
CPU modelIntel(R) Xeon(R) Platinum 8369B CPU @ 2.70GHz
DeploymentFE and BE co-located on the same machine
Doris versionApache Doris 4.0.2
Test datasetVectorDBBench Performance768D1M (768-dimensional vectors, 1 million rows)
Note

Co-locating FE and BE is not the recommended production deployment. In production, deploy FE and BE on separate machines.

Test Results

performance

On the Performance768D1M dataset, Apache Doris reaches 989.1 QPS while maintaining above 97% recall, and its ingestion performance is significantly better than that of comparable systems.

Result Analysis

The "Performance Triangle" of Vector Databases

In vector search scenarios, a mature vector database that runs reliably in production typically has to trade off among the following three dimensions:

                    ┌──────────────────────┐
│ Recall │
│ (Higher is Better) │
└──────────▲───────────┘
/ \
/ \
/ \
/ \
/ \
/ \
┌───────────┘ └───────────┐
│ │
│ │
▼ ▼
┌──────────────────────┐ ┌────────────────────────┐
│ Query QPS │ │ Indexing │
│ (Latency / QPS) │ │ Throughput │
│ (Lower Latency Better)│ │ (Higher is Better) │
└──────────────────────┘ └────────────────────────┘
DimensionMetricDesired direction
RecallTop-K hit ratioHigher is better
Query QPS / LatencyQueries per second / per-query latencyHigher QPS, lower latency
Indexing ThroughputIndex build throughputHigher is better

These three are typically hard to maximize at the same time, so vector database design has to balance them.

Key HNSW Parameters and Trade-offs

Take HNSW (Hierarchical Navigable Small World), the most widely used vector index in the industry, as an example. It relies on a graph structure for search optimization and has three main tunable hyperparameters:

ParameterRoleImpact
max_degreeMaximum out-degree of each node in the graphDetermines graph density and overall connectivity
ef_constructionCandidate set size during index constructionA larger value produces a higher-quality graph
hnsw_ef_searchExploration window size during queryingDirectly affects recall and query latency

Typical tuning trade-offs:

  1. Increasing max_degree and ef_construction significantly improves graph connectivity and navigation efficiency, which leads to higher recall.
  2. A higher-quality graph allows hnsw_ef_search to be set smaller during queries, which reduces search cost and improves query performance.
  3. The cost is that index construction consumes more compute and memory, which lowers ingestion performance.

This is the typical "trilemma" that vector database design must face.

Apache Doris Optimization Approach

When designing vector search capabilities, Apache Doris aims to build a more balanced performance triangle by:

  • Optimizing the underlying execution engine.
  • Improving the storage format.
  • Engineering-level parallel acceleration of the HNSW build pipeline.

The result is that Doris significantly improves overall index ingestion speed without sacrificing index quality or high recall.

The benchmark results on the Performance768D1M dataset confirm this design goal:

  • With consistent index quality, Doris ingestion performance is significantly better than that of comparable systems.
  • Graph quality is not reduced in exchange for higher ingestion speed.
  • QPS reaches 989.1, recall stays above 97%, and the result is balanced across all three dimensions.

Reproduction Steps

Use the following command to reproduce the test locally:

NUM_PER_BATCH=500000 vectordbbench doris \
--host 127.0.0.1 \
--port 9030 \
--http-port 8030 \
--case-type Performance768D1M \
--db-name vdb \
--num-concurrency 80 \
--stream-load-rows-per-batch 500000 \
--index-prop max_degree=128,ef_construction=256 \
--session-var hnsw_ef_search=100

Key parameters:

ParameterMeaning
--case-typeSelects the test case (here, the 768D1M dataset)
--num-concurrencyQuery concurrency
--stream-load-rows-per-batchRows per batch for Stream Load
--index-propIndex build parameters (max_degree, ef_construction)
--session-varSession variables at query time (hnsw_ef_search)