mina性能测试

CPU:Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz
MEM:4GB

 

使用最简单的配置,测试连接数

写道
IoAcceptor acceptor = new NioSocketAcceptor();
acceptor.getFilterChain().addLast("logger",new LoggingFilter());
acceptor.getFilterChain().addLast("codec", new ProtocolCodecFilter( new TextLineCodecFactory(Charset.forName( "UTF-8" ))));
acceptor.setHandler(new TimeServerHandler());

//acceptor.getSessionConfig().setReadBufferSize( 2048 );

acceptor.bind(new InetSocketAddress(8888));

 

初始内存642000k

 

开始做链接测试,socket只做connect

只能撑到39000多。

做如下优化:

# more ports for testing
sudo sysctl -w net.ipv4.ip_local_port_range="1025 65535"
# tcp read buffer, min, default, maximum
sudo sysctl -w net.ipv4.tcp_rmem="4096 4096 16777216"
# tcp write buffer, min, default, maximum
sudo sysctl -w net.ipv4.tcp_wmem="4096 4096 16777216"
echo 9999999 | sudo tee /proc/sys/fs/nr_open
echo 9999999 | sudo tee /proc/sys/fs/file-max

 

作用不是太大

 

linux finwait

windows close_wait 时间

http://www.blogjava.net/yongboy/archive/2013/04/11/397677.html

 

http://www.zhihu.com/question/20831000

 

http://www.tigase.org/content/linux-settings-high-load-systems

nodejs单台 连接数

你可能感兴趣的:(网络)