I’ve recently been testing jruby vs REE/Passenger. I’ve got a rails v
2.3.2 project using mysql as a backend. I’ve used jruby/mongrel and
the glassfish gem. I can’t get it running on Glassfish server for
some odd reason (always give me a “Module not recognized” error when
I deploy).
Anyway, in all my testing, jruby is showing to be slower than REE
running under passenger or even REE running mongrel running the site.
When I run benchmarks like the one from Charles’ blog – the Takeuchi
function, jruby smokes REE.
Is what I’m seeing normal?
Thanks,
–
Marlon
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
How many requests are you running through to gather your numbers? I’ve
found that it usually takes a couple hundred requests to get JRuby
warmed up
enough to really start seeing benefits. I use the Apache bench command
line
tool to run a few thousand requests through my application. While the
requests run you can see the moment the compiler kicks in the requests
start
going through so much faster. Remember both the JVM itself and your
Ruby
code need to get warmed up and optimized before you will see benefits.
From my experience JRuby 1.3 and the Glassfish Gem were always faster
than
passenger or mongrel.
Joe
Thanks for turning me on to Apache Bench…I was using httperf and
getting confusing results. I’ve got both the glassfish gem and
glassfish server v3 installed on my system and I think me tinkering
with both of them might have borked them. After I gave up on trying
to get glassfish server working, I was able to get the gem to respond
roughly as fast as Ruby 1.9 running webrick.
Now, both jRuby and Ruby1.9 are multitudes faster than Ruby1.8. On my
system though, Ruby1.9 fronted by passenger is definitely the fastest
option right now.
Still, it’s awesome to have all these different deployment options
available!
On Mon, Jun 22, 2009 at 9:56 AM, Marlon M.[email protected] wrote:
available!
We’ve really only scratched the surface of optimizing JRuby’s core for
frameworks like Rails, and I suspect a lot more will come in the
future. We didn’t consistently run Rails faster than MRI until the 1.2
release a few months ago, so the fact that we post consistently better
numbers now is very promising.
If you have any specific areas that appear to be slower under JRuby,
we would very much like to hear about them. But it sounds like you’ve
managed to get the solid performance you were hoping for, and we’ll
continue to improve in the future
One thing that’s useful to note about JRuby versus Ruby 1.9: There’s
no way to run a single instance of Ruby 1.9 for an entire multi-core
box, since it does not yet run threads concurrently. So that’s one
advantage we have (above and beyond the JVM and Java ecosystem).
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email