OpenSearch/client/benchmark
Michael Basnight cfd14cd2b8 Revert shading for the low level rest client (#26367)
At current, we do not feel there is enough of a reason to shade the low
level rest client. It caused problems with commons logging and IDE's
during the brief time it was used. We did not know exactly how many
users will need this, and decided that leaving shading out until we
gather more information is best. Users can still shade the jar
themselves. For information and feeback, see issue #26366.

Closes #26328

This reverts commit 3a20922046.
This reverts commit 2c271f0f22.
This reverts commit 9d10dbea39.
This reverts commit e816ef89a2.
2017-08-25 14:13:12 -05:00
..
src/main Revert shading for the low level rest client (#26367) 2017-08-25 14:13:12 -05:00
README.md Add client-benchmark-noop-api-plugin to stress clients even more in benchmarks (#20103) 2016-08-26 09:05:47 +02:00
build.gradle Rename client artifacts (#25693) 2017-07-13 09:44:25 +02:00

README.md

Steps to execute the benchmark

  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.

Repeat all steps above for the other benchmark candidate.

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.

Example command line parameters:

rest bulk 192.168.2.2 ./documents.json geonames type 8647880 5000

The parameters 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
  • number of documents in the file
  • bulk size

Bulk indexing

Example command line parameters:

rest search 192.168.2.2 geonames "{ \"query\": { \"match_phrase\": { \"name\": \"Sankt Georgen\" } } }\"" 500,1000,1100,1200

The parameters 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)
  • 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