Hacker News new | past | comments | ask | show | jobs | submit login
Modrails outperforms Mongrel (statsheet.com)
43 points by johnbb on July 15, 2009 | hide | past | favorite | 28 comments



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.


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.


Possibly, but wouldn't know without testing that.

Still doesn't address the global queue issue.


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/


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.


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.


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...


>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.


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.


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.


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.


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.


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


I agree, Mongrel was a real boon when the alternatives paled in comparison.


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.


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?


Same Ruby binary. Passenger is magic.


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.)


http://www.modrails.com/documentation/Users%20guide%20Apache...

You probably want to have a look at the appendices.


See "developer documentation" at http://modrails.com/development.html


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


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.


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...

Docs: http://www.modrails.com/documentation/Users%20guide%20latest...

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


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


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


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


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/


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: