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 client ramp up feature. #716

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rishabh6788
Copy link
Collaborator

@rishabh6788 rishabh6788 commented Dec 19, 2024

Description

As mentioned in #713 this PR introduces a new task property, ramp-up-time-period. When provided, opensearch-benchmark will gradually scale up clients based on the time-period and number of clients provided.

Issues Resolved

#713

Testing

  • New functionality includes testing

[Describe how this change was tested]


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.

Comment on lines +31 to +35
"ramp-up-time-period": {
"type": "integer",
"minimum": 0,
"description": "Defines the time period in seconds to gradually increase the number of clients."
},
Copy link
Member

Choose a reason for hiding this comment

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

Will the OSB workloads also need to be updated to accommodate this change?

Copy link
Collaborator

@IanHoang IanHoang left a comment

Choose a reason for hiding this comment

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

@rishabh6788 Have left a few comments but could we revise the PR to not include the additional formatting changes? Seems like a lot of it was introduced by a lint checker from the code editor. It's hard to determine all that has changed.

Comment on lines +1 to +4
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
Copy link
Collaborator

Choose a reason for hiding this comment

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

For users unfamiliar with dev cointainers, might be good to add some comments at the top for what scenarios and how this might be used?

Comment on lines +226 to +227
self.logger.error(
"Main worker_coordinator received a fatal indication from load generator (%s). Shutting down.", poisonmsg.details)
Copy link
Collaborator

Choose a reason for hiding this comment

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

A lot of these changes in worker_coordinator.py are new lines in or reformatting existing lines. Are these intentional or was this done with an automated tool? We should minimize changes that aren't related to the proposed feature

@@ -2009,7 +2148,7 @@ def requires_time_period_schedule(task, task_runner, params):


class ScheduleHandle:
def __init__(self, task_name, sched, task_progress_control, runner, params):
def __init__(self, task_allocation, sched, task_progress_control, runner, params):
"""
Creates a generator that will yield individual task invocations for the provided schedule.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The docstring should also be updated to reflect the change from task_name to task_allocation

:param task_name: The name of the task for which the schedule is generated.

@@ -1941,7 +2075,7 @@ def clients(self):

# Runs a concrete schedule on one worker client
# Needs to determine the runners and concrete iterations per client.
def schedule_for(task, client_index, parameter_source):
def schedule_for(task_allocation, parameter_source):
"""
Calculates a client's schedule for a given task.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as in ScheduleHandler, docstrings should be updated to replace task with task_allocation and remove client_index

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.

3 participants