You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Peter Bacsko (Jira)" <ji...@apache.org> on 2023/05/23 23:37:00 UTC
[jira] (YUNIKORN-1764) Add new method to object.Node to check if there's enough resource
[ https://issues.apache.org/jira/browse/YUNIKORN-1764 ]
Peter Bacsko deleted comment on YUNIKORN-1764:
----------------------------------------
was (Author: pbacsko):
!screenshot-1.png!
> Add new method to object.Node to check if there's enough resource
> -----------------------------------------------------------------
>
> Key: YUNIKORN-1764
> URL: https://issues.apache.org/jira/browse/YUNIKORN-1764
> Project: Apache YuniKorn
> Issue Type: Sub-task
> Components: core - scheduler
> Reporter: Peter Bacsko
> Assignee: Peter Bacsko
> Priority: Major
> Attachments: screenshot-1.png
>
>
> The method {{Resource.Clone()}} shows up quite often in various heap profiles which were captured on busy clusters (see screenshot).
> One of the call sites of this method is {{Node.preAllocateCheck()}} which calls this method in the scheduling cycle very often:
> {noformat}
> // check if resources are available
> available := sn.GetAvailableResource()
> // returns true/false based on if the request fits in what we have calculated
> return available.FitInMaxUndef(res)
> {noformat}
> However, cloning is not necessary. We can pass "res" to the Node which returns a boolean whether the request can fit or not, therefore we avoid memory allocations.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org