[ 
https://issues.apache.org/jira/browse/CASSSIDECAR-347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francisco Guerrero updated CASSSIDECAR-347:
-------------------------------------------
    Change Category: Performance
         Complexity: Normal
        Component/s: Observability
                     Performance
      Fix Version/s: 0.3
           Priority: Normal  (was: Major)
             Status: Open  (was: Triage Needed)

PR: https://github.com/apache/cassandra-sidecar/pull/261
CI: 
https://app.circleci.com/pipelines/github/frankgh/cassandra-sidecar?branch=CASSSIDECAR-347

> Improve FilteringMetricRegistry implementation
> ----------------------------------------------
>
>                 Key: CASSSIDECAR-347
>                 URL: https://issues.apache.org/jira/browse/CASSSIDECAR-347
>             Project: Sidecar for Apache Cassandra
>          Issue Type: Improvement
>          Components: Observability, Performance
>            Reporter: Francisco Guerrero
>            Assignee: Francisco Guerrero
>            Priority: Normal
>             Fix For: 0.3
>
>         Attachments: PastedGraphic-1.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> While profiling a Sidecar instance under load I noticed that we are spending 
> a lot of time recreating a map when calling the 
> {{org.apache.cassandra.sidecar.metrics.FilteringMetricRegistry#getMetrics}} 
> method. Recomputing this map every time is inefficient and unnecessary. We 
> can precompute it when needed and use it until we change it.
> The attached graphic shows a snapshot of the profiling session. There are two 
> stacktraces where we call {{getMetrics()}} and this accounts for over 50% of 
> the CPU time in a 5 minute profiling session. In addition to the overhead, a 
> lot of garbage is created.
> I propose an optimized implementation of the 
> {{org.apache.cassandra.sidecar.metrics.FilteringMetricRegistry#getMetrics}} 
> method that should help reduce load in Sidecar.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to