

Modrails outperforms Mongrel - johnbb
http://statsheet.com/blog/passenger-nginx-much-better-than-mongrel-at-least-for-statsheet/

======
blasdel
It doesn't look like this has _ANYTHING_ to do with Mongrel, Apache, or HTTP
at all!

He had ridiculous memory leaks from ActiveRecord/Rails under the older
'stable' version of Ruby he was using with Mongrel. When he switched to
Passenger, which uses a patched/forked version of Ruby (the hilariously named
"Ruby Enterprise Edition"), his Rails memory leak went away.

~~~
blader
This is correct. It's REE - mod_rails has almost nothing to do with these
results.

REE alone halved our response times and our memory usage across our Rails
cluster. We're stll on mongrel/nginx.

------
ionfish
While it's certainly true, at least in my experience, that Passenger is both
easier to set up and demands fewer system resources than a Mongrel cluster,
there's a third vital factor: Passenger works just fine with Ruby 1.9, whereas
Mongrel doesn't. This, ultimately, was the reason I switched.

Coincidentally, I ran up an article on shifting my server to Ruby 1.9 earlier
today. It might be of interest to anyone considering it.

<http://extralogical.net/2009/07/ruby-one-niner/>

~~~
Andys
Ironically mongrel & dependencies only require a handful of lines of patching
to work on 1.9 - the fact that no one has bothered for many months now shows
just how unpopular mongrel has become.

~~~
sho
Isn't it being maintained by Evan Weaver (twitter) these days? He made some
ridiculous stand against 1.9 ages ago, maybe he refuses to update the gem
based on that. No other good explanation I can think of, the changes are
trivial.

------
judofyr
I think Peter Cooper said it well: Mongrel was just a stop gap to better
solutions.

It's certainly better than WEBrick, but it's not really The Most Awesome Thing
Ever. The reason sysadmins didn't want to tell about Mongrel, might be because
it was a pain in the ass to setup and to make sure it didn't went down. It was
one of those things you just never wanted to touch again...

~~~
mishmash
>It was one of those things you just never wanted to touch again...

Not in my experience, but regardless, for those of use that were there in the
beginning (think Rails on FastCGI), Mongrel was one HELL of a nice stop gap.

Thanks Zed.

~~~
jfno67
Mongrel was effectively so much better than using FastCGI and it served well
for a time. Now passenger is a step in the right direction, easier to setup
and monitor.

We had some memory consumption problems also when we decided to migrate and
just switching to passenger did little for those. It was really the switch to
REE that made the difference. Also the memory was not really from complex
database operation, it was for rendering huge erb templates for the
Googlebots. In the end there were no reason to always generate those templates
and caching solved the problem definitively, but with REE it was already
acceptable and we could have let it be for some months too.

~~~
mishmash
I haven't personally switched away from Mongrel yet, but the community seems
to agree with you and Passenger/REE probably are the "future" (er, current?)
best deployment method - which is fine by me.

What bothers me, though, is how for some at least, Mongrel must be completely
vilified before Passenger is able to become the next in a long line of Ruby
deployments progressions.

Idk, I just don't understand the need for those type of motivations.

~~~
carbon8
Or, perhaps, rather than some grand plan to vilify mongrel in order to pave
the way for passenger, people are simply expressing their views and opinions.

~~~
mishmash
Yeah you may be right, but these almost "religious" deployment transition seem
familiar to me, remembering...

FastCGI -> LigHTTP (+others) -> Mongrel -> Passenger, and it seems like we've
had a crucifixion at each stage of development.

But idk and it's late.

~~~
goodgoblin
I think at each stage the vitriol has decreased as a function of the maturity
of the solutions. FastCGI was desperately bad.

------
gamache
I noticed very similar effects to what are reported here: after moving from
Mongrel to Passenger, my memory footprint went WAY down. Leaks went from "holy
crap, what am I gonna do??" to "site is working, let's drink beer."

Passenger* is just superb. I kicked Phusion a few bucks, and if you are as
pleased as I am then I hope you do too.

* at least on Apache. Passenger on Nginx would crash for me after about a week, so I went back to mongrel_cluster on my non-Apache setup.

~~~
hachiya
I wonder if this also involved switching the Ruby binary to the Ruby
Enterprise Edition? Or did you move to Passenger and keep the same Ruby
binary?

~~~
gamache
Same Ruby binary. Passenger is magic.

------
jrockway
Is there any technical documentation on mod_rails? I would like to read about
the approach it takes, without having to dive into the source code. (I don't
have any Ruby experience, and my Apache internals knowledge is probably
dated.)

~~~
carbon8
See "developer documentation" at <http://modrails.com/development.html>

~~~
FooBarWidget
This document is slightly outdated but still relevant for the most part.

------
grandalf
This is a fairly lame article. There are a lot of good posts comparing the two
but this is a waste of time to click on.

------
padmapper
mod_rails/Phusion Passenger is indeed awesome - getting set up on production
was a cinch, and no babysitting has been required at all... it just works.

If you use it, consider turning on global queueing for extra special goodness:
[http://blog.phusion.nl/2008/10/29/phusion-passenger-now-
with...](http://blog.phusion.nl/2008/10/29/phusion-passenger-now-with-global-
queuing/)

Docs:
[http://www.modrails.com/documentation/Users%20guide%20latest...](http://www.modrails.com/documentation/Users%20guide%20latest.html#PassengerUseGlobalQueue)

EDIT: (Using with Apache, no experience using nginx)

------
Oompa
Out performs Mongrel and easier to set up. mod_rack is awesome :)

------
callmeed
I wonder if this means EngineYard and other Rails hosts will start
using/supporting it.

~~~
ezmobius
We already support passenger and have for some time now. It works very well
for most cases but mongrel is still a better choice for some apps that can't
run on passenger because of threading use or the need to use amqp etc

~~~
sho
You probably saw this already, but someone on the rb-amqp list wrote a library
enabling use of amqp inside passenger:
<http://github.com/danielsdeleo/qusion/>

------
omarqureshi
Is the information on this statsheet available on a BSD license?

