redis/vector-db-benchmark

Verified Publisher

By Redis

Updated about 1 hour ago

Framework for benchmarking vector search engines.

Image
1

4.4K

redis/vector-db-benchmark repository overview

vector-db-benchmark

A Rust-based benchmarking tool for vector databases. Measures upload throughput, search QPS, latency percentiles, and recall for various vector search engines.

Supported Engines

EngineClient LibraryProtocol
Redis (RediSearch)redis 0.27Redis protocol
VectorSetsredis 0.27Redis protocol
Elasticsearchelasticsearch 8.15HTTP/REST
OpenSearchopensearch 2.3HTTP/REST
Qdrantqdrant-client 1.17gRPC
PgVectorpostgres 0.19 + pgvector 0.4PostgreSQL
Weaviatetonic 0.12 / prost 0.13 (gRPC) + reqwest (REST)gRPC (search) + HTTP/REST (schema)
Milvusreqwest (REST API v2)HTTP/REST
MongoDB (Atlas Search)mongodb 3 (sync)MongoDB protocol
Valkey (Valkey Search)redis 0.27RESP protocol
Turbopufferturbopuffer-client 0.0.4HTTP/REST (cloud)

Quick Start

# Show help
docker run --rm redis/vector-db-benchmark --help

# List available datasets
docker run --rm redis/vector-db-benchmark --describe datasets

# List available engine configurations
docker run --rm redis/vector-db-benchmark --describe engines

Running a Benchmark

# Start Redis
docker run -d --name redis -p 6379:6379 redis:8.8.0

# Run benchmark against localhost Redis
docker run --rm --network host \
  -v $(pwd)/datasets:/code/datasets \
  -v $(pwd)/results:/code/results \
  redis/vector-db-benchmark \
  --host localhost --engines 'redis*' --datasets 'glove-25-angular'

CLI Options

FlagDescriptionDefault
--engines <PATTERN>Engine patterns to run (supports wildcards)*
--datasets <PATTERN>Dataset patterns to run (supports wildcards)*
--host <HOST>Redis / engine hostlocalhost
--skip-uploadSkip the upload phase
--skip-searchSkip the search phase
--skip-if-existsSkip if results already exist
--parallels <N,N,...>Filter by parallel thread counts
--ef-runtime <N,N,...>Filter by ef runtime values
--update-search-ratio <U:S>Mixed benchmark: interleave U updates per S searches
--describe <TYPE>Describe datasets or engines
-v, --verboseVerbose output for --describe
--exit-on-errorStop on first error
--timeout <SECS>Timeout in seconds86400

Interleave vector updates with searches to measure write impact on search performance:

# 1 update per 10 searches against Redis
docker run --rm --network host \
  -v $(pwd)/datasets:/code/datasets \
  -v $(pwd)/results:/code/results \
  redis/vector-db-benchmark \
  --host localhost --engines redis-docker-test --datasets random-100 \
  --update-search-ratio 1:10

The ratio format is U:S (e.g., 1:10 = 1 update per 10 searches per cycle). Supported engines: Redis, VectorSets, Valkey. Results include separate search and update metrics (RPS, latencies). Omitting the flag runs standard search-only benchmarks.

Volume Mounts

Container PathPurpose
/code/datasetsDataset files (HDF5, NPY, JSONL)
/code/resultsBenchmark result JSON files

The image includes the random-100 dataset (228KB) for quick smoke tests. For larger datasets, mount your local datasets/ directory.

Docker Compose Example

services:
  redis:
    image: redis:8.8.0
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 1s
      timeout: 3s
      retries: 10

  benchmark:
    image: redis/vector-db-benchmark:latest
    depends_on:
      redis:
        condition: service_healthy
    volumes:
      - ./datasets:/code/datasets
      - ./results:/code/results
    command:
      - "--engines"
      - "redis*"
      - "--datasets"
      - "glove-25-angular"
      - "--host"
      - "redis"

Source Code

github.com/RedisLabs/vector-db-benchmark

Tag summary

Content type

Image

Digest

sha256:c22bac71b

Size

43.9 MB

Last updated

about 1 hour ago

docker pull redis/vector-db-benchmark

This week's pulls

Pulls:

659

Last week