Stretchy benchmarks: BM25 query latency
On an index of 100,000 enterprise records running on a 2-vCPU node, Stretchy achieved median (p50) query latency of 4.2ms and p95 latency of 11.8ms under concurrent multi-user load.
Results
| Index Size | Query Type | p50 Latency | p95 Latency | p99 Latency | Hardware |
|---|---|---|---|---|---|
| 10,000 docs | Single Term BM25 | 1.8 ms | 4.6 ms | 7.2 ms | 1 vCPU / 256MB RAM |
| 50,000 docs | Multi-Term BM25 | 3.1 ms | 8.4 ms | 12.1 ms | 2 vCPU / 512MB RAM |
| 100,000 docs | Filtered Multi-Clause | 4.2 ms | 11.8 ms | 14.6 ms | 2 vCPU / 512MB RAM |
| 250,000 docs | BM25 + Anomaly Scoring | 7.8 ms | 18.2 ms | 24.5 ms | 4 vCPU / 1GB RAM |
Test setup
• Node Environment: Ubuntu 22.04 LTS, 2 vCPU Intel Xeon / AMD EPYC, 4GB RAM allocation (Stretchy capped at 256MB JVM heap).
• Dataset: 100,000 realistic enterprise telemetry and document records (average 1.4KB per document).
• Concurrency: 50 concurrent virtual threads executing randomized multi-token BM25 queries with a 90% warm index cache.
Compared with
Against Elasticsearch 8.x deployed on the same virtual hardware, Stretchy delivered identical BM25 relevance ordering while reducing RAM consumption by over 80% and eliminating cluster garbage collection pauses.
Reproduce it yourself
The load-testing harness and query scripts are provided in the stretchy-client GitHub repository.