Maybe I Spoke Too Soon 2

Posted by Matt on July 24, 2008

A couple weeks ago I ran a few benchmarks on Passenger vs. Mongrel. I found that Passenger was much slower than Nginx and Mongrel. Today I read that the Rails Wiki is now running on Passenger; my curiousity piqued, I checked out the site.

Much to my surprise, the site was amazingly responsive.

Alright. Did I do something wrong? Perhaps I missed something? I created a fresh Amazon EC2 instance (m1.large if interested), and recreated my earlier Passenger setup. One thing that I did notice that I may have done differently this time was that I might not have installed my gems with the freshly installed Ruby Enterprise Edition (REE).

(Which looks something like this:)

/opt/ruby-enterprise-1.8.6-20080709/bin/ruby /opt/ruby-enterprise-1.8.6-20080709/bin/gem install aws-s3

One other thing might be that I commented out the 'PassengerRuby' line when I updated Apache's config to use REE.

#PassengerRuby /usr/bin/ruby
RailsRuby /opt/ruby-enterprise-1.8.6-20080709/bin/ruby

Either way, I reran the benchmarks and was really quite surprised:


benchmark_2

So what does this all mean? Who wins?

Good question.

It seems that both of the benchmarks are slower than those previously run! My conclusion is that results all over the place as network conditions obviously affect response time. For the sake of clarity, I've used a 15Mb/2Mb connection for all benchmarks.

This time around REE seems much more responsive than it did before all the while using 1.35 less load than its Nginx/Mongrel counterpart. The Nginx instance seems about as responsive as it normally feels, but the difference in load is quite an eye opener. This information coupled with Passenger's ease of use make it quite the contender.

I think I'll try Passenger for a while on my production server. It's easier to maintain and hell, maybe even faster. I'll report back with further findings.