Tomcat 长连接与短连接性能测试
环境:
操作系统:centos 6.5 x64
cpu:32 core
内存: 32G
web服务器:tomcat 6.x
jdk :1.6x
测试环境:
操作系统:centos 6.5 x64
cpu:32 core
内存: 32G
ab 作为性能测试工具
在做性能测试之前,对客户端和服务端均进行服务端优化(linux文件句柄数、socket 等网络参数)。在服务端,针对tomcat connector 进行bio 短连接和bio长连接分别进行测试,具体参数在这里不详细介绍。请求页面4k大小。测试结果如下:
ab -c 10000 -n 30000
http://192.98.12.241:8080/ime-server/
---长连接 结果
Requests per second: 12646.85 [#/sec] (mean)
Time per request: 790.711 [ms] (mean)
Time per request: 0.079 [ms] (mean, across all concurrent requests)
Transfer rate: 11189.40 [Kbytes/sec] received
---短 连接 结果
Requests per second: 4048.03 [#/sec] (mean)
Time per request: 2470.339 [ms] (mean)
Time per request: 0.247 [ms] (mean, across all concurrent requests)
Transfer rate: 3714.17 [Kbytes/sec] received
---长连接 结果
Requests per second: 12646.85 [#/sec] (mean)
Time per request: 790.711 [ms] (mean)
Time per request: 0.079 [ms] (mean, across all concurrent requests)
Transfer rate: 11189.40 [Kbytes/sec] received
---短 连接 结果
Requests per second: 4048.03 [#/sec] (mean)
Time per request: 2470.339 [ms] (mean)
Time per request: 0.247 [ms] (mean, across all concurrent requests)
Transfer rate: 3714.17 [Kbytes/sec] received
具体参数,如有需要请向我咨询。
文章转载请注明出处:http://www.cnblogs.com/likehua/p/4215249.html