Wednesday, December 26, 2007

Real World Performance On Boxing Day

Well, Ruby 1.9.0 landed yesterday, as expected. I’d be remiss if I didn’t start out by thanking matz, ko1, and all the other hackers involved in getting this milestone release out the door. It’s a great step for Ruby, and one that we’ve been waiting a long time for.

The bad news is that 1.9.0 is just a development release branch leading up to 2.0, and it doesn’t yet run Rails or Mongrel. There have been some scattered results on the mailing list of other problems as well. I’m sure they’ll get ironed out over the next several releases (which I hope will be frequent during the next year). There’s even a 1.9 specific library already—rev was released earlier this morning.

Fortunately, 1.9.0 is able to run LogWatchR just fine, so I’ve rolled out a new set of results from my ‘Real World Performance Test’. I hadn’t yet run a test using the JRuby 1.0.3 release, so I’ve included that as well. This time, I decided to show you the raw data for each version of Ruby I tested as well as the final results. I’m still using Ruby 1.8.5-12 for my baseline, as that’s our standard version at work (we may convert to JRuby 1.1 once that’s available—we’ll see). In any case, here are the numbers:

Ruby 1.8.5-12 Ruby 1.9.0-14709 JRuby 1.0.3 JRuby 1.1b
11.40 10.53 28.07 20.97
10.56 10.70 26.67 18.99
10.39 10.36 22.04 18.76
10.47 10.41 21.95 20.43
10.49 10.41 21.79 18.76
10.41 10.53 21.97 18.86
10.81 10.42 22.45 19.35
10.43 10.84 22.23 18.97
10.97 10.34 21.81 19.03
10.41 10.39 21.78 21.43

And here are the results:

  Ruby 1.8.5-12 Ruby 1.9.0-14709 JRuby 1.0.3 JRuby 1.1b
Average 10.63 10.49 23.08 19.56
Std Dev 0.33 0.16 2.3 1.0
Perf 100.00% 101.34% 46.08% 54.38%

I was a bit discouraged to see that 1.9.0 isn’t that much faster for my needs. JRuby is still slow for me too, but the regexp work that Charlie and the boys have been working on holds a lot of promise, I think JRuby 1.1b2 will tell a different story. I’m anxious to see rubinus, but it’s not quite there yet.

Update: Someone on reddit asked why there's not more background on what these numbers mean. I've got more information in some of my previous posts on the topic:

The short story is that the times above are the time required for LogWatchR to run through about 75,000 syslog entries (about 20 minutes worth) and report on known bad or unknown log entries.

7 comments:

Aurelien said...

here the correct link for rubinius, http://rubini.us/

thanks for these benchmarks, really interesting.

pate said...

aurelien,
thanks for the correction, I've fixed it in the post.

Glad you liked the benchmarks.

lopex said...

JRuby trunk has joni merged already. Here are some results Tim Bray posted for heavy regexp scripts lately: http://www.tbray.org/ongoing/When/200x/2007/12/18/Ruby-Stats

pate said...

lopex: yeah, I'm looking forward to the 1.1b2 release so that I can run them through my tests. I'm sure there's going to be a big jump in performance.

han said...

Just a small correction: This release leads to 1.9.1 as the stable release, expected sometime next spring, not 2.0.

Isaac Gouy said...

What flags are you passing through to the JVM?

jruby -J-server -J-Xbatch -O

pate said...

Isaac,
I'm using

JAVA_OPTS="-Djruby.objectspace.enabled=false -Djruby.jit.enabled=true -server"

jruby -C logwatcher.rb < log_sample