karanmehta93 opened a new pull request #2441: URL: https://github.com/apache/bookkeeper/pull/2441
Descriptions of the changes in this PR: ### Motivation Protobuf serialization is the last step of the netty pipeline. Currently, we allocate a heap buffer while serializing and pass it down to netty library. In `AbstractChannel#filterOutboundMessage()`, netty copies that data to a direct buffer if it is currently in heap (otherwise skips it and uses it directly). This change helps in reducing unncessary CPU cycles for buffer copies and also helps alleviate pressure off the GC, since there is less churn of memory. In some stress tests, I see a reduction upto 33% in number of GC's with the same avg running duration in BK Client. The workload does writes of different sizes, ranging from 1 KB to 512 KB. Bookies aren't usually CPU bound. This change improves READ_ENTRY code paths by a small factor. ### Changes Used direct memory for buffer allocation versus heap memory ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
