stevenschlansker opened a new pull request, #20328:
URL: https://github.com/apache/kafka/pull/20328

   While diagnosing an out of memory condition, our profiler alerted us that 
tens of megabytes of our heap was used to store redundant String objects.
   
   In particular, the strings `thread_id`, `rocksdb_state_id`, `task_id`, and 
`org.apache.kafka.consumer.fetch.manager.preferred.read.replica` alone take 
12MB. All of these objects are strongly held by MetricKey or MetricName 
instances.
   
   Interning a string is a somewhat expensive operation, however, metric names 
are generally created once at initialization and then not again dynamically 
(excepting some per-connection tracking)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to