Skip to content
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

Add new optional parameters for OS cluster and benchmark #3481

Merged
merged 1 commit into from
May 8, 2023
Merged

Add new optional parameters for OS cluster and benchmark #3481

merged 1 commit into from
May 8, 2023

Conversation

rishabh6788
Copy link
Collaborator

Description

This PR adds 3 new parameters (2 for opensearch-cluster-cdk and 1 for opensearch-benchmark) that are required to roll out P0 benchmark-test workflow. The new parameters added are:

  1. use_50_percent_heap: Optional parameter to enable 50% heap usage on OpenSearch cluster.
  2. isInteral: Immutable isInternal parameter passed from config file. The will create internal network load balancer that can be accessed in a VPC peered environment between jenkins and cluster accounts.
  3. workload_params: Optional parameter to pass additional parameters to opensearch-benchmark.

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@@ -141,7 +141,9 @@ def setup_cdk_params(self, config: dict) -> dict:
"mlNodeCount": self.args.ml_node_count,
"dataNodeStorage": self.args.data_node_storage,
"mlNodeStorage": self.args.ml_node_storage,
"jvmSysProps": self.args.jvm_sys_props
"jvmSysProps": self.args.jvm_sys_props,
"use50PercentHeap": str(self.args.use_50_percent_heap).lower(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem to be used anywhere?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realize this is just a setting for part of the clustercdk then I have no issues.

@gaiksaya
Copy link
Member

gaiksaya commented May 5, 2023

LGTM! Needs passing python tests.

Copy link
Member

@peterzhuamazon peterzhuamazon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rishabh6788 please fix the tests when you can. Approved. Thanks.

@codecov-commenter
Copy link

codecov-commenter commented May 6, 2023

Codecov Report

Merging #3481 (07883be) into main (a140cfd) will decrease coverage by 0.66%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #3481      +/-   ##
==========================================
- Coverage   91.81%   91.16%   -0.66%     
==========================================
  Files         181      181              
  Lines        5268     5340      +72     
==========================================
+ Hits         4837     4868      +31     
- Misses        431      472      +41     
Impacted Files Coverage Δ
..._workflow/benchmark_test/benchmark_test_cluster.py 84.88% <ø> (ø)
src/test_workflow/benchmark_test/benchmark_args.py 100.00% <100.00%> (ø)
...st_workflow/benchmark_test/benchmark_test_suite.py 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

Comment on lines 79 to 80
parser.add_argument("--workload", dest="workload", required=True,
help="workload type for the OpenSearch benchmarking")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, this is not the workload "type", perhaps you can rephrase this as something like:
"name of the workload that OpenSearch Benchmark should run"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack! Updated.

Comment on lines +85 to +87
parser.add_argument("--workload-params", dest="workload_params",
help="With this parameter you can inject variables into workloads. Parameters differs "
"for each workload type. e.g., --workload-params \"number_of_replicas:1,number_of_shards:5\"")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Parameters differ

You might change this to: "Parameters are listed in the README file provided with each workload."

Also, since you are adding a new parameter, please consider adding --client-options as well. If you do that, you will have to merge fragments you are probably already specifying like basic_auth_user, etc. But making this option configurable will allow the user to override items like the client-timeout value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! will take this up in the next iteration.

@@ -102,7 +106,9 @@ def __init__(self) -> None:
self.data_node_storage = args.data_node_storage if args.data_node_storage else None
self.ml_node_storage = args.ml_node_storage if args.ml_node_storage else None
self.workload = args.workload
self.workload_params = args.workload_params if args.workload_params else None
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work here?

self.workload_params = args.workload_params

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the params are passed then it will be considered else ignored.

"jvmSysProps": self.args.jvm_sys_props
"jvmSysProps": self.args.jvm_sys_props,
"use50PercentHeap": str(self.args.use_50_percent_heap).lower(),
"isInternal": config["Constants"]["isInternal"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a comment indicating what this flag does?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these go into the cluster-cdk command, the details of all the flags are present in the repo README if someone wants more details.

parser.add_argument("--workload", dest="workload", help="workload type for the OpenSearch benchmarking",
required=True)
parser.add_argument("--workload", dest="workload", required=True,
help="workload type for the OpenSearch benchmarking")
parser.add_argument("--benchmark-config", dest="benchmark_config",
help="absolute filepath to custom opensearch-benchmark.ini config")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help section says opensearch-benchmark.ini but it should be benchmark.ini.

hoangia@3c22fbd0d988 Desktop % ls -lrt ~/.benchmark
drwxr-xr-x  6 hoangia  staff   192 Jun 10  2022 benchmarks
drwxr-xr-x  3 hoangia  staff    96 Aug  9  2022 logs
-rw-r--r--  1 hoangia  staff   654 Mar 14 11:10 benchmark-in-memory-it.ini
-rw-r--r--  1 hoangia  staff   768 Mar 14 11:10 benchmark-os-it.ini
-rw-r--r--  1 hoangia  staff   757 Mar 27 11:54 benchmark.ini

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will correct this.

@rishabh6788 rishabh6788 merged commit 4d3f191 into opensearch-project:main May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants