Monday, June 2, 2008

Inspiration from RailsConf

RailsConf 2008 is over, and it was by far better than last year. I'm not one for drawn-out conference wrap-up posts so here's a summary of my most inspiring moments and if applicable how they're going to affect JRuby going forward.
  • IronRuby and Rubinius both running Rails has inspired me to finally knock out the last Rails bottlenecks in JRuby. Look for a release sometime this summer or later this fall to be accompanied by a whole raft of numbers proving better performance under JRuby than any other options. Oh, and huge congratulations to both teams, and I wish you the best of luck on the road to running larger apps.
  • Phusion's Passenger (formerly mod_rails) has made some excellent incremental improvements to MRI for running Rails. It's nothing revolutionary, but judging by the graphs they've managed 10-20% memory and perf improvements over the next best MRI-based option. We're going to try to match them by more aggressively sharing immutable runtime data across JRuby instances such as parsed Ruby code (which on some measurements accounts for almost 40% of a freshly-started app's memory use). We'd like to be able to say that JRuby is also the most memory-efficient way to run Rails in the near future.
  • The Maglev presentation inspired me to dive back into performance. For the most part, we stopped really working hard on performance once we started to be generally as fast as Ruby 1.9. Now we'll start pulling out all the stops and really kick JRuby into high gear.
  • Wilson Bilkovitch impressed me most when he used the historically-correct "drinking the Flavor-Ade" instead of the incorrect but more popular "drinking the Kool-Aid".
  • Ezra's talk on Vertebra, Engine Yard's upcoming Erlang-based XMPP routing engine, almost inspired me to try out Erlang a bit. Almost. At any rate it sounds awesome...I am all set to write an agent plugin for JRuby when it's released and the protocol is published
  • My keynote was generally pretty well received, but I had several people say I should have smiled more, and that it came off as a bit defensive. I think a lot of that had to do with getting only 10 minutes for the whole thing and trying to jam too much in, but I'll definitely pay attention to that in the future.
  • This was my first US-based Ruby-related conference where I did not play Werewolf. I don't expect to ever play much (or maybe ever) in the future. I've decided I don't really want to play a game where the best players are the ones who can learn to lie most convincingly. It seems like a crucial flaw in the game, and if I ever do play again I will try to make a strong case that to win, kill the most experienced people first. They'll never be a net good, because if they're good villagers with strong deductive skills, they're also likely to be good warewolves, with strong lying skills. Eject them immediately.
All told, a great conference. I'm looking forward to RailsConf EU 2008 and RubyConf 2008.


  1. "[Phusion's Passenger is] nothing revolutionary."

    The thing about Passenger that is so great is that it lets you deploy a Rails app in minutes with minimal effort. I went from not having heard of Passenger to having an app up and running on Slicehost in about 45 minutes. (It would have been less but I paused to make coffee, eat a bowl of cereal, and read a few blog posts.) It is incredibly simple and easy to use. Based on reading their website, that was one of the main design goals.

    There are several other things Passenger brings to the game. The possibility of easily deploying several Rails apps to one server, lower memory usage (= lower cost to run apps), practical shared hosting.

    So for me it pretty much IS revolutionary or a "game changer" or whatever you want to call it. I've been really baffled by the general "eh" reaction in the Rails community.

  2. eeby: I think that with "nothing revolutionary" Charles was referring to Phusion's performance and memory improvements, not to Phusion itself. Anyway, Phusion is nothing revolutionary :-)
    It's "just" a process manager done right, and it will alleviate the pains of deploying for a lot of people.
    As for me, I can deploy an nginx/thin load balanced app with god monitoring in no time, and on a VPS (esp. something like a 256 slice) it makes much more sense: you just have a fixed number of processes based on you RAM size, and not having to use Apache can save you A LOT of memory and A LOT of headaches.
    What's really interesting, IMHO, is their modified Ruby. Having a COW-friendly interpreter is a big win in a *nix environment.

  3. The COW patch they've added to their custom Ruby implementation reduces memory. However, if it's the same one Hong Li submitted to ruby-core, it also reduces speed. So, unless they've made some patches elsewhere, it's going to be _slower_ than MRI.

  4. It's spelled 'Bilkovich', by the way.
    I guess we have to declare blood feud between our clans now, for this shameful misspelling. :)

  5. Daniel: we've chatted Hongli afterwards. Yes, that's the same patch and it makes Ruby slower. They've also linked it with TC Malloc which made it faster. As best as we could tell that's what "enterprise" Ruby is.

    We're going to to look into mod_rails and their ruby patches closer. At this point it seems it seems like a good idea overall, possibly a great one.

  6. eeby: Phusion Passenger is very cool, but it's definitely not "revolutionary". That would imply nothing like it had existed before, and it did (whether with how FastCGI is /meant/ to work, or my own SwitchPipe - now superseded by Passenger). Despite how good it is, it's just an evolutionary step along a path trod by others earlier on.

  7. You sound remarkably like a good werewolf player to me - I say we kill YOU. In fact, your whole post sounds has the weasel stink of a werewolf about it. Werewolf. Say it isn't so.

    (oh no, we killed the little girl again, *sigh*)

  8. jlorenzen: Vertebra slides

    eeby: The deployment thing is very cool, but not revolutionary; JRuby's had as good or better a deployment story for over a year. And the other stuff, as others pointed out, is certainly more of an evolutionary move. Not to belittle the's great that the MRI world is finally catching up with the ease of deployment JRuby offers, and now we'll do some catching up with the memory savings Passenger promises.

    bron: I'm a villager, I swear!

  9. @headius: more informations on what new optimizations you plan to add to JRuby ? BTW, I asked the shootout to update their JRuby implementation to 1.1.2. They still use 1.1, and you did a lot of optimizations between 1.1 and 1.1.2 ;-)

  10. "We're going to try to match them by more aggressively sharing immutable runtime data across JRuby instances such as parsed Ruby code."

    Yay! My gut feeling is that this is a biggie.

    I've been tinkering with JRuby deployment of a small rails app using Warbler, and it works really well. Folks who haven't checked out Warbler should.

  11. @headius: I think that I have to play one Werewolf game with you before I can let you quit. ;)