关于springboot和tomcat的服务能力做下简单的测试

一、测试springboot结果

This is ApacheBench, Version 2.3 <$Revision: 1748469 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 172.16.10.6 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:
Server Hostname: 172.16.10.6
Server Port: 8897

Document Path: /hello
Document Length: 20 bytes

Concurrency Level: 1
Time taken for tests: 33.157 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 153000 bytes
HTML transferred: 20000 bytes
Requests per second: 30.16 [#/sec] (mean)
Time per request: 33.157 [ms] (mean)
Time per request: 33.157 [ms] (mean, across all concurrent requests)
Transfer rate: 4.51 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 6 15 60.6 8 1302
Processing: 8 17 27.5 12 508
Waiting: 7 15 22.7 11 454
Total: 14 32 66.9 21 1324

Percentage of the requests served within a certain time (ms)
50% 21
66% 24
75% 26
80% 27
90% 34
95% 119
98% 142
99% 154
100% 1324 (longest request)

 

二、tomcat的测试结果

Benchmarking 172.16.10.6 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software: Apache-Coyote/1.1
Server Hostname: 172.16.10.6
Server Port: 8097

Document Path: /fgl-test-war/hello
Document Length: 16 bytes

Concurrency Level: 1
Time taken for tests: 32.010 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 2111000 bytes
HTML transferred: 16000 bytes
Requests per second: 31.24 [#/sec] (mean)
Time per request: 32.010 [ms] (mean)
Time per request: 32.010 [ms] (mean, across all concurrent requests)
Transfer rate: 64.40 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 6 15 61.2 8 1412
Processing: 8 16 29.8 11 727
Waiting: 7 14 18.8 10 225
Total: 14 31 70.0 20 1422

Percentage of the requests served within a certain time (ms)
50% 20
66% 22
75% 24
80% 25
90% 30
95% 119
98% 138
99% 143
100% 1422 (longest request)

 

三、结论

测试结果可能不准确,但是,感觉springboot的内嵌tomcat并不需要优化

posted @ 2018-01-10 17:43  构建巨人肩膀  阅读(256)  评论(0编辑  收藏  举报