You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removes shadowing from the benchmarks. It isn't *strictly* needed. We do
have to rework the documentation on how to run the benchmark, but it
still seems to work if you run everything through gradle.
Copy file name to clipboardExpand all lines: benchmarks/README.md
+20-17Lines changed: 20 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,36 +4,39 @@ This directory contains the microbenchmark suite of Elasticsearch. It relies on
4
4
5
5
## Purpose
6
6
7
-
We do not want to microbenchmark everything but the kitchen sink and should typically rely on our
8
-
[macrobenchmarks](https://elasticsearch-benchmarks.elastic.co/app/kibana#/dashboard/Nightly-Benchmark-Overview) with
9
-
[Rally](https://github.com/elastic/rally). Microbenchmarks are intended to spot performance regressions in performance-critical components.
7
+
We do not want to microbenchmark everything but the kitchen sink and should typically rely on our
8
+
[macrobenchmarks](https://elasticsearch-benchmarks.elastic.co/app/kibana#/dashboard/Nightly-Benchmark-Overview) with
9
+
[Rally](https://github.com/elastic/rally). Microbenchmarks are intended to spot performance regressions in performance-critical components.
10
10
The microbenchmark suite is also handy for ad-hoc microbenchmarks but please remove them again before merging your PR.
11
11
12
12
## Getting Started
13
13
14
-
Just run `gradle :benchmarks:jmh` from the project root directory. It will build all microbenchmarks, execute them and print the result.
14
+
Just run `gradlew -p benchmarks run` from the project root
15
+
directory. It will build all microbenchmarks, execute them and print
16
+
the result.
15
17
16
18
## Running Microbenchmarks
17
19
18
-
Benchmarks are always run via Gradle with `gradle :benchmarks:jmh`.
19
-
20
-
Running via an IDE is not supported as the results are meaningless (we have no control over the JVM running the benchmarks).
20
+
Running via an IDE is not supported as the results are meaningless
21
+
because we have no control over the JVM running the benchmarks.
21
22
22
-
If you want to run a specific benchmark class, e.g. `org.elasticsearch.benchmark.MySampleBenchmark` or have special requirements
23
-
generate the uberjar with `gradle :benchmarks:jmhJar` and run it directly with:
23
+
If you want to run a specific benchmark class like, say,
Copy file name to clipboardExpand all lines: client/benchmark/README.md
+22-13Lines changed: 22 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,43 +2,54 @@
2
2
3
3
1. Build `client-benchmark-noop-api-plugin` with `gradle :client:client-benchmark-noop-api-plugin:assemble`
4
4
2. Install it on the target host with `bin/elasticsearch-plugin install file:///full/path/to/client-benchmark-noop-api-plugin.zip`
5
-
3. Start Elasticsearch on the target host (ideally *not* on the same machine)
6
-
4. Build an uberjar with `gradle :client:benchmark:shadowJar` and execute it.
5
+
3. Start Elasticsearch on the target host (ideally *not* on the machine
6
+
that runs the benchmarks)
7
+
4. Run the benchmark with
8
+
```
9
+
./gradlew -p client/benchmark run --args ' params go here'
10
+
```
7
11
8
-
Repeat all steps above for the other benchmark candidate.
12
+
Everything in the `'` gets sent on the command line to JMH. The leading ``
13
+
inside the `'`s is important. Without it parameters are sometimes sent to
14
+
gradle.
15
+
16
+
See below for some example invocations.
9
17
10
18
### Example benchmark
11
19
12
20
In general, you should define a few GC-related settings `-Xms8192M -Xmx8192M -XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCDetails` and keep an eye on GC activity. You can also define `-XX:+PrintCompilation` to see JIT activity.
13
21
14
22
#### Bulk indexing
15
23
16
-
Download benchmark data from http://benchmarks.elastic.co/corpora/geonames/documents.json.bz2 and decompress them.
24
+
Download benchmark data from http://benchmarks.elasticsearch.org.s3.amazonaws.com/corpora/geonames and decompress them.
17
25
18
-
Example command line parameters:
26
+
Example invocation:
19
27
20
28
```
21
-
rest bulk 192.168.2.2 ./documents.json geonames type 8647880 5000
* a search request body (remember to escape double quotes). The `TransportClientBenchmark` uses `QueryBuilders.wrapperQuery()` internally which automatically adds a root key `query`, so it must not be present in the command line parameter.
51
62
* A comma-separated list of target throughput rates
0 commit comments