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

Yifan Cai updated CASSSIDECAR-347:
----------------------------------
    Reviewers: Yifan Cai
       Status: Review In Progress  (was: Needs Committer)

> 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