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

feat: introduce adaptive_parallelism_strategy #20589

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

Conversation

shanicky
Copy link
Contributor

@shanicky shanicky commented Feb 24, 2025

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

This PR adds a system parameter called adaptive_parallelism_strategy to control the behavior of jobs when they are of the adaptive type, including options like Auto/Full, Bounded(n), and Ratio(r). These can be accessed in real-time to manage scheduling and rescheduling. Modifying this will send a local notification to inform the scale controller.

Checklist

  • I have written necessary rustdoc comments.
  • I have added necessary unit tests and integration tests.
  • I have added test labels as necessary.

Documentation

  • My PR needs documentation updates.
Release note

This PR adds behavior for jobs with adaptive parallelism.

  • When set to Full, the job will use all available parallelism;
  • When set to Bounded(n), the maximum parallelism is limited to n;
  • When set to Ratio(r), the actual available parallelism will be multiplied by r (rounded down);
  • The behavior of Auto is currently consistent with Full.

Keep in mind that all parallelism is still subject to the limits of max parallelism and resource groups.

Additionally, the command alter system set adaptive_parallelism_strategy can be used to modify this parameter, and it will update jobs in batches in the background.

Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

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

LGTM! Please mark it user-facing and add some necessary release notes.

@shanicky shanicky force-pushed the peng/adaptive-strategy-enum branch 2 times, most recently from 87a72df to 5350a1c Compare February 26, 2025 09:10
@shanicky shanicky removed request for a team and fuyufjh February 26, 2025 09:11
@shanicky shanicky force-pushed the peng/adaptive-strategy-enum branch from 5350a1c to 1652e07 Compare February 27, 2025 08:10
@shanicky shanicky enabled auto-merge February 27, 2025 09:14
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.

2 participants