-
Notifications
You must be signed in to change notification settings - Fork 339
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
slo-controller: fix mid resource calculate formula #2291
slo-controller: fix mid resource calculate formula #2291
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2291 +/- ##
==========================================
- Coverage 66.04% 66.03% -0.02%
==========================================
Files 457 457
Lines 53737 53785 +48
==========================================
+ Hits 35490 35516 +26
- Misses 15697 15719 +22
Partials 2550 2550
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
c310647
to
51cae0a
Compare
@lijunxin559 Thanks for your contribution.
I suppose the |
Morning, thanks for your reply ~ (^^) Allocatable[Mid]' := min(Reclaimable[Mid], NodeAllocatable * thresholdRatio) + Unallocated[Mid] * midUnallocatedRatio is the original code logic. I think Unallocated[Mid] is intended to express the part of resources that are not allocated to prod. I just added a limit on the actual idleness of a node, which does not conflict with the original formula. Yes, the predictor improvement you mentioned can also avoid secondary overselling to a certain extent, but I think the logic of dividing the predictor and the calculation of mid resources into two parts may be clearer. The predictor can focus on modeling and predicting the idle resources of the pod and ensure the reliability of the prediction, regardless of whether this part of the allocated resources actually exists or not. And the secondary utilization of this part of the idle resources is separated separately (mid and batch were also done before), so that the logic is decoupled and the subsequent use of the predictor function is more scalable. Right? |
@lijunxin559 OK. So the |
6746896
to
65514b4
Compare
1dd0e44
to
2924f9f
Compare
Signed-off-by: lijunxin <[email protected]>
2924f9f
to
ef6b1f9
Compare
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.
/lgtm
PTAL /cc @zwzhang0107 @hormes |
Ⅰ. Describe what this PR does
When calculating Allocatable[mid] resources, due to possible oversold, ProdReclaimableMetric will be greater than NodeAllocatable * thresholdRatio, so the calculated Allocatable[mid] value accidentally includes the oversold part.
In particular, when thresholdRatio = 1, Allocatable[mid] = NodeAllocatable, which is not the original intention of the koordinator resource model design.
I suggest taking the current free resources of this node into account when calculating Allocatable[mid], that is, Allocatable[Mid]' := min(Reclaimable[Mid], NodeAllocatable * thresholdRatio, FreeResourceOnNode) + Unallocated[Mid] * midUnallocatedRatio
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews
V. Checklist
make test