Based on this article http://blog.saush.com/?p=208 I have created a
simple speed test application to see how JRuby behaves under JAVA
server. I created one controller with simple method that provides actual
time for view. View is RHTML with simple code for publishing the time
provided by controller.
Then a packed the application into WAR(described in article) and
published under JBoss 4.0.5 (on WinXP, 1GB RAM, Centrino Duo 1.8GHz) and
latest JRuby 1.0 . Checking using a browser I can see, the application
is running fine. Then I used ApacheBench to stress the application.
Results seems to be great.
For
ab -n 1000 -c 20 http://localhost/jrails/company/index
… I can get up to 500req/sec . Its unbelievable for me. It leads me to
think if there is any bug/problem I cant see. Can someone help to
understand or do you have some results to compare?
Server Software: Apache-Coyote/1.1
Server Hostname: localhost
Server Port: 8080
Document Path: /jrails/company/index
Document Length: 1135 bytes
Concurrency Level: 20
Time taken for tests: 2.328125 seconds
Complete requests: 1000
Failed requests: 19
(Connect: 0, Length: 19, Exceptions: 0)
Write errors: 0
Non-2xx responses: 981
Total transferred: 1451456 bytes
HTML transferred: 1114784 bytes
Requests per second: 429.53 [#/sec] (mean)
Time per request: 46.563 [ms] (mean)
Time per request: 2.328 [ms] (mean, across all concurrent
requests)
Transfer rate: 608.64 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 2.3 0 15
Processing: 0 44 75.2 31 890
Waiting: 0 43 74.5 31 890
Total: 0 45 75.1 31 890
Percentage of the requests served within a certain time (ms)
50% 31
66% 31
75% 46
80% 46
90% 78
95% 93
98% 234
99% 406
100% 890 (longest request)