[ 
https://issues.apache.org/jira/browse/YUNIKORN-2257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17800319#comment-17800319
 ] 

Yu-Lin Chen commented on YUNIKORN-2257:
---------------------------------------

PR available for adding API:  ([GitHub Pull Request 
#762|https://github.com/apache/yunikorn-core/pull/762])
 * /ws/v1/scheduler/node-utilizations (plural form)

Addressed this comment in new function getPartitionNodesUtilJSON():
It triggers a storm of calls to CalculateAbsUsedCapacity Nodes have around 10 
resource types in normal cases. It gets called for each resource type 
separately while it should only be called once per node. The function 
calculates the absolute used capacity for all resource types in one go. As an 
example for a 5000 node cluster with 10 resource types per node the overhead is 
an unneeded 45000 calls to CalculateAbsUsedCapacity . Even if they are fast 
that is not acceptable.
-> New version call CalculateAbsUsedCapacity() once per node.

> Add rest API to retrieve node utilization for multiple resource types
> ---------------------------------------------------------------------
>
>                 Key: YUNIKORN-2257
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2257
>             Project: Apache YuniKorn
>          Issue Type: Sub-task
>          Components: core - common
>            Reporter: Yu-Lin Chen
>            Assignee: Yu-Lin Chen
>            Priority: Major
>              Labels: pull-request-available, release-notes
>
> The current 'Nodes Resource Utilization' bar chart in the UI only shows 
> domaint resource. To allow user to identify the top overloaded resources 
> type. We need a new api that returns node utlization for multiple 
> partititions and multiple resource types.
> The previous API introduced in YUNIKORN-2087 will be marked as deprecated, 
> and we will calculate domaint reosurces from the new api's result. 
> {code:java}
> [
>   {
>     "clusterId": "mycluster",
>     "partition": "default",
>     "utilizationList": []*dao.NodesUtilDAOInfo
>   },
>   {
>     "clusterId": "mycluster",
>     "partition": "other-partition",
>     "utilizationList": []*dao.NodesUtilDAOInfo
>   }
> ] {code}
> {*}API to be d{*}{*}eprecated :{*}
>  * /ws/v1/scheduler/node-utilization
> *New API:* (Return all partition and all type of resources)
>  * /ws/v1/scheduler/node-utilizations (plural form)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@yunikorn.apache.org
For additional commands, e-mail: issues-h...@yunikorn.apache.org

Reply via email to