hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera" <asan...@wso2.com>
Subject Tuning HttpCore / NIO
Date Fri, 01 Jun 2007 11:41:26 GMT
Hi All

I was doing some performance tests for Synapse (which uses HttpCore/NIO) 
underneath, and am glad to say that we have great performance for 
messages of around ~1K (request and response). However, when the message 
size increases to around ~5K (request and response) there is a slight 
degrading of performance, and so I would like to learn from you all on 
how I could get the best performance out of HttpCore/NIO

My configuration by default starts up a http sender and listener, and 
the same for https - creating a total of 4 IO Reactors. I am using 2 
workers per reactor, and use 2K byte buffers [each] to read and write 
messages.

For the client/sender side I am using 60s SO_TIMEOUT, 10s 
CONNECTION_TIMEOUT, 8K SOCKET_BUFFER_SIZE,
STALE_CONNECTION_CHECK off and TCP_NODELAY off

For the server side I am using 60s SO_TIMEOUT, 8K SOCKET_BUFFER_SIZE, 
STALE_CONNECTION_CHECK off and TCP_NODELAY off

My configuration is expected to make maximum use of keepalives and 
connection reuse. In addition, I am setting the following Linux parameters:

echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout
echo 2097152 > /proc/sys/fs/file-max
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
ulimit unlimited

Any help on this matter is very much appreciated and I believe would 
help us create a valuable resource of advice that would help other users 
of HttpCore esp in the future

thanks
asankha

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message