volcano icon indicating copy to clipboard operation
volcano copied to clipboard

Add sra plugin for scheduling

Open XbaoWu opened this issue 7 months ago • 10 comments

What type of PR is this?

/kind feature

What this PR does / why we need it:

Prevent task starvation for those requesting critical resources, enhance the utilization of important resources, and thereby achieve more effective task scheduling strategies.

Which issue(s) this PR fixes:

Fixes https://github.com/volcano-sh/volcano/issues/4244

Special notes for your reviewer:

No additional assistance messages

Does this PR introduce a user-facing change?

1. Support users to avoid scarce resource nodes when scheduling tasks that do not require scarce resources.

XbaoWu avatar Apr 29 '25 12:04 XbaoWu

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please assign shinytang6 You can assign the PR to them by writing /assign @shinytang6 in a comment when ready.

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

volcano-sh-bot avatar Apr 29 '25 12:04 volcano-sh-bot

/assign @shinytang6

XbaoWu avatar Apr 29 '25 14:04 XbaoWu

Nice feature, would you willing to share the feature on volcano weekly meeting?

JesseStutler avatar Apr 30 '25 01:04 JesseStutler

Nice feature, would you willing to share the feature on volcano weekly meeting?

Thank you for your recognition. I’d love to sharing it. I recently added the details to the weekly meeting documentation below.

XbaoWu avatar Apr 30 '25 02:04 XbaoWu

Nice feature, would you willing to share the feature on volcano weekly meeting?

Thank you for your recognition. I’d love to sharing it. I recently added the details to the weekly meeting documentation below.

OK, I have added your PR into weekly meeting doc: https://docs.google.com/document/d/1YLbF8zjZBiR9PbXQPB22iuc_L0Oui5A1lddVfRnZrqs/edit?tab=t.0#heading=h.gi87g73fuodr, welcome to join weekly meeting in May 9th, 2025 to share your great feature :)

JesseStutler avatar Apr 30 '25 02:04 JesseStutler

Nice feature, would you willing to share the feature on volcano weekly meeting?

Thank you for your recognition. I’d love to sharing it. I recently added the details to the weekly meeting documentation below.

OK, I have added your PR into weekly meeting doc: https://docs.google.com/document/d/1YLbF8zjZBiR9PbXQPB22iuc_L0Oui5A1lddVfRnZrqs/edit?tab=t.0#heading=h.gi87g73fuodr, welcome to join weekly meeting in May 9th, 2025 to share your great feature :)

Thank you. I'll be well-prepared.

XbaoWu avatar Apr 30 '25 02:04 XbaoWu

why don't put it in the current plugin predicate.proportional.

lowang-bh avatar May 09 '25 07:05 lowang-bh

why don't put it in the current plugin predicate.proportional.

Thank you for your advice. After I look at the design ideas about predicate.proportional, I find it not seem to completely solve the problem in this scenario.

More information: https://github.com/volcano-sh/volcano/issues/4244

XbaoWu avatar May 09 '25 14:05 XbaoWu

@JesseStutler @Monokaix The PR has moved the sra into the predicate plugin, based on the results discussed during our biweekly meeting on June 6. I hope you can take a look at it when you have a moment, if it’s not too much trouble. :)

XbaoWu avatar Jun 17 '25 05:06 XbaoWu

/cc

JesseStutler avatar Jun 18 '25 06:06 JesseStutler

IMO, there are two many logic scatter in predicates plugin, and other user has the similar requirement as yours, see https://github.com/volcano-sh/volcano/pull/4391, so I suggest move the sra and proportional logics to a new plugin and keep predicates a clean one, what do your think?

Monokaix avatar Jul 02 '25 10:07 Monokaix

cc @LY-today

Monokaix avatar Jul 02 '25 10:07 Monokaix

cc @LY-today

https://koordinator.sh/zh-Hans/docs/designs/node-resource-fit-plus-scoring

can refer to my previous design ideas, two plug-ins, different algorithms and parameters. Only for proportion

LY-today avatar Jul 02 '25 10:07 LY-today

IMO, there are two many logic scatter in predicates plugin, and other user has the similar requirement as yours, see #4391, so I suggest move the sra and proportional logics to a new plugin and keep predicates a clean one, what do your think?

I also tend to move the logic of proportion out, which can make the whole more clear and concise. In addition, we also need to consider the historical users who are using predicates.proportion, and should need to explain this change in some places.

XbaoWu avatar Jul 02 '25 14:07 XbaoWu

IMO, there are two many logic scatter in predicates plugin, and other user has the similar requirement as yours, see #4391, so I suggest move the sra and proportional logics to a new plugin and keep predicates a clean one, what do your think?

I also tend to move the logic of proportion out, which can make the whole more clear and concise. In addition, we also need to consider the historical users who are using predicates.proportion, and should need to explain this change in some places.

https://github.com/volcano-sh/volcano/pull/4391 @LY-today raised a PR about enhanced noderesourcefit plugin, I think we can move proportional, sra also into this plugin and rename it with a more comprehensive name? @XbaoWu Hope it won't trouble you, if you think it will trouble you to merge this pr, we can migrate later. But we think it's better to keep predicates and nodeorder clean to contain only kube-scheduler related plugins, even should not contain proportional codes

JesseStutler avatar Jul 03 '25 01:07 JesseStutler

IMO, there are two many logic scatter in predicates plugin, and other user has the similar requirement as yours, see #4391, so I suggest move the sra and proportional logics to a new plugin and keep predicates a clean one, what do your think?

I also tend to move the logic of proportion out, which can make the whole more clear and concise. In addition, we also need to consider the historical users who are using predicates.proportion, and should need to explain this change in some places.

#4391 @LY-today raised a PR about enhanced noderesourcefit plugin, I think we can move proportional, sra also into this plugin and rename it with a more comprehensive name? @XbaoWu Hope it won't trouble you, if you think it will trouble you to merge this pr, we can migrate later. But we think it's better to keep predicates and nodeorder clean to contain only kube-scheduler related plugins, even should not contain proportional codes

@JesseStutler Do you plan to migrate the capabilities of this plugin to my plugin?

LY-today avatar Jul 03 '25 01:07 LY-today

#4391 @LY-today raised a PR about enhanced noderesourcefit plugin, I think we can move proportional, sra also into this plugin and rename it with a more comprehensive name? @XbaoWu Hope it won't trouble you, if you think it will trouble you to merge this pr, we can migrate later. But we think it's better to keep predicates and nodeorder clean to contain only kube-scheduler related plugins, even should not contain proportional codes

@JesseStutler I think this is also a way to deal with, I think it is worth making some adjustments to keep the structure clear, I will not feel trouble about it. In addition, if there are many scenarios in which the noderesourcefit plugin is used alone, it is better to divide the noderesourcefit plugin and sra plugin ( including sra and proportional ) into two plugins, because it may reduce the user 's cost of understanding the composite plugin. As a supplement, we can provide users with the needs of the two plugins combination of best practices. What do you think?

XbaoWu avatar Jul 03 '25 03:07 XbaoWu

@JesseStutler @Monokaix @XbaoWu I agree to merge it into a plugin. We can merge https://github.com/volcano-sh/volcano/pull/4391 first, and then migrate the capability to https://github.com/volcano-sh/volcano/pull/4391. If you need assistance, I can participate.

LY-today avatar Jul 03 '25 06:07 LY-today

#4391 @LY-today raised a PR about enhanced noderesourcefit plugin, I think we can move proportional, sra also into this plugin and rename it with a more comprehensive name? @XbaoWu Hope it won't trouble you, if you think it will trouble you to merge this pr, we can migrate later. But we think it's better to keep predicates and nodeorder clean to contain only kube-scheduler related plugins, even should not contain proportional codes

@JesseStutler I think this is also a way to deal with, I think it is worth making some adjustments to keep the structure clear, I will not feel trouble about it. In addition, if there are many scenarios in which the noderesourcefit plugin is used alone, it is better to divide the noderesourcefit plugin and sra plugin ( including sra and proportional ) into two plugins, because it may reduce the user 's cost of understanding the composite plugin. As a supplement, we can provide users with the needs of the two plugins combination of best practices. What do you think?

Seems the sra plugin only have a score callback, it's better to move them to one dependent plugin, and we can let user to set different parameters of the plugin to enable different strategies: )

Monokaix avatar Jul 03 '25 06:07 Monokaix

Seems the sra plugin only have a score callback, it's better to move them to one dependent plugin, and we can let user to set different parameters of the plugin to enable different strategies: )

Well, I think it 's okay to do this.

XbaoWu avatar Jul 03 '25 06:07 XbaoWu

@XbaoWu https://github.com/volcano-sh/volcano/pull/4391 The ResourceStrategyFit plugin has been merged, and you can move sra and proportional logic into this plugin, if you meet any problem, please contact @Monokaix @LY-today @JesseStutler , we will help to migrate sra

JesseStutler avatar Jul 10 '25 09:07 JesseStutler

@XbaoWu #4391 The ResourceStrategyFit plugin has been merged, and you can move sra and proportional logic into this plugin, if you meet any problem, please contact @Monokaix @LY-today @JesseStutler , we will help to migrate sra

OK, I will raise PR as soon as possible.

XbaoWu avatar Jul 10 '25 11:07 XbaoWu

Close this PR, the feature will be submitted to the master branch : https://github.com/volcano-sh/volcano/pull/4454

XbaoWu avatar Jul 13 '25 16:07 XbaoWu