updated:
rails-asyncweb is released. please visit http://rails-asyncweb.sourceforge.net/
今週の土曜日にあるJava EE勉強会で報告を行ないます。その準備があるため、しばらくさわれなくなるとおもいますので、途中経過のものになりますが、公開したいとおもいます。
完全マニア向けのもので、説明は一切ありません。テストは通りませんので、skipしてあげてください。mvn -Dmaven.test.ski=true package && ant runでport 3000をlistenします。
ちなみに、ベンチマークをとってみたところ、JRubyでWEBRickを利用したときよりも、5倍の速度を出しています!
takai@kafka% ab.exe -n 50 http://localhost:3000/welcome
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient).....done
Server Software: WEBrick/1.3.1
Server Hostname: localhost
Server Port: 3000
Document Path: /welcome
Document Length: 3794 bytes
Concurrency Level: 1
Time taken for tests: 221.734375 seconds
Complete requests: 50
Failed requests: 0
Write errors: 0
Total transferred: 203050 bytes
HTML transferred: 189700 bytes
Requests per second: 0.23 [#/sec] (mean)
Time per request: 4434.688 [ms] (mean)
Time per request: 4434.688 [ms] (mean, across all concurrent requests)
Transfer rate: 0.89 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 3.0 0 15
Processing: 3734 4433 490.8 4391 6734
Waiting: 3734 4424 488.7 4375 6703
Total: 3734 4433 490.8 4406 6734
Percentage of the requests served within a certain time (ms)
50% 4406
66% 4500
75% 4687
80% 4796
90% 4984
95% 5109
98% 6734
99% 6734
100% 6734 (longest request)
takai@kafka% ab.exe -n 50 http://localhost:3000/welcome
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient).....done
Server Software: AsyncWeb
Server Hostname: localhost
Server Port: 3000
Document Path: /welcome
Document Length: 6735 bytes
Concurrency Level: 1
Time taken for tests: 40.984375 seconds
Complete requests: 50
Failed requests: 0
Write errors: 0
Total transferred: 349000 bytes
HTML transferred: 336750 bytes
Requests per second: 1.22 [#/sec] (mean)
Time per request: 819.688 [ms] (mean)
Time per request: 819.688 [ms] (mean, across all concurrent requests)
Transfer rate: 8.30 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 3.0 0 15
Processing: 718 818 175.9 781 1875
Waiting: 718 815 175.4 781 1875
Total: 718 818 175.8 781 1875
Percentage of the requests served within a certain time (ms)
50% 781
66% 812
75% 812
80% 828
90% 843
95% 875
98% 1875
99% 1875
100% 1875 (longest request)
Updated:
Under production mode, JRuby on Rails with AsyncWeb is 10 times faster than with WEBrick.
takai@kafka% ab.exe -n 50 http://localhost:3000/welcome This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient).....done Server Software: WEBrick/1.3.1 Server Hostname: localhost Server Port: 3000 Document Path: /welcome Document Length: 3704 bytes Concurrency Level: 1 Time taken for tests: 224.531250 seconds Complete requests: 50 Failed requests: 0 Write errors: 0 Total transferred: 198550 bytes HTML transferred: 185200 bytes Requests per second: 0.22 [#/sec] (mean) Time per request: 4490.625 [ms] (mean) Time per request: 4490.625 [ms] (mean, across all concurrent requests) Transfer rate: 0.86 [Kbytes/sec] received snip...
takai@kafka% ab.exe -n 50 http://localhost:3000/welcome This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient).....done Server Software: AsyncWeb Server Hostname: localhost Server Port: 3000 Document Path: /welcome Document Length: 6633 bytes Concurrency Level: 1 Time taken for tests: 21.515625 seconds Complete requests: 50 Failed requests: 0 Write errors: 0 Total transferred: 343900 bytes HTML transferred: 331650 bytes Requests per second: 2.32 [#/sec] (mean) Time per request: 430.313 [ms] (mean) Time per request: 430.313 [ms] (mean, across all concurrent requests) Transfer rate: 15.57 [Kbytes/sec] received snip...
コメント (2)
My apologies for commenting in English.
These are exciting numbers. Be sure you are running Rails in "production" mode. JRuby on Rails in "production" mode responds very quickly even through WEBrick. I would expect it to be even faster with AsyncWeb. AsyncWeb could compete with Mongrel for Rails throughput.
投稿者: Charles Oliver Nutter | 2006年10月18日 18:32
日時: 2006年10月18日 18:32
Thanks for comment, Nutter-san.
Under production mode, JRuby on Rails with AsyncWeb is 10 times faster than with WEBrick.
I'll post to JRuby list when I release.
投稿者: takai | 2006年10月18日 21:36
日時: 2006年10月18日 21:36