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: node resource topology scheduler plugin #298

Merged

Conversation

WangZzzhe
Copy link
Collaborator

What type of PR is this?

Enhancements

What this PR does / why we need it:

add topologyMatch plugin to support topology-aware scheduling for both nativePolicy and dynamicPolicy
nativePolicy + single-numa-node,
dynamicPolicy + dedicated_cores + numaBinding + single-numa-node,
dynamicPolicy + dedicated_cores + numaBinding + numaExclusive + single-numa-node,
dynamicPolicy + dedicated_cores + numaBinding + numeric,
dynamicPolicy + dedicated_cores + numaBinding + numaExclusive + numeric
are supported.

Which issue(s) this PR fixes:

#160

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Attention: 268 lines in your changes are missing coverage. Please review.

Comparison is base (5fdaf30) 53.79% compared to head (bc54b15) 54.40%.

Files Patch % Lines
...g/scheduler/plugins/noderesourcetopology/plugin.go 66.66% 42 Missing and 13 partials ⚠️
...kg/scheduler/plugins/noderesourcetopology/score.go 80.31% 31 Missing and 6 partials ⚠️
...r/plugins/noderesourcetopology/filter_dedicated.go 86.61% 25 Missing and 11 partials ⚠️
...g/scheduler/plugins/noderesourcetopology/filter.go 82.88% 23 Missing and 9 partials ⚠️
pkg/scheduler/util/resource.go 61.90% 19 Missing and 5 partials ⚠️
pkg/scheduler/util/qos.go 63.63% 11 Missing and 5 partials ⚠️
.../scheduler/plugins/noderesourcetopology/reserve.go 80.35% 5 Missing and 6 partials ⚠️
pkg/scheduler/util/testutil.go 0.00% 11 Missing ⚠️
pkg/util/native/pod_resource.go 66.66% 8 Missing and 3 partials ⚠️
pkg/scheduler/cache/cache.go 65.51% 7 Missing and 3 partials ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #298      +/-   ##
==========================================
+ Coverage   53.79%   54.40%   +0.60%     
==========================================
  Files         450      463      +13     
  Lines       50385    51613    +1228     
==========================================
+ Hits        27104    28079     +975     
- Misses      20215    20396     +181     
- Partials     3066     3138      +72     
Flag Coverage Δ
unittest 54.40% <78.17%> (+0.60%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@WangZzzhe WangZzzhe force-pushed the dev/scheduler-noderesourcetopology branch from fc46d5b to c74515d Compare September 27, 2023 04:17
@WangZzzhe WangZzzhe force-pushed the dev/scheduler-noderesourcetopology branch 2 times, most recently from cf48b9c to d292543 Compare October 7, 2023 05:05
@caohe caohe added the enhancement New feature or request label Oct 7, 2023
@caohe caohe added this to the v0.4 milestone Oct 7, 2023
@WangZzzhe WangZzzhe force-pushed the dev/scheduler-noderesourcetopology branch 3 times, most recently from 48b985c to 16fe377 Compare November 8, 2023 04:01
@waynepeking348
Copy link
Collaborator

@caohe pls take your time to confirm whether we can merge this pr

@caohe
Copy link
Member

caohe commented Dec 20, 2023

@caohe pls take your time to confirm whether we can merge this pr

Sure, we can merge this pr first kubewharf/enhanced-k8s#12

Then kubewharf/katalyst-api#39

@waynepeking348
Copy link
Collaborator

@caohe pls take your time to confirm whether we can merge this pr

Sure, we can merge this pr first kubewharf/enhanced-k8s#12

Then kubewharf/katalyst-api#39

enhanced-k8s has been merged, but the api still requires another approve, so you may need to approve that firstly @caohe

@WangZzzhe WangZzzhe force-pushed the dev/scheduler-noderesourcetopology branch from 16fe377 to 3690c5e Compare December 27, 2023 06:56
return []framework.ClusterEvent{
{Resource: framework.Pod, ActionType: framework.Delete},
{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeAllocatable},
{Resource: framework.GVK(nrtGVK), ActionType: framework.Add | framework.Update},
Copy link
Member

Choose a reason for hiding this comment

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

Is this CRD nrt or cnr?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is this CRD nrt or cnr?

cnr, it has been updated

"github.com/kubewharf/katalyst-core/pkg/scheduler/util"
)

func (tm *TopologyMatch) Reserve(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, nodeName string) *framework.Status {
Copy link
Member

Choose a reason for hiding this comment

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

How do we implement "pessimistic allocation" if multiple numa nodes are needed?

@waynepeking348 waynepeking348 merged commit 3091075 into kubewharf:main Dec 28, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

5 participants