-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build: Remove shadowing from benchmarks #32475
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,43 +2,50 @@ | |
|
||
1. Build `client-benchmark-noop-api-plugin` with `gradle :client:client-benchmark-noop-api-plugin:assemble` | ||
2. Install it on the target host with `bin/elasticsearch-plugin install file:///full/path/to/client-benchmark-noop-api-plugin.zip` | ||
3. Start Elasticsearch on the target host (ideally *not* on the same machine) | ||
4. Build an uberjar with `gradle :client:benchmark:shadowJar` and execute it. | ||
3. Start Elasticsearch on the target host (ideally *not* on the machine | ||
that runs the benchmarks) | ||
4. Run the benchmark with | ||
``` | ||
./gradlew -p client/benchmark run --args 'params go here' | ||
``` | ||
|
||
Repeat all steps above for the other benchmark candidate. | ||
See below for some example invocations. | ||
|
||
### Example benchmark | ||
|
||
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. | ||
|
||
#### Bulk indexing | ||
|
||
Download benchmark data from http://benchmarks.elastic.co/corpora/geonames/documents.json.bz2 and decompress them. | ||
Download benchmark data from http://benchmarks.elasticsearch.org.s3.amazonaws.com/corpora/geonames and decompress them. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this correct? I'm not sure we should link to specific s3 buckets, as those can and may change in the future. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I borrowed the link from rally-tracks. The old link was broken and I figured this was better. @danielmitterdorfer , do you know of a better link? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We either have that one or https://s3.amazonaws.com/benchmarks.elasticsearch.org/corpora/geonames/ because there is no reverse proxy in front of those buckets. |
||
|
||
Example command line parameters: | ||
Example invocation: | ||
|
||
``` | ||
rest bulk 192.168.2.2 ./documents.json geonames type 8647880 5000 | ||
wget http://benchmarks.elasticsearch.org.s3.amazonaws.com/corpora/geonames/documents-2.json.bz2 | ||
bzip2 -d documents-2.json.bz2 | ||
mv documents-2.json client/benchmark/build | ||
gradlew -p client/benchmark run --args 'rest bulk localhost build/documents-2.json geonames type 8647880 5000' | ||
``` | ||
|
||
The parameters are in order: | ||
The parameters are all in the `'`s and are in order: | ||
|
||
* Client type: Use either "rest" or "transport" | ||
* Benchmark type: Use either "bulk" or "search" | ||
* Benchmark target host IP (the host where Elasticsearch is running) | ||
* full path to the file that should be bulk indexed | ||
* name of the index | ||
* name of the (sole) type in the index | ||
* name of the (sole) type in the index | ||
* number of documents in the file | ||
* bulk size | ||
|
||
|
||
#### Bulk indexing | ||
#### Search | ||
|
||
Example command line parameters: | ||
Example invocation: | ||
|
||
``` | ||
rest search 192.168.2.2 geonames "{ \"query\": { \"match_phrase\": { \"name\": \"Sankt Georgen\" } } }\"" 500,1000,1100,1200 | ||
gradlew -p client/benchmark run --args 'rest search localhost geonames {"query":{"match_phrase":{"name":"Sankt Georgen"}}} 500,1000,1100,1200' | ||
``` | ||
|
||
The parameters are in order: | ||
|
@@ -49,5 +56,3 @@ The parameters are in order: | |
* name of the index | ||
* 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. | ||
* A comma-separated list of target throughput rates | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity I tried the following:
./gradlew -p benchmarks run --args '-lprof'
which should list all profilers that JMH supports.However, I only get:
If I run (on master):
I get the expected output:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes! I tried out a bunch of things and they seemed to work ok. Let me have a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've filed gradle/gradle#6140 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I've updated the READMEs with a workaround.