Jruby + rails 2.3.5 + glassfish gem performance problems

Hi!

I’m currently using passenger with ree 1.8.7 in production for a rails
2.3.5 project using postgresql as a database. Current performance:

ab -n 10000 -c 100: 285.69 [#/sec] (mean)

I read jruby should be the fastest solution, so I installed
jruby-1.5.0.rc2 together with jdbc postgres adapter and glassfish. As
the performance is really poor, I also started running my application
using “jruby --server -J-Druby.jit.threshold=0 script/server -e
production”. Anyway, I only get

ab -n 10000 -c 100: 43.88 [#/sec] (mean)

Thread_safe! is activated in my rails config. Java seems to use all
cores, cpu usage is around 350% (top).

ruby -v: jruby 1.5.0.RC2 (ruby 1.8.7 patchlevel 249) (2010-04-28
7c245f3) (Java HotSpot™ 64-Bit Server VM 1.6.0_16) [amd64-java]

I also tried 1.4.1 and an optimized version of my glassfish config. But
it doesn’t help at all:

poor 50.61 [#/sec] (mean)

jruby 1.4.1 (ruby 1.8.7 patchlevel 174) (2010-04-26 ea6db6a) (Java
HotSpot™ 64-Bit Server VM 1.6.0_16) [amd64-java]

-server -Dcom.sun.akuma.Daemon=daemonized -Xmx2500m -Xms64m
-XX:PermSize=256m -XX:MaxPermSize=256m -XX:NewRatio=2
-XX:+DisableExplicitGC -Dhk2.file.directory.changeIntervalTimer=6000
-server -Djruby.memory.max=500m -Djruby.stack.max=1024k -Xss1024k
-Djna.boot.library.path=/usr/local/rvm/rubies/jruby-1.4.1/lib/native/linux-amd64:/usr/local/rvm/rubies/jruby-1.4.1/lib/native/linux-i386
-Djffi.boot.library.path=/usr/local/rvm/rubies/jruby-1.4.1/lib/native/i386-Linux:/usr/local/rvm/rubies/jruby-1.4.1/lib/native/s390x-Linux:/usr/local/rvm/rubies/jruby-1.4.1/lib/native/x86_64-Linux
-Xbootclasspath/a:/usr/local/rvm/rubies/jruby-1.4.1/lib/jruby.jar:/usr/local/rvm/rubies/jruby-1.4.1/lib/bsf.jar
-classpath
/usr/local/rvm/rubies/jruby-1.4.1/lib/jruby.jar:/usr/local/rvm/rubies/jruby-1.4.1/lib/profile.jar:
-Djruby.home=/usr/local/rvm/rubies/jruby-1.4.1
-Djruby.lib=/usr/local/rvm/rubies/jruby-1.4.1/lib -Djruby.script=jruby
-Djruby.shell=/bin/sh org.jruby.Main
/usr/local/rvm/gems/jruby-1.4.1/bin/glassfish

I wonder what I’m doing wrong and how to get better performance with
jruby than with ree?

Thanks,
Corin


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Try using trinidad, and make sure to config it to use --threadsafe.
Just to rule out any kind of misconfiguration of glassfish. Does your
process get the right memory settings? I notice there is
“-Djruby.memory.max=500m” in your config.

On Fri, Apr 30, 2010 at 6:17 PM, Corin [email protected] wrote:

-J-Druby.jit.threshold=0 script/server -e production". Anyway, I only get
doesn’t help at all:
-Djna.boot.library.path=/usr/local/rvm/rubies/jruby-1.4.1/lib/native/linux-amd64:/usr/local/rvm/rubies/jruby-1.4.1/lib/native/linux-i386
than with ree?


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs