I am trying to write a message transformation application using JRuby. This
is a web-app to be deployed in Tomcat.
When I benchmarked this new app written in JRuby (with some Java
components), with the earlier app written in Java I saw a major performance
drop when the load (measured in requests per second) on the application is
increased.
However, when there is very less load (Tomcat is handling only one request
at a time), the performance is almost same as that of Java.

To demonstrate this problem I have written a small standalone app. 
The application adds up 5000 integers (all less than 1001)
Multiple threads are spawned and each thread performs the addition a few
number of times

As the number of threads are increased, the performance difference between
the JRuby and Java version keeps getting larger.

The results are same even after using the server mode with sufficient warmup

Download the app to run and look at the times. Source is included
http://www.nabble.com/file/p21053077/StandAloneXformation.zip
StandAloneXformation.zip 

I want to know whether this kind of performance degradation is
known/expected. 

A few pointers on what can be done to bring the performance close to Java
even at higher loads would be a great help.

The results on my Win32 machine are follows:
 Threads   JRuby   Java
=======================
5             28.18     21.50
10           59.24     22.20
15          125.10    22.92
20          155.54    23.42
25          194.19    28.68

These are average times in milliseconds
-- 
View this message in context: 
http://www.nabble.com/Major-performance-slowdown-while-multithreading-%28Java-Vs-JRuby%29-tp21053077p21053077.html
Sent from the JRuby - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to