-
Notifications
You must be signed in to change notification settings - Fork 342
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
Support load aware scheduling #159
Support load aware scheduling #159
Conversation
cfcc279
to
a6aece2
Compare
a6aece2
to
a166f15
Compare
@@ -1,3 +1,4 @@ | |||
reviewers: | |||
- eahydra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alphabetical order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haven't gone through the core logic of load aware plugin implementation yet. here is what I got for you so far ;)
) | ||
|
||
var ( | ||
defaultNodeMetricExpirationSeconds int64 = 180 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add some comments to briefly tell us abouth the stroy behind these default values?
|
||
var estimatedUsed int64 | ||
switch resourceName { | ||
case corev1.ResourceCPU: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is a besteffort Pod?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best-effort Pod uses extended resources and can be calculated directly using Value().
a166f15
to
2e22a86
Compare
Codecov Report
@@ Coverage Diff @@
## main #159 +/- ##
==========================================
+ Coverage 57.82% 58.21% +0.38%
==========================================
Files 91 93 +2
Lines 8159 8404 +245
==========================================
+ Hits 4718 4892 +174
- Misses 3029 3081 +52
- Partials 412 431 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
5817d17
to
637f78f
Compare
support user-defined node resource utilization thresholds. |
637f78f
to
d57735e
Compare
func (p *Plugin) estimatedAssignedPodUsage(nodeName string, nodeMetric *slov1alpha1.NodeMetric) map[corev1.ResourceName]int64 { | ||
estimatedUsed := make(map[corev1.ResourceName]int64) | ||
nodeMetricReportInterval := getNodeMetricReportInterval(nodeMetric) | ||
p.podAssignCache.lock.RLock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to reduce the lock granularity as there is no correlation among different nodes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The granularity of fine-grained locks is not currently considered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
The scheduling plugin filters abnormal nodes and scores them according to resource usage. The plugin extends the Filter/Score/Reserve/Unreserve extension points defined in the Kubernetes scheduling framework. FYI: docs/proposals/scheduling/20220510-load-aware-scheduling.md Fix koordinator-sh#95 Signed-off-by: Tao Li <joseph.t.lee@outlook.com>
d57735e
to
6cb8fdf
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hormes 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 |
Ⅰ. Describe what this PR does
The scheduling plugin filters abnormal nodes and scores them according
to resource usage. The plugin extends the Filter/Score/Reserve/Unreserve
extension points defined in the Kubernetes scheduling framework.
FYI: docs/proposals/scheduling/20220510-load-aware-scheduling.md
Ⅱ. Does this pull request fix one issue?
Fix #95
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews