To be eligible to run benchmarks nodes must be started with: `--node.bench true`. This is just a way to mark certain nodes as "executors". Searches will still be distributed out to the cluster in the normal manner. This is primarily a defensive measure to prevent production nodes from being flooded with potentially many requests. Typically one would start a single node with this setting and submit benchmark requests to it.
A 'competitor' defines one or more search requests to execute along with parameters that describe how the search(es) should be run.
Multiple competitors may be submitted as a group in which case they will execute one after the other. This makes it easy to compare various
competing alternatives side-by-side.
There are several parameters which may be set at the competition level:
[horizontal]
`name`:: Unique name for the competition
`iterations`:: Number of times to run the competitors
`concurrency`:: Within each iteration use this level of parallelism
`multiplier`:: Within each iteration run the query this many times
`warmup`:: Perform warmup of query
`num_slowest`:: Record N slowest queries
`search_type`:: Type of search, e.g. "query_then_fetch", "dfs_query_then_fetch", "count"
`requests`:: Query DSL describing search requests
`clear_caches`:: Whether caches should be cleared on each iteration, and if so, how
`indices`:: Array of indices (and optional types) to search, e.g. ["my_index_1/my_type_1", "my_index_2", "my_index_3/my_type_3"]
Cache clearing parameters:
[horizontal]
`clear_caches`:: Set to 'false' to disable cache clearing completely
`clear_caches.filter`:: Whether to clear the filter cache
`clear_caches.field_data`:: Whether to clear the field data cache
`clear_caches.id`:: Whether to clear the id cache
`clear_caches.recycler`:: Whether to clear the recycler cache
`clear_caches.fields`:: Array of fields to clear
`clear_caches.filter_keys`:: Array of filter keys to clear
Global parameters:
[horizontal]
`name`:: Unique name for the benchmark
`num_executor_nodes`:: Number of cluster nodes from which to submit and time benchmarks. Allows user to run a benchmark simultaneously on one or more nodes and compare timings. Note that this does not control how many nodes a search request will actually execute on. Defaults to: 1.
`percentiles`:: Array of percentile values to report. Defaults to: [10, 25, 50, 75, 90, 99]
Additionally, the following competition-level parameters may be set globally: iteration, concurrency, multiplier, warmup, and clear_caches.
Using these parameters it is possible to describe precisely how to execute a benchmark under various conditions. In the following example we run a filtered query against two different indices using two different search types.
In some cases it may be desirable to view the progress of a long-running benchmark and optionally terminate it early. To view all active benchmarks use: