-
Notifications
You must be signed in to change notification settings - Fork 338
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: add NodeResourcesFitPlus and ScarceResourceAvoidance plugin #2302
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2302 +/- ##
==========================================
+ Coverage 66.02% 66.06% +0.04%
==========================================
Files 458 461 +3
Lines 53868 54459 +591
==========================================
+ Hits 35564 35977 +413
- Misses 15749 15885 +136
- Partials 2555 2597 +42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
4e607ff
to
fc5493b
Compare
pkg/scheduler/plugins/scarceresourceavoidance/scarce_resource_avoidance.go
Show resolved
Hide resolved
…lugis Signed-off-by: LY-today <[email protected]>
c3328a1
to
507a5b5
Compare
Expressing benefit, NodeResourcesFit is indeed very limited in some scenarios, especially in non-traditional CPU and Memory clusters, expensive resources like GPU do require special treatment. |
pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus.go
Outdated
Show resolved
Hide resolved
Signed-off-by: LY-today <[email protected]>
pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus.go
Outdated
Show resolved
Hide resolved
return 0, framework.NewStatus(framework.Error, fmt.Sprintf("get State node %q from PreScore: %v", nodeName, err)) | ||
} | ||
|
||
podRequest, _ := fitsRequest(scoreState.Resource, nodeInfo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does it mean fitsRequest and why we need it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refer to:k8s.io/[email protected]/pkg/scheduler/framework/plugins/noderesources/fit.go:fitsRequest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resource types used to sense pods and nodes
pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/plugins/scarceresourceavoidance/scarce_resource_avoidance.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/plugins/noderesourcefitplus/node_resources_fit_plus.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/plugins/scarceresourceavoidance/scarce_resource_avoidance.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/plugins/scarceresourceavoidance/scarce_resource_avoidance.go
Outdated
Show resolved
Hide resolved
Signed-off-by: LY-today <[email protected]>
Signed-off-by: LY-today <[email protected]>
Signed-off-by: LY-today <[email protected]>
@saintube Resubmitted, please review |
@LY-today Thanks for your contributions! Before merging this PR, could you please add some documentation about the new plugins? Including how the plugins are compatible with the vanilla NodeResourceFit plugin and how different they are. |
@saintube Thanks to the community students for their help. I have already written the KEP document. Please review it. |
What is your proposal:
The NodeResourcesFit plug-in of native k8s can only adopt a type of strategy for all resources, such as MostRequestedPriority and LeastRequestedPriority. However, in industrial practice, this design does not apply to some scenarios. For example: In AI scenarios, businesses that apply for GPUs prefer to occupy the entire GPU machine first to prevent GPU fragmentation; businesses that apply for CPU & MEM are prioritized and dispersed to non-GPU machines to prevent excessive consumption of CPU & MEM on GPU machines, resulting in real tasks of applying for GPUs. Pending due to insufficient non-GPU resources
. It is therefore hoped that both strategies can be extended to address this business need.
Why is this needed:
There are related descriptions above
Is there a suggested solution, if so, please add it:
plugin-one
config:
config description:
node score:
plugin-two
config:
config description:
node score: