Skip to content

Commit 002336d

Browse files
authored
docs(benchmarks): improve benchmarking quickstart for users (kroxylicious#3811)
* docs(benchmarks): improve quickstart for upstream users - Clarify that jbang and mvn are only needed for compare-results.sh, not for running benchmarks - Add --cluster-overrides section with example for non-default storage classes and cluster-specific settings - Add encryption to the available scenarios list - Add 1topic-10kb and 1topic-100kb to available workloads list - Add rate sweep section showing how to find the throughput ceiling - Add troubleshooting entry for compare-results.sh mvn prerequisite Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk> * docs(benchmarks): fix jbang/mvn prerequisites scope jbang and mvn process-sources are required for all benchmark scripts, not just compare-results.sh. run-benchmark.sh uses CollectResults via jbang, check-backpressure.sh, check-significance.sh, and collect-results.sh all require the generated sources too. Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk> * docs(benchmarks): restore gh CLI prerequisite gh is used by setup-cluster.sh to download the Kroxylicious operator release and was accidentally dropped in the previous commit. Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk> * docs(benchmarks): remove 10kb/100kb workloads from quickstart These workloads are not yet on main — they live on feat/omb-hit-it-harder and will be added to the quickstart as part of that PR. Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk> * docs(benchmarks): expand mvn process-sources troubleshooting entry Add context explaining why the step is needed (JBang tools generated from annotated Maven sources) and show the actual error message so users can recognise it. Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk> --------- Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
1 parent fd6ae60 commit 002336d

1 file changed

Lines changed: 74 additions & 6 deletions

File tree

kroxylicious-openmessaging-benchmarks/QUICKSTART.md

Lines changed: 74 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ then run the benchmark suite.
1010
- Full benchmark run: 8 CPU cores, 16 GB RAM across the cluster (3 brokers + 3 OMB workers)
1111
- `kubectl` configured to access the cluster
1212
- `helm` 3.0+
13-
- `gh` (GitHub CLI) — for downloading the Kroxylicious operator release
14-
- `jbang` — for result comparison scripts ([install](https://www.jbang.dev/download/))
15-
- `mvn` — for generating JBang source filters
13+
- `gh` (GitHub CLI) — used by `setup-cluster.sh` to download the Kroxylicious operator release
14+
- `jbang` — used by the benchmark and result analysis scripts ([install](https://www.jbang.dev/download/))
15+
- `mvn` — run once before using any benchmark scripts to generate JBang source filters:
16+
```bash
17+
mvn process-sources -pl kroxylicious-openmessaging-benchmarks
18+
```
1619

1720
### Start a local cluster (if needed)
1821

@@ -68,14 +71,37 @@ To run one scenario and workload manually:
6871
```bash
6972
./scripts/run-benchmark.sh baseline 1topic-1kb ./results/baseline/
7073
./scripts/run-benchmark.sh proxy-no-filters 1topic-1kb ./results/proxy/
74+
./scripts/run-benchmark.sh encryption 1topic-1kb ./results/encryption/
7175

72-
# Compare afterwards
73-
./scripts/compare-results.sh ./results/baseline/*.json ./results/proxy/*.json
76+
# Compare afterwards (requires mvn process-sources to have been run once)
77+
./scripts/compare-results.sh ./results/baseline/result.json ./results/proxy/result.json
7478
```
7579

76-
Available scenarios: `baseline`, `proxy-no-filters`
80+
Available scenarios: `baseline`, `proxy-no-filters`, `encryption`
81+
7782
Available workloads: `1topic-1kb`, `10topics-1kb`, `100topics-1kb`
7883

84+
### Cluster-specific settings
85+
86+
If your cluster requires non-default storage classes, image pull secrets, or resource limits,
87+
create a cluster overrides file and pass it with `--cluster-overrides`:
88+
89+
```bash
90+
# cluster-overrides.yaml example
91+
kafka:
92+
storage:
93+
storageClass: my-storage-class
94+
```
95+
96+
```bash
97+
./scripts/run-benchmark.sh \
98+
--cluster-overrides ./cluster-overrides.yaml \
99+
baseline 1topic-1kb ./results/baseline/
100+
```
101+
102+
The `--cluster-overrides` file is applied last, so it always wins over scenario and profile
103+
defaults. Pass it to both `run-benchmark.sh` and `rate-sweep.sh`.
104+
79105
### Quick validation (smoke profile)
80106

81107
The smoke profile uses 1 broker, 2 workers, and a 1-minute test — not suitable for
@@ -88,6 +114,33 @@ It fits comfortably within a 16 GB single-node cluster (minikube/kind).
88114
baseline 1topic-1kb ./results/smoke/
89115
```
90116

117+
### Finding the saturation point (rate sweep)
118+
119+
To find the throughput ceiling for a scenario, use `rate-sweep.sh`. It deploys infrastructure
120+
once, then probes at increasing rates until the achieved throughput drops below the target,
121+
indicating saturation.
122+
123+
```bash
124+
./scripts/rate-sweep.sh \
125+
--scenarios baseline,encryption \
126+
--min-rate 10000 \
127+
--max-rate 60000 \
128+
--step-percent 10 \
129+
--output-dir ./results/sweep-$(date +%Y%m%d-%H%M%S)/
130+
```
131+
132+
This prints a summary table at the end showing achieved rate and p99 latency at each probe,
133+
with saturation flagged where applicable. Use `--dry-run` to preview the rate sequence
134+
without deploying anything:
135+
136+
```bash
137+
./scripts/rate-sweep.sh \
138+
--scenarios encryption \
139+
--min-rate 30000 --max-rate 50000 --step-percent 5 \
140+
--output-dir /tmp/preview/ \
141+
--dry-run
142+
```
143+
91144
## Interpreting Results
92145

93146
`compare-results.sh` outputs a table with three sections:
@@ -145,3 +198,18 @@ kubectl get configmap omb-driver-baseline -n kafka \
145198
# baseline: bootstrap.servers=kafka-kafka-bootstrap:9092
146199
# proxy scenario: bootstrap.servers=kafka-cluster-ip-bootstrap:9292
147200
```
201+
202+
**Scripts fail with "run mvn process-sources first"**
203+
204+
The benchmark scripts use JBang to run Java-based result analysis tools. These tools are
205+
generated from annotated source files during the Maven build. If you see an error like:
206+
207+
```
208+
Error: run 'mvn process-sources -pl kroxylicious-openmessaging-benchmarks' first to generate filtered sources
209+
```
210+
211+
Run the following once from the repository root before using the scripts:
212+
213+
```bash
214+
mvn process-sources -pl kroxylicious-openmessaging-benchmarks
215+
```

0 commit comments

Comments
 (0)