wenbingshen opened a new pull request, #3913: URL: https://github.com/apache/bookkeeper/pull/3913
### Motivation PerChannelBookieClient completionObjects occupy a lot of heap space and cannot be recycled. The figure below shows that the internal table array of ConcurrentOpenHashMap has used space size=0, but the array length is still 16384, and the memory overhead is 65552bytes.   ConcurrentOpenHashMap default DefaultConcurrencyLevel=16. We have hundreds of bookie nodes. Due to the feature of bookie polling and writing, the client and server have long connection characteristics, which will as a result, the memory usage of about 65552 * 16 * 1776 = 1.74GB cannot be recycled, and the space take up by these tables is all size=0.  When the throughput of the pulsar cluster increases and the bookie cluster expands, these memory usage will also increase. In addition to some other memory usage, the pulsar broker will continuously generate full gc. ### Changes I think adding autoShrink to completionObjects can reduce this part of memory usage and reduce the frequency of Full GC. -- 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]
