You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jason Gustafson (Jira)" <ji...@apache.org> on 2020/06/08 01:46:00 UTC

[jira] [Resolved] (KAFKA-10012) Reducing memory overhead associated with strings in MetricName

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

Jason Gustafson resolved KAFKA-10012.
-------------------------------------
    Fix Version/s: 2.6.0
       Resolution: Fixed

> Reducing memory overhead associated with strings in MetricName
> --------------------------------------------------------------
>
>                 Key: KAFKA-10012
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10012
>             Project: Kafka
>          Issue Type: Improvement
>          Components: network
>            Reporter: Navina Ramesh
>            Assignee: Navina Ramesh
>            Priority: Major
>             Fix For: 2.6.0
>
>
> {{SelectorMetrics}} has a per-connection metrics, which means the number of {{MetricName}} objects and the strings associated with it (such as group name and description) grows with the number of connections in the client. This overhead of duplicate string objects is amplified when there are multiple instances of kafka clients within the same JVM. 
> This patch address some of the memory overhead by making {{metricGrpName}} a constant and introducing a new constant {{perConnectionMetricGrpName}}. Additionally, the strings for metric name and description in {{createMeter}} have been interned since there are about 8 per-client and 4 per-connection {{Meter}} instances.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)