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

Greg Mann commented on MESOS-9072:
----------------------------------

{code}
commit 42becf22f07831ef8c3d4fbc8c1b80eb9d5b959a (HEAD -> master, origin/master, 
origin/HEAD, metrics-optimization)
Author: Greg Mann <[email protected]>
Date:   Mon Jul 9 22:59:12 2018 -0700

    Optimized the generation of metrics snapshots.

    Profiling of metrics generation revealed a large amount of time spent
    in map operations. This patch does three things to mitigate this:

     * Stores the metrics as an ordered map so that we only pay the price
       of sorting when the metric is first added.
     * Makes use of vectors instead of maps for intermediate objects,
       which eliminates the need for another intermediate object.
     * Hints when inserting into the returned map, reducing the cost of
       insertion into that ordered container.

    Review: https://reviews.apache.org/r/67871
{code}
{code}
commit 27ed91596b3f129891e1df6d7fde1b1140807d2a
Author: Greg Mann <[email protected]>
Date:   Mon Jul 9 22:59:04 2018 -0700

    Avoided implicit construction of a hashmap in the metrics.

    The master and agent metrics code was passing a 'std::map' into a
    continuation which accepted its parameter as a hashmap, leading
    to the implicit construction of an extra object.

    Review: https://reviews.apache.org/r/67870
{code}

> Optimize metrics generation
> ---------------------------
>
>                 Key: MESOS-9072
>                 URL: https://issues.apache.org/jira/browse/MESOS-9072
>             Project: Mesos
>          Issue Type: Task
>            Reporter: Greg Mann
>            Assignee: Greg Mann
>            Priority: Major
>              Labels: mesosphere, performance
>
> As we add more metrics, the response time of the metrics snapshot is going 
> up. We should optimize the generation of the snapshot to improve response 
> times.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to