[
https://issues.apache.org/jira/browse/YUNIKORN-3148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18035251#comment-18035251
]
Peter Bacsko commented on YUNIKORN-3148:
----------------------------------------
[~jchenjc22] thanks, I also felt that something is wrong with this approach,
but hasn't made any calculations to verify it.
I think instead of a bottom-up approach, we need to pass down the maxResource
from each level. If it changes at a lower level, we update it to
{{max(reaminingMax, currentMax)}, where {{remainingMax}} is the amount that has
been already used potentially by other queues, {{currentMax}} is the
maxResource of the given level.
> Incorrect headroom calculation when collecting outstanding requests
> -------------------------------------------------------------------
>
> Key: YUNIKORN-3148
> URL: https://issues.apache.org/jira/browse/YUNIKORN-3148
> Project: Apache YuniKorn
> Issue Type: Improvement
> Components: core - scheduler
> Reporter: Peter Bacsko
> Assignee: Peter Bacsko
> Priority: Blocker
> Attachments: queue_outstanding_requests_test.go
>
>
> YUNIKORN-2794 introduced a bug in the Application code. We're no longer
> mutating the {{headRoom}} object in-place in
> {{{}Application.getOutstandingRequests(){}}}, instead, we re-assign its value
> to a newly created object.
> Before:
> {noformat}
> headRoom.SubOnlyExisting(request.GetAllocatedResource())
> userHeadRoom.SubOnlyExisting(request.GetAllocatedResource()) {noformat}
> After:
> {noformat}
> headRoom = resources.SubOnlyExisting(headRoom, request.GetAllocatedResource())
> userHeadRoom = resources.SubOnlyExisting(userHeadRoom,
> request.GetAllocatedResource()) {noformat}
> Problem is, this does not change the object pointed to outside the function,
> so every iteration in {{Queue.GetQueueOutstandingRequests()}} starts with the
> original {{headRoom}} value for every application. This leads to undesired
> behavior, because we'll end up collecting more asks than needed, which in
> turn triggers unnecessary cluster upscale.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]