tomcat io performance comparison with nio

tomcat connector (conncector) can be configured way NIO IO and NIO todaywere nothing to do on the next test configuration is as follows: 

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
                           executor="tomcatThreadPool" />
<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
               connectionTimeout="20000"
               redirectPort="8443" />


Test two main resources: 
Dynamic pages (with database queries, emphasis on IO and cpu)
 
Static pages (no database operations, mainly on the ability to handle a simplerequest)

The results are as follows: 
Dynamic Page
 

 Concurrency   100 200 300 400 600 800
IO     206 215 209 205 210 206
NIO    192 194 189 194 195 191

Static page  

 Concurrency   100 200 300 400 600 800
IO     941 306 361 361 347 400
NIO    927 313 318 703 286 914

Can be seen indealing with the advantages of dynamic resources NIO is not obvious or even notas good as IO, the main reason is a dynamic resource, IO, and cpu-intensiveoperations, resulting in many requests are blocked on the CPU and IO, it canonly dry socket IO waiting, not to play the advantages of NIO

NIO look at the performance when dealing withstatic, although the unstable but still very significant performanceimprovements, so NIO often used to process the request and deal with them morethan simple applications, such as memcached

原文地址:http://www.codeweblog.com/tomcat-io-performance-comparison-with-nio/

翻译地址:http://xuliangyong.iteye.com/blog/640930

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值