wolfstudy opened a new pull request, #19534:
URL: https://github.com/apache/pulsar/pull/19534

   ### Motivation
   
   <!-- Explain here the context, and why you're making that change. What is 
the problem you're trying to solve. -->
   
   Currently, the `trackerCache` uses a ConcurrentLongLongPairHashMap that does 
not shrink, causing `trackerCache` to occupy a large amount of memory and has 
no way to release it.
   
   By monitoring the market through the JVM, we can see that during that time 
period, Young GC and Full GC have been frequently triggered, resulting in a 
large delay in Young GC and Full GC, which in turn affects production and 
consumption.
   
   
![image](https://user-images.githubusercontent.com/20965307/219296488-084a2df0-e4d5-45ed-8888-536515f6d6e0.png)
   
![image](https://user-images.githubusercontent.com/20965307/219296556-e4173dae-8480-4eeb-b2e0-bc4d4a3bcd6a.png)
   
   But what is interesting is that we can see that after the Young GC and Full 
GC are triggered many times, the memory in the heap is not reclaimed, so the 
Young GC and Full GC are triggered frequently.
   
   
![image](https://user-images.githubusercontent.com/20965307/219296608-ab32b520-fcf3-4221-a241-130dd9cd3bba.png)
   
   Therefore, based on the above background, we made a memory dump of the 
Broker node and found that the set of trackerCache occupies most of the memory 
and this part of memory uses a non-shrink map, which will never be released. 
For details, refer to the following dump information:
   
   
![image](https://user-images.githubusercontent.com/20965307/219295709-ad797b3d-5bcf-479f-b566-84631bc75aa9.png)
   
   
   ### Modifications
   
   - Use shrink map for trackerCache


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to