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 SizeQuery Typep50 Latencyp95 Latencyp99 LatencyHardware
10,000 docsSingle Term BM251.8 ms4.6 ms7.2 ms1 vCPU / 256MB RAM
50,000 docsMulti-Term BM253.1 ms8.4 ms12.1 ms2 vCPU / 512MB RAM
100,000 docsFiltered Multi-Clause4.2 ms11.8 ms14.6 ms2 vCPU / 512MB RAM
250,000 docsBM25 + Anomaly Scoring7.8 ms18.2 ms24.5 ms4 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.