Thursday, May 1, 2008

Some Rails perf numbers on JRuby 1.1.1 part 2 (Linux, JDK 6)

After this post, I got a lot of suggestions to re-run the benchmarks using JDK 6. I'll let you read the previous post to see what exactly I did... here's what the runtime looks like for this run:

  • Ubuntu 7.10 / Dell Latitude D830

  • Ruby 1.8.6

  • JRuby 1.1.1

  • JDK 1.6.0_03

*NOTE: could not run benchmarks without jdbc drivers (jdbcmysql adapter) due to JRUBY-2303

First the Rails console benchmark numbers:

Rails console numbers

[sourcecode language="css"]
5.15 seconds - Ruby console
2.41 seconds - JRuby console (jdbc)

(side-note: re-running the console test with JDK 5 on same machine, best out of 6 runs: 3.31 seconds)

Next the Web Server numbers: (numbers in parens are the number of benchmark runs)

Rails ab numbers

[sourcecode language="css"]
272.84 Mongrel (6)
257.02 GlassFish (40)
235.17 Mongrel (jruby/jdbc) (20)
188.12 Glassfish (-n 2, 20)
179.76 Mongrel (jruby/jdbc) (10)
168.52 Glassfish (6)
161.12 Mongrel (jruby/jdbc) (6)
151.04 Glassfish (-n 2, 6)
131.89 Tomcat 6 (30)
105.72 Tomcat 6 (6)

The console numbers show JDK 6 really kicking in... contrast that with the numbers for actually serving the Rails app and you can see there is still some work to be done to make Ruby on Rails serve faster on the JVM.

Again, not very scientific, just something to show where things stand for now. If you have better benchmarks, please link to them from the comments section below.

No comments: