パフォーマンス比較中。
特に現時点では、意図的に何も書きません。
ソースコードは、以下のURLにコミットされているます。
ガシガシ修正しているますが、気になる方はどうぞ。
- https://www.seasar.org/svn/s2container/trunk/employee-benchmark/employee-seasar2-teeda
- https://www.seasar.org/svn/s2container/trunk/employee-benchmark/employee-spring2-struts
色々理由があったりなかったりで、SVNリポジトリの名前を変更いたました。
取りあえず、ApacheBenchでDoSアタックしてみると、こんな感じ。
Seasar側
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Server Software: Apache-Coyote/1.1
Server Hostname: localhost
Server Port: 80
Document Path: /employee-kuina/view/emp/empList.html
Document Length: 17060 bytes
Concurrency Level: 10
Time taken for tests: 136.107387 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 173240000 bytes
HTML transferred: 170600000 bytes
Requests per second: 73.47 [#/sec] (mean)
Time per request: 136.107 [ms] (mean)
Time per request: 13.611 [ms] (mean, across all concurrent requests)
Transfer rate: 1242.98 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.6 0 25
Processing: 47 135 67.4 118 794
Waiting: 47 134 67.3 117 794
Total: 47 135 67.4 118 794
Percentage of the requests served within a certain time (ms)
50% 118
66% 141
75% 159
80% 173
90% 216
95% 265
98% 335
99% 387
100% 794 (longest request)
Spring側
現時点では、僕が、Springについてよく知らない為に、
Spring側は、それなりに不利な部分もあるかと思うます。
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Server Software: Apache-Coyote/1.1
Server Hostname: localhost
Server Port: 80
Document Path: /employee-spring2/empList.do
Document Length: 8057 bytes
Concurrency Level: 10
Time taken for tests: 29.343660 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 83010000 bytes
HTML transferred: 80570000 bytes
Requests per second: 340.79 [#/sec] (mean)
Time per request: 29.344 [ms] (mean)
Time per request: 2.934 [ms] (mean, across all concurrent requests)
Transfer rate: 2762.57 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 3
Processing: 3 28 42.8 13 779
Waiting: 3 28 42.8 13 779
Total: 3 28 42.8 13 779
Percentage of the requests served within a certain time (ms)
50% 13
66% 32
75% 37
80% 40
90% 56
95% 83
98% 148
99% 212
100% 779 (longest request)Spring側をCommons-DBCPを使う様に設定変更後。
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Server Software: Apache-Coyote/1.1
Server Hostname: localhost
Server Port: 80
Document Path: /employee-spring2/empList.do
Document Length: 8057 bytes
Concurrency Level: 10
Time taken for tests: 9.41917 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 83010000 bytes
HTML transferred: 80570000 bytes
Requests per second: 1105.96 [#/sec] (mean)
Time per request: 9.042 [ms] (mean)
Time per request: 0.904 [ms] (mean, across all concurrent requests)
Transfer rate: 8965.36 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 2
Processing: 2 8 7.8 7 201
Waiting: 0 8 7.8 7 201
Total: 2 8 7.8 7 201
Percentage of the requests served within a certain time (ms)
50% 7
66% 8
75% 10
80% 11
90% 14
95% 19
98% 25
99% 32
100% 201 (longest request)