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-manager: enhance batch resource configuration and updating #1703

Conversation

saintube
Copy link
Member

@saintube saintube commented Oct 9, 2023

Ⅰ. Describe what this PR does

koord-manager: enhance batch resource configuration and updating:

  1. Refactor the NRT updating in the BatchResource plugin. Add the PreUpdate stage for checking and updating additional objects alongside the framework's Node updating.
  2. Support the cpuCalculatePolicy in the ColocationStrategy. Enable calculating batch-cpu according to high-priority pods' maximal of requests and usages. The default policy is usage, which allows the low-priority pods to reclaim the resources requested but unused by the high-priority pods. The new policy maxUsageAndRequest is helpful when the cpu resources are not strongly expected to be overcommitted between different priority bands, where neither used resources nor requested resources can be allocatable to the low-priority pods.
  3. Support colocation strategy based on the node metadata. Add an annotation protocol for node-level configuration. Add two label protocols for label-preferred use cases.

Ⅱ. Does this pull request fix one issue?

Ⅲ. 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

@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

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

Comparison is base (8c19de1) 65.91% compared to head (6e4c7e8) 65.93%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1703      +/-   ##
==========================================
+ Coverage   65.91%   65.93%   +0.01%     
==========================================
  Files         385      385              
  Lines       41639    41766     +127     
==========================================
+ Hits        27447    27539      +92     
- Misses      12155    12186      +31     
- Partials     2037     2041       +4     
Flag Coverage Δ
unittests 65.93% <81.77%> (+0.01%) ⬆️

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

Files Coverage Δ
...o-controller/config/colocation_cm_event_handler.go 75.86% <100.00%> (ø)
...er/noderesource/plugins/cpunormalization/plugin.go 86.98% <100.00%> (ø)
...troller/noderesource/plugins/midresource/plugin.go 81.30% <100.00%> (ø)
pkg/slo-controller/noderesource/plugins_profile.go 100.00% <100.00%> (ø)
...slo-controller/noderesource/resource_calculator.go 74.83% <100.00%> (+0.51%) ⬆️
...oller/noderesource/plugins/batchresource/plugin.go 76.07% <94.44%> (+1.56%) ⬆️
pkg/util/sloconfig/colocation_config.go 93.70% <95.08%> (+0.94%) ⬆️
...troller/noderesource/plugins/batchresource/util.go 85.30% <81.81%> (-1.58%) ⬇️
...ntroller/noderesource/framework/extender_plugin.go 43.88% <40.47%> (-0.19%) ⬇️

... and 5 files with indirect coverage changes

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

@saintube saintube force-pushed the koord-manager-enhance-batchresource-for-node-config branch from df39afe to 8726ac4 Compare October 10, 2023 02:10
@saintube saintube changed the title [WIP] koord-manager: enhance batch resource configuration and updating koord-manager: enhance batch resource configuration and updating Oct 10, 2023
@saintube saintube force-pushed the koord-manager-enhance-batchresource-for-node-config branch from 8726ac4 to 235bc6b Compare October 12, 2023 12:25
@hormes
Copy link
Member

hormes commented Oct 14, 2023

Enable calculating batch-cpu according to high-priority pods' requests instead of usages.

Explain when you need to use request instead of usage?

@saintube saintube force-pushed the koord-manager-enhance-batchresource-for-node-config branch from 235bc6b to 24f36f5 Compare October 16, 2023 05:49
@saintube
Copy link
Member Author

saintube commented Oct 16, 2023

Enable calculating batch-cpu according to high-priority pods' requests instead of usages.

Explain when you need to use request instead of usage?

Code comments are added for different calculating policies.

@zwzhang0107
Copy link
Contributor

/lgtm

@zwzhang0107
Copy link
Contributor

/approve

@saintube saintube force-pushed the koord-manager-enhance-batchresource-for-node-config branch from 24f36f5 to 6e4c7e8 Compare October 17, 2023 13:41
@koordinator-bot koordinator-bot bot removed the lgtm label Oct 17, 2023
@hormes
Copy link
Member

hormes commented Oct 19, 2023

/lgtm
/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hormes, zwzhang0107

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@koordinator-bot koordinator-bot bot merged commit 543358d into koordinator-sh:main Oct 19, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants