Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-10012

Reducing memory overhead associated with strings in MetricName

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.6.0
    • network
    • None

    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 per-client and 4 per-connection Meter instances.

      Attachments

        Issue Links

          Activity

            People

              navina Navina Ramesh
              navina Navina Ramesh
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: