Skip to content

[LI-HOTFIX] KAFKA-10012 - Reducing memory overhead associated with strings in MetricName - #83

Merged
navina merged 3 commits into
linkedin:2.3-li-1from
navina:metric-name-optimization
May 20, 2020
Merged

[LI-HOTFIX] KAFKA-10012 - Reducing memory overhead associated with strings in MetricName#83
navina merged 3 commits into
linkedin:2.3-li-1from
navina:metric-name-optimization

Conversation

@navina

@navina navina commented May 18, 2020

Copy link
Copy Markdown

TICKET =
LI_DESCRIPTION =
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 types of meter metric for every single client.
EXIT_CRITERIA = TICKET [KAFKA-10012]

@navina
navina requested a review from radai-rosenblatt May 18, 2020 03:50
@navina navina changed the title Reducing memory overhead associated with strings in MetricName [LI-HOTFIX] KAFKA-10012 - Reducing memory overhead associated with strings in MetricName May 18, 2020
Comment thread clients/src/main/java/org/apache/kafka/common/network/Selector.java
Comment thread clients/src/main/java/org/apache/kafka/common/network/Selector.java
@navina
navina merged commit 3d676e6 into linkedin:2.3-li-1 May 20, 2020
gitlw pushed a commit that referenced this pull request Jun 13, 2020
…rings in MetricName (#83)

TICKET =
LI_DESCRIPTION =
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 types
of meter metric for every single client.
EXIT_CRITERIA = TICKET [KAFKA-10012]
gitlw pushed a commit that referenced this pull request Jun 13, 2020
…rings in MetricName (#83)

TICKET =
LI_DESCRIPTION =
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 types
of meter metric for every single client.
EXIT_CRITERIA = TICKET [KAFKA-10012]
gitlw pushed a commit that referenced this pull request Jun 17, 2020
…rings in MetricName (#83)

TICKET =
LI_DESCRIPTION =
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 types
of meter metric for every single client.
EXIT_CRITERIA = TICKET [KAFKA-10012]
gitlw pushed a commit that referenced this pull request Jun 17, 2020
…rings in MetricName (#83)

TICKET =
LI_DESCRIPTION =
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 types
of meter metric for every single client.
EXIT_CRITERIA = TICKET [KAFKA-10012]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants