TOMCAT7+APR+BIO+NIO测试

TOMCAT7的三种模式,我分别做了一次压力测试,结果如下,仅供参考:

<Connector port="8080" protocol="HTTP/1.1"

 Concurrency Level:      600
 Time taken for tests:   40.851 seconds
 Complete requests:      500000
 Failed requests:        0
 Write errors:           0
 Total transferred:      1247002494 bytes
 HTML transferred:       1121002242 bytes
 Requests per second:    12239.72 [#/sec] (mean)
 Time per request:       49.021 [ms] (mean)
 Time per request:       0.082 [ms] (mean, across all concurrent requests)
 Transfer rate:          29810.48 [Kbytes/sec] received
Connection Times (ms)
 min  mean[+/-sd] median   max
 Connect:        0   10 175.5      1    9000
 Processing:     0   39  71.6      9    1267
 Waiting:        0   37  65.3      8    1259
 Total:          1   49 190.6     13    9043
Percentage of the requests served within a certain time (ms)
 50%     13
 66%     39
 75%     56
 80%     74
 90%    115
 95%    147
 98%    200
 99%    245
 100%   9043 (longest request)
 
<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"

ab -n 500000 -c 600 http://172.17.6.203:8080/examples/jsp/jsp2/el/basic-comparisons.jsp

Concurrency Level:      600
Time taken for tests:   39.503 seconds
Complete requests:      500000
Failed requests:        7
   (Connect: 0, Receive: 0, Length: 4, Exceptions: 3)
Write errors:           0
Total transferred:      1246990024 bytes
HTML transferred:       1120991032 bytes
Requests per second:    12657.42 [#/sec] (mean)
Time per request:       47.403 [ms] (mean)
Time per request:       0.079 [ms] (mean, across all concurrent requests)
Transfer rate:          30827.50 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   34 311.9      5    9013
Processing:     0   12  26.5      8     850
Waiting:        0   10  23.8      7     639
Total:          1   46 315.6     13    9033

Percentage of the requests served within a certain time (ms)
  50%     13
  66%     16
  75%     21
  80%     24
  90%     30
  95%     34
  98%     90
  99%    591
 100%   9033 (longest request)
<Connector port="8080" protocol="org.apache.coyote.http11.Http11AprProtocol"

ab -n 500000 -c 600 http://172.17.6.203:8080/examples/jsp/jsp2/el/basic-comparisons.jsp

Concurrency Level:      600
Time taken for tests:   40.567 seconds
Complete requests:      500000
Failed requests:        0
Write errors:           0
Total transferred:      1247000000 bytes
HTML transferred:       1121000000 bytes
Requests per second:    12325.19 [#/sec] (mean)
Time per request:       48.681 [ms] (mean)
Time per request:       0.081 [ms] (mean, across all concurrent requests)
Transfer rate:          30018.58 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    6 107.7      3    3014
Processing:     0   42  70.7      7    1754
Waiting:        0   41  68.1      7    1745
Total:          1   49 130.1     10    3285

Percentage of the requests served within a certain time (ms)
  50%     10
  66%     33
  75%     64
  80%     86
  90%    134
  95%    165
  98%    211
  99%    251
 100%   3285 (longest request)