Skip to content

Commit 2ec087c

Browse files
Naarcha-AWSkolchfa-awsnatebower
authored
Workload and client options draft (opensearch-project#10208)
* Workload and client options draft Signed-off-by: Archer <[email protected]> * Apply suggestions from code review Signed-off-by: kolchfa-aws <[email protected]> * Apply suggestions from code review Signed-off-by: Nathan Bower <[email protected]> --------- Signed-off-by: Archer <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Signed-off-by: Nathan Bower <[email protected]> Co-authored-by: kolchfa-aws <[email protected]> Co-authored-by: Nathan Bower <[email protected]>
1 parent 0a456dd commit 2ec087c

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

_benchmark/user-guide/install-and-configure/configuring-benchmark.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,35 @@ OpenSearch Benchmark configuration data is stored in `~/.benchmark/benchmark.ini
1616

1717
The file is separated into the following sections, which you can customize based on the needs of your cluster.
1818

19+
## client_options
20+
21+
This section explains how to customize client-level settings during benchmark execution using the `--client-options` command line flag.
22+
23+
You can pass client-specific parameters to OpenSearch Benchmark using the `--client-options` flag. These parameters let you control low-level client behavior such as timeouts, authentication methods, and SSL settings.
24+
25+
The `--client-options` flag accepts a comma-separated list of key-value pairs, as shown in the following example:
26+
27+
```bash
28+
--client-options=timeout:120,verify_certs:false
29+
```
30+
31+
You can customize `--client-options` with the following settings.
32+
33+
| Option | Type | Description |
34+
| :---- | :---- | :---- |
35+
| `timeout` | Integer | Sets the request timeout value in seconds. |
36+
| `verify_certs` | Boolean | Determines whether to verify SSL certificates when connecting to the OpenSearch cluster. |
37+
38+
This example runs a benchmark with a 2-minute timeout and disabled certificate verification:
39+
40+
```bash
41+
opensearch-benchmark execute-test \
42+
--target-hosts=https://localhost:9200 \
43+
--pipeline=benchmark-only \
44+
--workload=geonames \
45+
--client-options=timeout:120,verify_certs:false
46+
```
47+
1948
<!-- vale off -->
2049
## meta
2150
<!-- vale on -->

_benchmark/user-guide/working-with-workloads/running-workloads.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,35 @@ Results from the test appear in the directory set by the `--output-path` option
4141

4242
If you want to run the test in test mode to make sure that your workload operates as intended, add the `--test-mode` option to the `execute-test` command. Test mode ingests only the first 1,000 documents from each index provided and runs query operations against them.
4343

44+
### Working with `--workload-params`
45+
46+
You can customize the behavior of a workload by passing workload-specific parameters using the `--workload-params` option. This flag accepts a comma-separated list of key-value pairs that override default values defined in the workload's `workload.json` file.
47+
48+
For example, some workloads let you configure the number of documents indexed, the number of clients used for query execution, or the index name. These parameters can be critical for tailoring benchmarks to your specific use case or infrastructure constraints.
49+
50+
To pass workload parameters, use the following syntax:
51+
52+
```bash
53+
--workload-params="number_of_documents:100000,index_name:custom-index"
54+
```
55+
56+
Add this option to your `execute-test` command, as shown in the following example:
57+
58+
```bash
59+
opensearch-benchmark execute-test \
60+
--pipeline=benchmark-only \
61+
--workload=nyc_taxis \
62+
--target-host=https://localhost:9200 \
63+
--client-options=basic_auth_user:admin,basic_auth_password:admin,verify_certs:false \
64+
--workload-params="bulk_size:500,index_name:nyc_custom"
65+
```
66+
67+
Available workload parameters can be found in the `README` of each workload in the [OpenSearch Benchmark Workloads GitHub repository](https://github.com/opensearch-project/opensearch-benchmark-workloads).
68+
{: .tip}
69+
70+
71+
72+
4473
## Step 3: Validate the test
4574

4675
After running an OpenSearch Benchmark test, take the following steps to verify that it has run properly:

0 commit comments

Comments
 (0)