开发者

rails using jruby 1.5 - slow!

I'm currently using pas开发者_如何学编程senger with ree 1.8.7 in production for a rails 2.3.5 project using postgresql as a database.

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(TM) 64-Bit Server VM 1.6.0_16) [amd64-java]

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

Thanks, Corin


I just installed 1.4.1 and optimized 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(TM) 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜