Benchmark suite comparing VelesDB against pgvector (HNSW).
- Microbench numbers are host-specific and must be reported with CPU, OS, Rust toolchain, and feature flags.
- Internal SIMD, sparse, and
VelesQLcache measurements should be run with--features internal-bench. - Do not claim superiority over FAISS, Qdrant, SimSIMD, or other systems unless the dataset, recall target, hardware, and methodology are matched.
- For the latest controlled-host remediation run, see
benchmarks/results/2026-03-10-perf-remediation-report.md.
Legacy note: The table below was originally captured under v0.7.3 Docker benchmarks. For the latest controlled-host remediation run, see
benchmarks/results/2026-03-10-perf-remediation-report.md.
| Mode | ef_search | Recall@10 | Latency P50 |
|---|---|---|---|
| Fast | 64 | 34.2% | 59.3ms |
| Balanced | 128 | 48.8% | 60.9ms |
| Accurate | 256 | 67.6% | 78.3ms |
| HighRecall | 1024 | 96.1% ✅ | 73.0ms |
| Perfect | 2048 | 100.0% | 42.1ms |
Legacy comparison from v0.7.3 Docker benchmarks (2025). Hardware and methodology differ from current benchmarks. See DOCKER_BENCHMARK_RESULTS.md for details.
| Dataset | VelesDB | pgvector | Speedup |
|---|---|---|---|
| 10K | ~5s | ~19s | 3.8x |
| 100K | ~52s | ~365s | 7x |
- SIMD AVX-512/AVX2 - 32-wide processing with FMA
- Adaptive HNSW params -
HnswParams::for_dataset_size()for optimal recall - Parallel search - Batch parallel with prefetching
- Quantization - SQ8 (4x) and Binary (32x) compression
docker-compose up -d --build # Start both servers
python benchmark_docker.py --vectors 5000 --clusters 25| Database | Mode | What it measures |
|---|---|---|
| VelesDB | REST API (Docker) | Client-server via HTTP |
| pgvector | Docker + PostgreSQL | Client-server via SQL |
python benchmark_recall.py --vectors 10000| Database | Mode | What it measures |
|---|---|---|
| VelesDB | Native Python (PyO3) | Best-case embedded performance |
| pgvector | Docker + PostgreSQL | Client-server with SQL overhead |
# 1. Start both servers (Docker required)
docker-compose up -d --build
# 2. Install dependencies
pip install -r requirements.txt
# 3. Run fair Docker benchmark
python benchmark_docker.py --vectors 5000 --clusters 25# Both scripts support:
--vectors 5000 # Dataset size
--dim 768 # Vector dimension
--queries 100 # Number of queries
--clusters 25 # Data clusters (realistic)
# Docker benchmark only:
--velesdb-url http://localhost:8080Both databases are measured with total time including index construction:
- VelesDB: Insert + inline HNSW indexing
- pgvector: Raw INSERT + separate CREATE INDEX time
This ensures an apples-to-apples comparison of the complete ingestion pipeline.
Use these commands for host-local remediation runs:
cargo bench -p velesdb-core --features internal-bench --bench simd_benchmark -- 768 --noplot
cargo bench -p velesdb-core --features internal-bench --bench sparse_benchmark -- sparse_insert --noplot
cargo bench -p velesdb-core --features internal-bench --bench velesql_benchmark -- velesql_cache --noplotReport the exact host and toolchain alongside the measured values.
VelesDB uses adaptive parameters based on dataset size:
| Dataset Size | M | ef_construction | Target Recall |
|---|---|---|---|
| ≤10K | 32 | 400 | ≥98% |
| ≤100K | 64 | 800 | ≥95% |
| ≤500K | 96 | 1200 | ≥95% |
| ≤1M | 128 | 1600 | ≥95% |
// Automatic parameter selection
let params = HnswParams::for_dataset_size(768, 100_000);
// Or for 1M scale
let params = HnswParams::million_scale(768);| Use Case | Recommendation |
|---|---|
| Bulk import speed | VelesDB ✅ (3.2x faster) |
| Embedded/Desktop apps | VelesDB ✅ |
| Real-time (<10ms) | VelesDB ✅ |
| Edge/IoT/WASM | VelesDB ✅ |
| Existing PostgreSQL | pgvector ✅ |
| SQL ecosystem | pgvector ✅ |
MIT License