Configuring OpenSearch Benchmark
OpenSearch Benchmark configuration data is stored in
~/.benchmark/benchmark.ini, which is automatically created the first time OpenSearch Benchmark runs.
The file is separated into the following sections, which you can customize based on the needs of your cluster.
This section contains meta information about the configuration file.
| ||Integer||The version of the configuration file format. This property is managed by OpenSearch Benchmark and should not be changed.|
This section contains global information for the current benchmark environment. This information should be identical on all machines on which OpenSearch Benchmark is installed.
| ||String||The name of the benchmark environment used as metadata in metrics documents when an OpenSearch metrics store is configured. Only alphanumeric characters are allowed. Default is |
| ||Integer||Determines the number of available CPU cores. OpenSearch Benchmark aims to create one asyncio event loop per core and distributes it to clients evenly across event loops. Defaults to the number of logical CPU cores for your cluster.|
| ||Boolean||Enables debug mode on OpenSearch Benchmark’s asyncio event loop. Default is |
| ||String||A comma-separated list of environment variable names that should be passed to OpenSearch for processing.|
This section contains node-specific information that can be customized according to the needs of your cluster.
| ||String||The directory that stores all OpenSearch Benchmark data. OpenSearch Benchmark assumes control over this directory and all its subdirectories.|
| ||String||The directory from which the OpenSearch source code and any OpenSearch plugins are called. Only relevant for benchmarks from sources.|
This section contains more details about the OpenSearch source tree.
| ||URL||The URL from which to check out OpenSearch. Default is |
| ||String||The local path relative to the |
| ||Boolean||Enables OpenSearch’s internal source artifact cache, |
| ||Integer||The number of days that an artifact should be kept in the source artifact cache. Default is |
This section contains the settings that can be customized in the OpenSearch Benchmark data directory.
| ||String||The directory in which benchmark datasets are stored. Depending on the benchmarks that are run, this directory may contain hundreds of GB of data. Default path is |
This section defines how benchmark metrics are stored.
| ||String||If set to |
| ||Function||The number of metrics samples that can be stored in OpenSearch Benchmark’s in-memory queue. Default is |
|metrics.request.downsample.factor||Integer||(default: 1): Determines how many service time and latency samples are saved in the metrics store. By default, all values are saved. If you want to, for example. keep only every 100th sample, specify |
| ||Boolean||If set to |
datastore.type is set to
opensearch, the following reporting settings can be customized.
| ||IP address||The hostname of the metrics store, for example, |
|datastore.port||Port||The port number of the metrics store, for example, |
| ||Boolean||If set to |
| ||String||When set to the default |
| ||String||Determines the local file system path to the certificate authority’s signing certificate.|
| ||Username||Sets the username for the metrics store|
| ||String||Sets the password for the metrics store. Alternatively, this password can be configured using the |
| ||String||Enables automatic detection of the metrics store’s version. Default is |
| ||Integer||The number of primary shards that the |
| ||Integer||The number of replicas each primary shard in the datastore contains. Any updates to this setting after initial index creation will only be applied to new |
You can use the following examples to set reporting values in your cluster.
This example defines an unprotected metrics store in the local network:
[results_publishing] datastore.type = opensearch datastore.host = 192.168.10.17 datastore.port = 9200 datastore.secure = false datastore.user = datastore.password =
This example defines a secure connection to a metrics store in the local network with a self-signed certificate:
[results_publishing] datastore.type = opensearch datastore.host = 192.168.10.22 datastore.port = 9200 datastore.secure = true datastore.ssl.verification_mode = none datastore.user = user-name datastore.password = the-password-to-your-cluster
This section defines how workloads are retrieved. All keys are read by OpenSearch using the syntax
<<workload-repository-name>>.url, which you can select using the OpenSearch Benchmark CLI
--workload-repository=workload-repository-name" option. By default, OpenSearch chooses the workload repository using the
This section defines the default values of certain OpenSearch Benchmark CLI parameters.
| ||Boolean||Determines whether OpenSearch installations are preserved or wiped by default after a benchmark. To preserve an installation for a single benchmark, use the command line flag |
This section defines how OpenSearch versions are distributed.
| ||Boolean||Determines whether newly released OpenSearch versions should be cached locally.|
OpenSearch automatically downloads all the necessary proxy data for you, including:
- OpenSearch distributions, when you specify
- OpenSearch source code, when you specify a Git revision number, for example,
- Any metadata tracked from the OpenSearch GitHub repository.
As of OpenSearch Benchmark 0.5.0, only
http_proxy is supported.
You can use an
http_proxy to connect OpenSearch Benchmark to a specific proxy and connect the proxy to a benchmark workload. To add the proxy:
Add your proxy URL to your shell profile:
Source your shell profile and verify that the proxy URL is set correctly:
source ~/.bash_profile ; echo $http_proxy
Configure Git to connect to your proxy by using the following command. For more information, see the Git documentation.
git config --global http_proxy $http_proxy
git cloneto clone the workloads repository by using the following command. If the proxy configured correctly, the clone is successful.
git clone http://github.com/opensearch-project/opensearch-benchmark-workloads.git
Lastly, verify that OpenSearch Benchmark can connect to the proxy server by checking the
/.benchmark/logs/benchmark.loglog. When OpenSearch Benchmark starts, you should see the following at the top of the log:
Connecting via proxy URL [http://proxy.proxy.org:4444/] to the Internet (picked up from the environment variable [http_proxy]).
Logs from OpenSearch Benchmark can be configured in the
~/.benchmark/logging.json file. For more information about how to format the log file, see the following Python documentation:
- For general tips and tricks, use the Python Logging Cookbook.
- For the file format, see the Python logging configuration schema.
- For instructions on how to customize where the log output is written, see the logging handlers documentation.
By default, OpenSearch Benchmark logs all output to