I have a network application that processes about 40 thousand msg / sec written using the netty grid, and I want to reduce the number of garbage collector calls. During profiling, I discovered that there are a significant number of byte[]
instances, and I suspect that it comes from this part of the code:
public class MessageHandler extends SimpleChannelHandler { public void messageReceived(ChannelHandlerContext ctx, final MessageEvent e) { ChannelBuffer message = (ChannelBuffer) e.getMessage(); } }
Is it possible to get netty to reuse / pool ChannelBuffers
some way to prevent it from being created every time?
source share