urgent Performance issues
ynotNetty
yair at traffixsystems.com
Mon Aug 30 07:20:49 EDT 2010
hi All,
we have the following issues (going to use netty in a very high rate
communication environments):
BWT , we use netty 3.2.1 version .
1. in our decoder(that extends the OneToOneDecoder) we have this code :
@Override
protected Object decode(ChannelHandlerContext context, Channel channel,
Object msg) throws Exception {
ByteBuffer buffer = ByteBuffer.allocate(channelBuffer.readableBytes() +
EXTRA_BYTES_ALLOCATION);
channelBuffer.getBytes(channelBuffer.readerIndex(), buffer);
buffer.order(channelBuffer.order());
BufferWrapper bufferWrapper = new ByteBufferWrapper(buffer);
PipelineChannelWrapper channelWrapper = (PipelineChannelWrapper)
context.getAttachment();
DiameterMessage message = parser.parseMessage(bufferWrapper, 0, true,
bufferPool);
return message;
}
this is a surley not the ideal way to do parsing of a message , can you
suplly us with a better way that doesn't involve allocation of bytebuffer
for each message ?
2. what do you recommened about tuning the netty to work with large number
of Clients - one server
with a average message length of 1000B wuth a high volume of messages per
second (aroung 40-50K)
2.a) should we have one instance of ExeuterHandler per all the channels or
should we create a new instance for every channel)
2.b) should the executerHandler should use one instance of ThreadExecuter or
a new one for each channel.
our current configuration is :
protected PeerPipelineFactory(TransportStack stack) {
executionHandler = getProtocolExecutor();
inExecuter = threadManager.getExecutor(false); //return one instance
that was initaiated as
//executor = new MemoryAwareThreadPoolExecutor(corePoolSize,
1048576,1048576,
// keepAliveTime, keepAliveTimeUnit, getThreadFactory());
}
public ChannelPipeline getPipeline() throws Exception {
...
pipeline.addLast(OurExecutionHandler.NAME,executionHandler );
...
}
protected OurExecutionHandler getProtocolExecutor(
) {
return new OurExecutionHandler (inExecuter);
}
Thanks!
--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/urgent-Performance-issues-tp5477760p5477760.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list