Frame decoder performance question...
infectedrhytms
infectedrhythms at hotmail.com
Wed Mar 3 16:21:45 EST 2010
I'm testing my application using JMeter sending a simple String 50 users...
My piple is configured as follows...
pipeline.addLast("decoder", stringDecoder);
pipeline.addLast("encoder", stringEncoder);
pipeline.addLast("handler", myHandler);
And I get 4500 requests a seconds...
Now I add processing for 2 byte header
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 0,
2, 0, 2));
pipeline.addLast("decoder", stringDecoder);
pipeline.addLast("frameEncoder", new LengthFieldPrepender(2));
pipeline.addLast("encoder", stringEncoder);
pipeline.addLast("handler", myHandler);
And it drops to 245 requests per second... Any ideas?
The Jmeter Client code is as follows... I just took the Jmeter client
implementation and added the header calculation which is pretty fast.
public void write(OutputStream os, String s) {
try {
int length = s.length();
byte[] header = new byte[2];
header[0] = (byte) ((length >> 8) & 0xff);
header[1] = (byte) (length & 0xff);
os.write(header);
os.write(s.getBytes());
os.flush();
} catch (IOException e) {
log.warn("Write error", e);
}
log.debug("Wrote: " + s);
return;
}
--
View this message in context: http://n2.nabble.com/Frame-decoder-performance-question-tp4670560p4670560.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list