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

koord-scheduler: support node cpu amplification #1602

Closed

Conversation

zqzten
Copy link
Member

@zqzten zqzten commented Sep 1, 2023

Ⅰ. Describe what this PR does

This is the scheduler part of Node CPU amplification. It implements below logic described in the proposal:

On koord-scheduler side, a scheduling plugin filters and scores Nodes with similar logic to the NodeResourcesFit plugin, but with one difference: It amplifies the request of CPUSet Pods with the Node's CPU amplification ratio, as CPUSet Pods would get real physical CPUs requested so that their requests would occupy more CPU resources than what they specify on Nodes with allocatable CPU amplified. For example, a CPUSet Pod with CPU request 1 would occupy 1 physical CPU on a Node, if the Node's CPU amplification ratio is 2, the Pod would actually occupy 2 amplified CPUs (which are mapped to 1 physical CPU) on this Node.

Ⅱ. Does this pull request fix one issue?

Part of #1539

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

@zqzten
Copy link
Member Author

zqzten commented Sep 1, 2023

/hold for UT

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Patch coverage: 70.03% and no project coverage change.

Comparison is base (a21d99f) 65.82% compared to head (facedf7) 65.82%.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #1602    +/-   ##
========================================
  Coverage   65.82%   65.82%            
========================================
  Files         374      379     +5     
  Lines       39484    39751   +267     
========================================
+ Hits        25992    26168   +176     
- Misses      11609    11679    +70     
- Partials     1883     1904    +21     
Flag Coverage Δ
unittests 65.82% <70.03%> (+<0.01%) ⬆️

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

Files Changed Coverage Δ
...g/scheduler/plugins/nodecpuamplification/plugin.go 59.68% <59.68%> (ø)
...lugins/nodecpuamplification/resource_allocation.go 74.19% <74.19%> (ø)
...cheduler/plugins/nodecpuamplification/test_util.go 81.25% <81.25%> (ø)
...er/plugins/nodecpuamplification/least_allocated.go 85.71% <85.71%> (ø)
...ler/plugins/nodecpuamplification/most_allocated.go 86.95% <86.95%> (ø)

... and 2 files with indirect coverage changes

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

pkg/scheduler/plugins/cpunormalization/least_allocated.go Outdated Show resolved Hide resolved
pkg/scheduler/plugins/cpunormalization/plugin.go Outdated Show resolved Hide resolved
pkg/scheduler/plugins/cpunormalization/plugin.go Outdated Show resolved Hide resolved
pkg/scheduler/plugins/cpunormalization/plugin.go Outdated Show resolved Hide resolved
@zqzten zqzten force-pushed the cpu-normalization-scheduler branch from 7946b4f to dee17ab Compare September 11, 2023 12:12
@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign yihuifeng after the PR has been reviewed.
You can assign the PR to them by writing /assign @yihuifeng 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

@zqzten zqzten changed the title koord-scheduler: support cpu normalization koord-scheduler: support node cpu amplification Sep 11, 2023
@zqzten zqzten force-pushed the cpu-normalization-scheduler branch from dee17ab to facedf7 Compare September 11, 2023 12:25
@zqzten
Copy link
Member Author

zqzten commented Sep 11, 2023

/unhold
@eahydra PTAL

@zqzten
Copy link
Member Author

zqzten commented Sep 24, 2023

/close as replaced by the impl of #1677

@zqzten zqzten closed this Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants