-
Notifications
You must be signed in to change notification settings - Fork 569
feat: add NodeResourcesFitPlus and ScarceResourceAvoidance plugin #843
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# Disk IO Aware Scheduling | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we separate into two PRs? Wait until the KEPs are merged before reviewing the PRs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mean that KEP and the two plugins are split into two PRs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @googs1025 KEP:#845 |
||
|
||
<!-- toc --> | ||
- [Summary](#summary) | ||
- [Motivation](#motivation) | ||
- [Design Consideration](#design-consideration) | ||
- [Goals](#goals) | ||
- [Non-Goals](#non-goals) | ||
- [Proposal](#proposal) | ||
- [Design Details](#design-details) | ||
- [NodeResourcesFitPlus](#noderesourcesfitplus) | ||
- [ScarceResourceAvoidance](#scarceresourceavoidance) | ||
- [Test Plan](#test-plan) | ||
- [Graduation Criteria](#graduation-criteria) | ||
- [Alpha](#alpha) | ||
- [Beta](#beta) | ||
- [Implementation History](#implementation-history) | ||
<!-- /toc --> | ||
|
||
|
||
## Summary | ||
|
||
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 | ||
. Therefore, two plugins are extended to solve this common problem. | ||
|
||
## Motivation | ||
case: | ||
- GPU tasks take priority over the entire GPU | ||
- CPU&MEM tasks are distributed to the CPU machine first | ||
|
||
## Design Consideration | ||
|
||
- The solution is more versatile, not limited to AI clusters or CPU clusters, and not limited to common CPU resources or extended GPU resources. | ||
|
||
- Different resource policies can be configured for different cluster types and prioritized in the form of weights. | ||
|
||
- Easy to expand | ||
|
||
### Goals | ||
|
||
- Different types of resources can be configured with different strategies to prioritize them in the form of weights | ||
|
||
- Prevent pods that have not applied for scarce resources from being scheduled to nodes with scarce resources. | ||
|
||
### Non-Goals | ||
|
||
- None. | ||
|
||
## Proposal | ||
|
||
Extend two plug-ins to meet the above needs | ||
|
||
- NodeResourcesFitPlus | ||
- ScarceResourceAvoidance | ||
|
||
## Design Details | ||
|
||
### NodeResourcesFitPlus | ||
|
||
config: | ||
``` | ||
resources: | ||
nvidia.com/gpu: | ||
type: MostAllocated | ||
weight: 2 | ||
cpu: | ||
type: LeastAllocated | ||
weight: 1 | ||
memory: | ||
type: LeastAllocated | ||
weight: 1 | ||
``` | ||
config description: | ||
<p align="center"><img src="images/img1.png" title="Key components" width="600" class="center"/></p> | ||
|
||
node score: | ||
``` | ||
finalScoreNode = [(weight1 * resource1) + (weight2 * resource2) + … + (weightN* resourceN)] /(weight1+weight2+ … +weightN) | ||
``` | ||
|
||
### ScarceResourceAvoidance | ||
config: | ||
``` | ||
resources: | ||
- nvidia.com/gpu | ||
``` | ||
config description: | ||
<p align="center"><img src="images/img2.png" title="Key components" width="600" class="center"/></p> | ||
|
||
node score: | ||
``` | ||
finalScoreNode = (allocatablesResourcesNum - requestsResourcesNum) * framework.MaxNodeScore / allocatablesResourcesNum | ||
``` | ||
|
||
### Test Plan | ||
|
||
Comprehensive unit tests will be added to ensure that each functionality works as expected. Additionally, detailed integration tests will be implemented to verify that the scheduler plugin and IO Driver interact without any issue. | ||
|
||
Finally, a basic e2e test will be included to ensure that all components can work together properly. | ||
|
||
### Graduation Criteria | ||
|
||
#### Alpha | ||
|
||
- Implement the NodeResourcesFitPlus and ScarceResourceAvoidance scheduler plugins | ||
- Provide a reference implementation of the NodeResourcesFitPlus and ScarceResourceAvoidance | ||
- Unit tests and integration test from [Test Plan](#test-plan). | ||
|
||
#### Beta | ||
|
||
- Add E2E tests. | ||
- Provide beta-level documentation. | ||
|
||
## Implementation History | ||
|
||
- 2024-12-23: KEP created |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
title: Node Resource Fit plus Scheduling | ||
kep-number: 624 | ||
authors: | ||
- "@LY-today" | ||
owning-sig: sig-scheduling | ||
creation-date: 2024-12-23 | ||
last-updated: 2024-12-23 |
Uh oh!
There was an error while loading. Please reload this page.