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

Expose job controller's workqueue rate limiting configs #674

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

roteme-runai
Copy link

Issue:

The mpi-operator does not handle a large number of MPI jobs effectively. Specifically, when creating a significant number of jobs (e.g., 100), the operator experiences delays in job management, leading to the following issues:

  • Excessive time taken to create all the pods required for the jobs.
  • Significant delay between a job's completion and the corresponding status update.
  • Delayed cleanup of pods (per CleanPodPolicy) due to the lag in status updates.

Root Cause:

The controller uses a workqueue with a default rate limiter configuration that is not adjustable via operator options. This is in contrast to other load-related configurations (e.g., threadiness, qps, etc.), which are user-configurable. The low default rate-limiting settings result in insufficient parallel processing, thereby delaying job handling.

Proposed Solution:

To address this, I propose exposing the controller's rate-limiting settings as user-configurable options. This change would allow users to adjust the rate limiter based on their specific usage requirements, expected scale, and system capabilities.
The solution has been tested and verified in a production environment and has demonstrated improved handling of bigger-scale MPI jobs.

Backporting Request:

If this fix is approved, I kindly request its inclusion in a new release, ideally in versions from v0.6 onward.

Thank you for your time!

Signed-off-by: Rotem Elad <rotem.elad@run.ai>
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tenzen-y for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot requested review from carmark and zw0610 January 1, 2025 08:30
@@ -75,4 +77,7 @@ func (s *ServerOption) AddFlags(fs *flag.FlagSet) {

fs.IntVar(&s.QPS, "kube-api-qps", 5, "QPS indicates the maximum QPS to the master from this client.")
fs.IntVar(&s.Burst, "kube-api-burst", 10, "Maximum burst for throttle.")

fs.IntVar(&s.ControllerRateLimit, "controller-queue-rate-limit", 10, "Rate limit of the controller events queue .")
fs.IntVar(&s.ControllerBurst, "controller-queue--burst", 100, "Maximum burst of the controller events queue.")

Choose a reason for hiding this comment

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

Is the double hyphen a typo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants