Tomcat 7 性能优化

服务器关键配置(2个物理CPU,每个CPU是4核心8线程)
Intel(R) Xeon(R) CPU E5620 @2.40GHz

附件
${tomcat_home}/conf/server.xml的配置,已经经过生产环境高并发的检验
操作系统内核优化/etc/sysctl.conf
压力测试的空跑JSP文件test.jsp

以下使用apache-bench做的压力测试
你的tomcat空跑QPS能达到 27522.05 [#/sec]吗?

./ab -n 50000 -c 1024 http://10.10.224.27:8092/performance/test.jsp
Server Software: Apache-Coyote/1.1
Server Hostname: 10.10.224.27
Server Port: 8092

Document Path: /performance/test.jsp
Document Length: 253 bytes

Concurrency Level: 1024
Time taken for tests: 1.090 seconds
Complete requests: 30000
Failed requests: 0
Write errors: 0
Total transferred: 15130782 bytes
HTML transferred: 7625673 bytes
Requests per second: 27522.05 [#/sec] (mean)
Time per request: 37.207 [ms] (mean)
Time per request: 0.036 [ms] (mean, across all concurrent requests)
Transfer rate: 13555.67 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 2 5 1.2 5 17
Processing: 4 7 1.3 7 22
Waiting: 2 5 1.3 5 15
Total: 9 12 1.8 12 37

Percentage of the requests served within a certain time (ms)
50% 12
66% 13
75% 13
80% 13
90% 13
95% 14
98% 17
99% 22
100% 37 (longest request)

你可能感兴趣的:(tomcat)