| 
 | 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 | +In a one-liner cli tool you can get this and much more:  | 
 | 6 | + | 
 | 7 | +```  | 
 | 8 | +docker run --rm --network=host redis/vector-db-benchmark:latest run.py --host localhost --engines vectorsets-fp32-default --datasets glove-100-angular --parallels 100  | 
 | 9 | +(...)  | 
 | 10 | +================================================================================  | 
 | 11 | +BENCHMARK RESULTS SUMMARY  | 
 | 12 | +Experiment: vectorsets-fp32-default - glove-100-angular  | 
 | 13 | +================================================================================  | 
 | 14 | +
  | 
 | 15 | +Precision vs Performance Trade-off:  | 
 | 16 | +--------------------------------------------------  | 
 | 17 | +Precision  QPS      P50 (ms)   P95 (ms)    | 
 | 18 | +--------------------------------------------------  | 
 | 19 | +0.86       1408.3   61.877     107.548     | 
 | 20 | +0.80       2136.3   38.722     69.102      | 
 | 21 | +0.72       2954.3   25.820     48.072      | 
 | 22 | +0.68       3566.5   20.229     38.581      | 
 | 23 | +
  | 
 | 24 | +QPS vs Precision Trade-off - vectorsets-fp32-default - glove-100-angular (up and to the right is better):  | 
 | 25 | +
  | 
 | 26 | +  3566 │●                                                             | 
 | 27 | +       │             ●                                                | 
 | 28 | +       │                                                              | 
 | 29 | +  2594 │                                                              | 
 | 30 | +       │                                       ●                      | 
 | 31 | +       │                                                              | 
 | 32 | +  1621 │                                                           ●  | 
 | 33 | +       │                                                              | 
 | 34 | +       │                                                              | 
 | 35 | +   648 │                                                              | 
 | 36 | +       │                                                              | 
 | 37 | +       │                                                              | 
 | 38 | +     0 │                                                              | 
 | 39 | +       └────────────────────────────────────────────────────────────  | 
 | 40 | +        0.680          0.726          0.772          0.817            | 
 | 41 | +        Precision (0.0 = 0%, 1.0 = 100%)  | 
 | 42 | +================================================================================  | 
 | 43 | +
  | 
 | 44 | +```  | 
 | 45 | + | 
 | 46 | +## Quick Start  | 
 | 47 | + | 
 | 48 | +```bash  | 
 | 49 | +# Pull the latest image  | 
 | 50 | +docker pull redis/vector-db-benchmark:latest  | 
 | 51 | + | 
 | 52 | +# Run with help  | 
 | 53 | +docker run --rm redis/vector-db-benchmark:latest run.py --help  | 
 | 54 | + | 
 | 55 | +# Check available datasets  | 
 | 56 | +docker run --rm redis/vector-db-benchmark:latest run.py --describe datasets  | 
 | 57 | + | 
 | 58 | +# Basic Redis benchmark (requires local Redis)  | 
 | 59 | +docker run --rm -v $(pwd)/results:/app/results --network=host \  | 
 | 60 | +  redis/vector-db-benchmark:latest \  | 
 | 61 | +  run.py --host localhost --engines redis-default-simple --dataset random-100  | 
 | 62 | +```  | 
 | 63 | + | 
 | 64 | +## Features  | 
 | 65 | + | 
 | 66 | +- **42+ Datasets**: Pre-configured datasets from 25 to 1B+ vectors  | 
 | 67 | +- **Multiple Engines**: Redis, Qdrant, Weaviate, Milvus, and more  | 
 | 68 | +- **Real-time Monitoring**: Live performance metrics during benchmarks  | 
 | 69 | +- **Precision Analysis**: Detailed accuracy vs performance trade-offs  | 
 | 70 | +- **Easy Discovery**: `--describe` commands for datasets and engines  | 
 | 71 | + | 
 | 72 | +## Available Tags  | 
 | 73 | + | 
 | 74 | +- `latest` - Latest development build from update.redisearch branch  | 
 | 75 | + | 
 | 76 | +## Redis quick start  | 
 | 77 | + | 
 | 78 | +### Redis 8.2 with RediSearch  | 
 | 79 | +```bash  | 
 | 80 | +# Start Redis 8.2 with built-in vector support  | 
 | 81 | +docker run -d --name redis-test -p 6379:6379 redis:8.2-rc1-bookworm  | 
 | 82 | + | 
 | 83 | +# Run benchmark  | 
 | 84 | +docker run --rm -v $(pwd)/results:/app/results --network=host \  | 
 | 85 | +  redis/vector-db-benchmark:latest \  | 
 | 86 | +  run.py --host localhost --engines redis-default-simple --dataset glove-25-angular  | 
 | 87 | +```  | 
 | 88 | + | 
 | 89 | + | 
 | 90 | +## Common Usage Patterns  | 
 | 91 | + | 
 | 92 | +### Explore Available Options  | 
 | 93 | +```bash  | 
 | 94 | +# List all datasets  | 
 | 95 | +docker run --rm redis/vector-db-benchmark:latest run.py --describe datasets  | 
 | 96 | + | 
 | 97 | +# List all engines  | 
 | 98 | +docker run --rm redis/vector-db-benchmark:latest run.py --describe engines  | 
 | 99 | +```  | 
 | 100 | + | 
 | 101 | +### Run Benchmarks  | 
 | 102 | +```bash  | 
 | 103 | +# Quick test with small dataset  | 
 | 104 | +docker run --rm -v $(pwd)/results:/app/results --network=host \  | 
 | 105 | +  redis/vector-db-benchmark:latest \  | 
 | 106 | +  run.py --host localhost --engines redis-default-simple --dataset random-100  | 
 | 107 | + | 
 | 108 | +# Comprehensive benchmark with multiple configurations  | 
 | 109 | +docker run --rm -v $(pwd)/results:/app/results --network=host \  | 
 | 110 | +  redis/vector-db-benchmark:latest \  | 
 | 111 | +  run.py --host localhost --engines "*redis*" --dataset glove-25-angular  | 
 | 112 | + | 
 | 113 | +# With Redis authentication  | 
 | 114 | +docker run --rm -v $(pwd)/results:/app/results --network=host \  | 
 | 115 | +  -e REDIS_AUTH=mypassword -e REDIS_USER=myuser \  | 
 | 116 | +  redis/vector-db-benchmark:latest \  | 
 | 117 | +  run.py --host localhost --engines redis-default-simple --dataset random-100  | 
 | 118 | +```  | 
 | 119 | + | 
 | 120 | +### Results Analysis  | 
 | 121 | +```bash  | 
 | 122 | +# View precision summary  | 
 | 123 | +jq '.precision_summary' results/*-summary.json  | 
 | 124 | + | 
 | 125 | +# View detailed results  | 
 | 126 | +jq '.search' results/*-summary.json  | 
 | 127 | +```  | 
 | 128 | + | 
 | 129 | +## Volume Mounts  | 
 | 130 | + | 
 | 131 | +- `/app/results` - Benchmark results (JSON files)  | 
 | 132 | +- `/app/datasets` - Dataset storage (optional, auto-downloaded)  | 
 | 133 | + | 
 | 134 | +## Environment Variables  | 
 | 135 | + | 
 | 136 | +- `REDIS_HOST` - Redis server hostname (default: localhost)  | 
 | 137 | +- `REDIS_PORT` - Redis server port (default: 6379)  | 
 | 138 | +- `REDIS_AUTH` - Redis password (default: None)  | 
 | 139 | +- `REDIS_USER` - Redis username (default: None)  | 
 | 140 | +- `REDIS_CLUSTER` - Enable Redis cluster mode (default: 0)  | 
 | 141 | + | 
 | 142 | +## Performance Tips  | 
 | 143 | + | 
 | 144 | +1. **Use `--network=host`** for best performance with local Redis  | 
 | 145 | +2. **Mount results volume** to persist benchmark data  | 
 | 146 | +3. **Start with small datasets** (random-100, glove-25-angular) for testing  | 
 | 147 | +4. **Use wildcard patterns** to test multiple configurations: `--engines "*-m-16-*"`  | 
 | 148 | + | 
 | 149 | +## Example Output  | 
 | 150 | + | 
 | 151 | +```json  | 
 | 152 | +{  | 
 | 153 | +  "precision_summary": {  | 
 | 154 | +    "0.91": {  | 
 | 155 | +      "qps": 1924.5,  | 
 | 156 | +      "p50": 49.828,  | 
 | 157 | +      "p95": 58.427  | 
 | 158 | +    },  | 
 | 159 | +    "0.94": {  | 
 | 160 | +      "qps": 1819.9,  | 
 | 161 | +      "p50": 51.68,  | 
 | 162 | +      "p95": 66.83  | 
 | 163 | +    }  | 
 | 164 | +  }  | 
 | 165 | +}  | 
 | 166 | +```  | 
 | 167 | + | 
 | 168 | +## Support  | 
 | 169 | + | 
 | 170 | +- **GitHub**: [redis-performance/vector-db-benchmark](https://github.com/redis-performance/vector-db-benchmark)  | 
 | 171 | +- **Issues**: Report bugs and feature requests on GitHub  | 
 | 172 | +- **Documentation**: Full documentation available in the repository  | 
 | 173 | + | 
 | 174 | +## License  | 
 | 175 | + | 
 | 176 | +This project is licensed under the MIT License - see the repository for details.  | 
0 commit comments