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: LoadAware supports load scheduling by Prod Pods #843

Conversation

eahydra
Copy link
Member

@eahydra eahydra commented Nov 28, 2022

Signed-off-by: Joseph joseph.t.lee@outlook.com

Ⅰ. Describe what this PR does

  1. Supports filter nodes by ProdUsageThresholds that defined in the config of scheduler or the annotation of nodes.
    The ProdUsageThresholds indicates the resource utilization threshold of Prod Pods compared to the whole machine.
    Not enable filter usage by ProdUsageThresholds by default.
  2. When scoring, estimate the usage of the recently scheduled Prod Pod or take the Pod usage reported by NodeMetric, and calculate the load water level of the Prod Pod after accumulating the total amount. The lower the water level, the higher the score.

Ⅱ. Does this pull request fix one issue?

fix #314.

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

@eahydra
Copy link
Member Author

eahydra commented Nov 28, 2022

/hold

@codecov
Copy link

codecov bot commented Nov 28, 2022

Codecov Report

Base: 66.45% // Head: 66.51% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (8020298) compared to base (4c843e3).
Patch coverage: 81.75% of modified lines in pull request are covered.

❗ Current head 8020298 differs from pull request most recent head 86203d2. Consider uploading reports for the commit 86203d2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #843      +/-   ##
==========================================
+ Coverage   66.45%   66.51%   +0.05%     
==========================================
  Files         233      234       +1     
  Lines       26512    26614     +102     
==========================================
+ Hits        17618    17701      +83     
- Misses       7665     7672       +7     
- Partials     1229     1241      +12     
Flag Coverage Δ
unittests 66.51% <81.75%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
pkg/scheduler/plugins/loadaware/load_aware.go 74.02% <79.06%> (-1.24%) ⬇️
pkg/scheduler/plugins/loadaware/helper.go 86.27% <86.27%> (ø)
...heduler/frameworkext/helper/synced_eventhandler.go 75.75% <0.00%> (-7.88%) ⬇️
pkg/util/httputil/reverseproxy.go 84.84% <0.00%> (ø)
pkg/koordlet/resmanager/resmanager.go 54.33% <0.00%> (ø)
pkg/tools/cache/expiration_cache.go
pkg/util/cache/expiration_cache.go 75.75% <0.00%> (ø)
pkg/koordlet/resmanager/cpu_evict.go 74.50% <0.00%> (+0.38%) ⬆️
pkg/koordlet/runtimehooks/reconciler/reconciler.go 65.88% <0.00%> (+4.11%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@eahydra eahydra force-pushed the loadaware_scheduling_support_prod_pods branch from 89d9c2a to 492e912 Compare November 28, 2022 17:41
@eahydra eahydra force-pushed the loadaware_scheduling_support_prod_pods branch from 492e912 to 75e4846 Compare December 10, 2022 10:26
@koordinator-bot koordinator-bot bot added size/XL and removed size/L labels Dec 10, 2022
@eahydra
Copy link
Member Author

eahydra commented Dec 10, 2022

/hold cancel

@eahydra
Copy link
Member Author

eahydra commented Dec 10, 2022

/milestone v1.1

@koordinator-bot koordinator-bot bot added this to the v1.1 milestone Dec 10, 2022
@saintube
Copy link
Member

/lgtm

@jasonliu747
Copy link
Member

/assign

@eahydra eahydra force-pushed the loadaware_scheduling_support_prod_pods branch from 75e4846 to 8020298 Compare December 12, 2022 11:07
@koordinator-bot koordinator-bot bot removed the lgtm label Dec 12, 2022
Signed-off-by: Joseph <joseph.t.lee@outlook.com>
@eahydra eahydra force-pushed the loadaware_scheduling_support_prod_pods branch from 8020298 to 86203d2 Compare December 12, 2022 11:11
@ZiMengSheng
Copy link
Contributor

/lgtm

@saintube
Copy link
Member

/lgtm

@eahydra
Copy link
Member Author

eahydra commented Dec 12, 2022

/approve

Copy link
Member

@FillZpp FillZpp left a comment

Choose a reason for hiding this comment

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

/lgtm

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eahydra, FillZpp, ZiMengSheng

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 a2aed08 into koordinator-sh:main Dec 13, 2022
Copy link
Member

@jasonliu747 jasonliu747 left a comment

Choose a reason for hiding this comment

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

great work as always.

return time.Duration(*nodeMetric.Spec.CollectPolicy.ReportIntervalSeconds) * time.Second
}

func getPodNamespacedName(namespace, name string) string {
Copy link
Member

Choose a reason for hiding this comment

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

这个函数貌似在许多插件里都实现了一次,我们有空的时候或许可以把他扔进util里。

Copy link
Member Author

Choose a reason for hiding this comment

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

是的。确实可以把一些函数挪到util的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants