What happened was, I got a note from Matt (who runs the ongoing server), saying my traffic had suddenly jumped (to like 230G/month) and wondering why. I had no idea, so I whipped up a little Ruby script to break down traffic by resource and host and time-of-day and so on. Then I wondered which version of Ruby would run it fastest?
This is on a 2GHz Intel MacBook running Leopard. The Ruby is the one that comes with the
Mac, the 1.9 was built from svn on 12/17. JRuby 1.1b and the build from trunk
were both run with
-J-server. I tried to run Rubinius but it
wouldn’t build from today’s tarball.
The data is a week’s worth of ongoing logfile ending on December 9th; 222,755,573 bytes in 1,029,073 lines.
The code is just a quick answer-me-this-question hack; I didn’t think about it, I just banged it out. Shows the effects of me having been a Perl user for a decade or more: log.rb, stats.rb.
Comment feed for ongoing:
From: Charles Oliver Nutter (Dec 19 2007, at 01:38)
The improvement between JRuby 1.1b1 and trunk is almost entirely due to Marcin Mielczynski's amazing port of Oniguruma to the JVM. For the first time we have a real byte-based regex engine, which means JRuby regex performance just got a huge boost. There have also been other perf enhancements, but these numbers are probably about where we'll be for a JRuby 1.1 final release next month.