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

Give users ability to set number_of_shards and number_of_replicas via datastore config #336

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

IanHoang
Copy link
Collaborator

@IanHoang IanHoang commented Jun 15, 2023

Description

This PR allows users to set number_of_shards and number_of_replicas for benchmark-* indices.

Why are we reverting the changes of PR #321?

The changes introduced in PR #321 can potentially impact OSB users with varying datastore cluster configurations since it forces their datastore clusters to have benchmark-metrics-* indices of 10 primary shards and 2 replicas shards. 10 primary shards and 2 replica shards are not suitable for all kinds of OpenSearch clusters. A better solution is to offer flexibility and allow users to override the defaults imposed by OpenSearch (1 primary and 0 replicas according to the documentation). With this PR, users can now do this by setting their own primary and replica shards with the benchmark.ini config. See #330 for more information.

Issues Resolved

#330 #188

Testing

  • New functionality includes testing
  • Added new unittests
  • Tested with single node datastore cluster with 1AZ
  • Tested with multi node datastore cluster with 3AZ

See issue #330 for more testing.


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.

… config benchmark.ini

Signed-off-by: Ian Hoang <hoangia@amazon.com>
@IanHoang IanHoang requested a review from gkamat as a code owner June 15, 2023 19:39
Comment on lines +227 to +230
self._config = cfg
self.script_dir = self._config.opts("node", "benchmark.root")
self._number_of_shards = self._config.opts("reporting", "datastore.number_of_shards", default_value=None, mandatory=False)
self._number_of_replicas = self._config.opts("reporting", "datastore.number_of_replicas", default_value=None, mandatory=False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is good -- it is exactly what I thought would be needed to resolve the issue.

@IanHoang IanHoang merged commit dc063b4 into opensearch-project:main Jun 27, 2023
sarthakaggarwal97 pushed a commit to sarthakaggarwal97/opensearch-benchmark that referenced this pull request Jun 28, 2023
… datastore config (opensearch-project#336)

Signed-off-by: Ian Hoang <hoangia@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants