[
https://issues.apache.org/jira/browse/CASSSIDECAR-347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Francisco Guerrero updated CASSSIDECAR-347:
-------------------------------------------
Source Control Link:
https://github.com/apache/cassandra-sidecar/commit/f12f3e6fd99b0920e9c3b23a4e51ac5f75fee0b8
Resolution: Fixed
Status: Resolved (was: Ready to Commit)
> 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: 20m
> 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]