rdhabalia opened a new pull request #1480: GC improvement: Reduce string 
objects from Publisher and Consumer stats
URL: https://github.com/apache/incubator-pulsar/pull/1480
 
 
   ### Motivation
   
   We have seen large young GC-pause in broker in specific states. Below is one 
of the example where broker's young gc reached to 1 sec and after capturing 
heap-dump it shows large number of string and char[] objects allocated by the 
producer/consumer stats of the topic and .
   
   **Young GC > 1.2 sec** 
   
![snip20180330_24](https://user-images.githubusercontent.com/2898254/38151253-5b3d2eb8-3417-11e8-99ce-6094870b51b2.png)
   
   **Highest object allocation classes: String, char[]**
   
   
![snip20180327_19](https://user-images.githubusercontent.com/2898254/38151392-ea69f436-3417-11e8-989e-5e6211dd8562.png)
   
   
   ### Modifications
   
   Producer/Consumer stats stores 4 String objects (address, producerName, 
connectedSince, version) which don't get modified once they are set. So, 
reducing 4 strings and char[] to 1 and store offsets of stats-placeholder which 
will reduce number of string and char[] objects.
   
   ### Result
   
   It will help to reduce GC when broker is serving many topics.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to