You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Wilfred Spiegelenburg (Jira)" <ji...@apache.org> on 2022/08/18 00:53:00 UTC

[jira] [Commented] (YUNIKORN-1282) Resource metrics are not tracked correctly for all queue types

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

Wilfred Spiegelenburg commented on YUNIKORN-1282:
-------------------------------------------------

slack has a limited history so tracking here for reference:

-+-+-+-+-

pretty simple, as an example here is the guaranteed resource metric update code:
[https://github.com/apache/yunikorn-core/blob/master/pkg/scheduler/objects/queue.go#L1220-L1228]
[~chenya] added this code and removing the {{sq.isLeaf()}} check would do it
Something that you could get into 1.1 if you are quick
{code:java}
func (sq *Queue) updateGuaranteedResourceMetrics() {
    if sq.isLeaf {
        if sq.guaranteedResource != nil {
            for k, v := range sq.guaranteedResource.Resources {
                metrics.GetQueueMetrics(sq.QueuePath).SetQueueGuaranteedResourceMetrics(k, float64(v))
{code}
BTW: I think we’re missing calls for the metric updates when the config is changed or nodes are added. We should have calls to _updateGuaranteedResourceMetrics_ and _updateMaxResourceMetrics_ from the location where we set them in: _setResources_ to get those two work consistently for all queue types and in _SetMaxResource_ to make sure the root queue is tracked

-+-+-+-+-

> Resource metrics are not tracked correctly for all queue types
> --------------------------------------------------------------
>
>                 Key: YUNIKORN-1282
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-1282
>             Project: Apache YuniKorn
>          Issue Type: Bug
>          Components: core - common
>    Affects Versions: 1.0.0
>            Reporter: Chaoran Yu
>            Assignee: Chaoran Yu
>            Priority: Major
>             Fix For: 1.1.0
>
>
> Based on the conversation on Slack: [https://yunikornworkspace.slack.com/archives/CL9CRJ1KM/p1660758189285209], currently metrics for resource usage have two issues:
> * Metrics are only tracked for leaf queues. No metrics are exported for non-leaf queues.
> * Metrics are not updated in all places when they should be updated: when config is updated and when nodes are updated in the cluster 



--
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