Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
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:
// 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)
GetAvailableResource() returns the copy of the underlying resource object. However, cloning is not necessary. Two approaches are possible:
- since this code is inside the Node object, we can access sn.availableResource without cloning by simply acquiring the read lock
- add a new method which receives a Resource object, then performs the fit-no fit check without copying
Attachments
Attachments
Issue Links
- links to