|
| 1 | +# Redis Vector Database Benchmark |
| 2 | + |
| 3 | +A comprehensive benchmarking tool for vector databases, including Redis (both RediSearch and Vector Sets), Weaviate, Milvus, Qdrant, OpenSearch, Postgres, and others... |
| 4 | + |
| 5 | +## Quick Start |
| 6 | + |
| 7 | +```bash |
| 8 | +# Pull the latest image |
| 9 | +docker pull redis/vector-db-benchmark:latest |
| 10 | + |
| 11 | +# Run with help |
| 12 | +docker run --rm redis/vector-db-benchmark:latest run.py --help |
| 13 | + |
| 14 | +# Check available datasets |
| 15 | +docker run --rm redis/vector-db-benchmark:latest run.py --describe datasets |
| 16 | + |
| 17 | +# Basic Redis benchmark (requires local Redis) |
| 18 | +docker run --rm -v $(pwd)/results:/app/results --network=host \ |
| 19 | + redis/vector-db-benchmark:latest \ |
| 20 | + run.py --host localhost --engines redis-default-simple --dataset random-100 |
| 21 | +``` |
| 22 | + |
| 23 | +## Features |
| 24 | + |
| 25 | +- **42+ Datasets**: Pre-configured datasets from 25 to 1B+ vectors |
| 26 | +- **Multiple Engines**: Redis, Qdrant, Weaviate, Milvus, and more |
| 27 | +- **Real-time Monitoring**: Live performance metrics during benchmarks |
| 28 | +- **Precision Analysis**: Detailed accuracy vs performance trade-offs |
| 29 | +- **Easy Discovery**: `--describe` commands for datasets and engines |
| 30 | + |
| 31 | +## Available Tags |
| 32 | + |
| 33 | +- `latest` - Latest development build from update.redisearch branch |
| 34 | + |
| 35 | +## Redis quick start |
| 36 | + |
| 37 | +### Redis 8.2 with RediSearch |
| 38 | +```bash |
| 39 | +# Start Redis 8.2 with built-in vector support |
| 40 | +docker run -d --name redis-test -p 6379:6379 redis:8.2-rc1-bookworm |
| 41 | + |
| 42 | +# Run benchmark |
| 43 | +docker run --rm -v $(pwd)/results:/app/results --network=host \ |
| 44 | + redis/vector-db-benchmark:latest \ |
| 45 | + run.py --host localhost --engines redis-default-simple --dataset glove-25-angular |
| 46 | +``` |
| 47 | + |
| 48 | + |
| 49 | +## Common Usage Patterns |
| 50 | + |
| 51 | +### Explore Available Options |
| 52 | +```bash |
| 53 | +# List all datasets |
| 54 | +docker run --rm redis/vector-db-benchmark:latest run.py --describe datasets |
| 55 | + |
| 56 | +# List all engines |
| 57 | +docker run --rm redis/vector-db-benchmark:latest run.py --describe engines |
| 58 | +``` |
| 59 | + |
| 60 | +### Run Benchmarks |
| 61 | +```bash |
| 62 | +# Quick test with small dataset |
| 63 | +docker run --rm -v $(pwd)/results:/app/results --network=host \ |
| 64 | + redis/vector-db-benchmark:latest \ |
| 65 | + run.py --host localhost --engines redis-default-simple --dataset random-100 |
| 66 | + |
| 67 | +# Comprehensive benchmark with multiple configurations |
| 68 | +docker run --rm -v $(pwd)/results:/app/results --network=host \ |
| 69 | + redis/vector-db-benchmark:latest \ |
| 70 | + run.py --host localhost --engines "*redis*" --dataset glove-25-angular |
| 71 | + |
| 72 | +# With Redis authentication |
| 73 | +docker run --rm -v $(pwd)/results:/app/results --network=host \ |
| 74 | + -e REDIS_AUTH=mypassword -e REDIS_USER=myuser \ |
| 75 | + redis/vector-db-benchmark:latest \ |
| 76 | + run.py --host localhost --engines redis-default-simple --dataset random-100 |
| 77 | +``` |
| 78 | + |
| 79 | +### Results Analysis |
| 80 | +```bash |
| 81 | +# View precision summary |
| 82 | +jq '.precision_summary' results/*-summary.json |
| 83 | + |
| 84 | +# View detailed results |
| 85 | +jq '.search' results/*-summary.json |
| 86 | +``` |
| 87 | + |
| 88 | +## Volume Mounts |
| 89 | + |
| 90 | +- `/app/results` - Benchmark results (JSON files) |
| 91 | +- `/app/datasets` - Dataset storage (optional, auto-downloaded) |
| 92 | + |
| 93 | +## Environment Variables |
| 94 | + |
| 95 | +- `REDIS_HOST` - Redis server hostname (default: localhost) |
| 96 | +- `REDIS_PORT` - Redis server port (default: 6379) |
| 97 | +- `REDIS_AUTH` - Redis password (default: None) |
| 98 | +- `REDIS_USER` - Redis username (default: None) |
| 99 | +- `REDIS_CLUSTER` - Enable Redis cluster mode (default: 0) |
| 100 | + |
| 101 | +## Performance Tips |
| 102 | + |
| 103 | +1. **Use `--network=host`** for best performance with local Redis |
| 104 | +2. **Mount results volume** to persist benchmark data |
| 105 | +3. **Start with small datasets** (random-100, glove-25-angular) for testing |
| 106 | +4. **Use wildcard patterns** to test multiple configurations: `--engines "*-m-16-*"` |
| 107 | + |
| 108 | +## Example Output |
| 109 | + |
| 110 | +```json |
| 111 | +{ |
| 112 | + "precision_summary": { |
| 113 | + "0.91": { |
| 114 | + "qps": 1924.5, |
| 115 | + "p50": 49.828, |
| 116 | + "p95": 58.427 |
| 117 | + }, |
| 118 | + "0.94": { |
| 119 | + "qps": 1819.9, |
| 120 | + "p50": 51.68, |
| 121 | + "p95": 66.83 |
| 122 | + } |
| 123 | + } |
| 124 | +} |
| 125 | +``` |
| 126 | + |
| 127 | +## Support |
| 128 | + |
| 129 | +- **GitHub**: [redis-performance/vector-db-benchmark](https://github.com/redis-performance/vector-db-benchmark) |
| 130 | +- **Issues**: Report bugs and feature requests on GitHub |
| 131 | +- **Documentation**: Full documentation available in the repository |
| 132 | + |
| 133 | +## License |
| 134 | + |
| 135 | +This project is licensed under the MIT License - see the repository for details. |
0 commit comments