# Running test Rails app under JRuby and JBoss - experiences

**URL:** <https://www.ruby-forum.com/t/running-test-rails-app-under-jruby-and-jboss-experiences/106316>\
**Category:** Rails\
**Created:** [June 8, 2007, 2:41pm UTC](https://www.ruby-forum.com/t/running-test-rails-app-under-jruby-and-jboss-experiences/106316 "2007-06-08T14:41:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [June 8, 2007, 2:41pm UTC](https://www.ruby-forum.com/t/running-test-rails-app-under-jruby-and-jboss-experiences/106316/1 "2007-06-08T14:41:09Z")

</div>

Based on this article [http://blog.saush.com/?p=208](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](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)

---

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [June 8, 2007, 10:16pm UTC](https://www.ruby-forum.com/t/running-test-rails-app-under-jruby-and-jboss-experiences/106316/2 "2007-06-08T22:16:19Z")

</div>

On Jun 8, 2007, at 5:41 AM, David M. wrote:

> Failed requests: 19  
> (Connect: 0, Length: 19, Exceptions: 0)  
> Write errors: 0  
> Non-2xx responses: 981

You are not hitting a valid page or its returning an error or  
redirect, that is why its so fast, See how 981 are non 2xx responses?  
This means that they either failed or just did a redirect.

Cheers-

– Ezra Z.  
– Lead Rails Evangelist  
– removed\_email\_address@domain.invalid  
– Engine Y., Serious Rails Hosting  
– (866) 518-YARD (9273)
