Skip to content

VectorDB Modular Design#316

Open
CShorb wants to merge 2 commits intomlcommons:mainfrom
CShorb:main
Open

VectorDB Modular Design#316
CShorb wants to merge 2 commits intomlcommons:mainfrom
CShorb:main

Conversation

@CShorb
Copy link
Copy Markdown
Contributor

@CShorb CShorb commented Apr 6, 2026

VectorDB Modular Design

Adds a modular, backend-agnostic vector database benchmarking framework that measures load throughput, search QPS, recall@K, and latency percentiles (P50/P90/P99) across pluggable database backends.

Architecture

The framework introduces an abstract VectorDBBackend interface with a self-describing descriptor system and auto-discovery registry, enabling new backends to be added by simply dropping a sub-package into the backends/ directory with no other code changes required.

Included Backends

Three backend implementations are included out of the box:

  • Milvus (HNSW, DiskANN) — leverages native segment compaction
  • Elasticsearch (HNSW) — leverages bulk API
  • pgvector/PostgreSQL (HNSW, IVFFlat) — leverages GUC parameter tuning

Benchmark Pipeline

Uses a three-way producer-consumer architecture:

  1. A background thread generates L2-normalized vectors onto a bounded queue
  2. The main thread ingests batches into the database
  3. A parallel executor incrementally builds a brute-force ground-truth table in streaming fashion with capped memory usage

Configuration & CLI

  • YAML-driven configuration with layered precedence: CLI > environment > YAML > defaults
  • --what-if dry-run mode
  • --plan execution planning
  • Interactive collection administration tool for inspecting and managing collections across backends

Included Configs

Four ready-to-use benchmark configs (1M vectors, 1536 dimensions) are provided along with a .env.example template for connection credentials.

@CShorb CShorb requested a review from a team April 6, 2026 19:33
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

Comment thread vdb_benchmark/README.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add either requirements.txt or dependency update in storage/pyproject.toml for the new optional dependencies (elasticsearch, psycopg2-binary, pgvector, python-dotenv)? The existing pyproject.toml for now only lists pymilvus. This can be added as optional deps.

@russfellows
Copy link
Copy Markdown
Contributor

russfellows commented Apr 8, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants