[Mongrel] Mongrel performing only half as fast as Apache?

Christopher Bailey chris at codeintensity.com
Thu Mar 1 00:45:20 EST 2007

Ok, thanks.  Yes, it seems that basically things are somewhat as expected.
It's definitely a good exercise in knowing how noticeably certain things
(like sessions, etc.) affect the performance.  At this point I've removed
Apache from the mix, as we wouldn't be using it anyway (we use it in dev as
it's what we have now that allows us to easily run static, and multiple
Rails on a single box and balance across that, etc.  But, I will probably
look at Nginx as an alternative.  For my tests I've now switched to Pen as
that seems the least obtrusive, and is about as simple as we could get
before having no software load balance/closes to hardware LB.

On 2/28/07, Zed A. Shaw <zedshaw at zedshaw.com> wrote:
> On Tue, 27 Feb 2007 22:02:58 -0800
> "Christopher Bailey" <chris at codeintensity.com> wrote:
> > Moving forward, I may not understand httperf's num-conns, and rate, as
> > applied to scaling up the number of Mongrels.  Either that, or my server
> has
> > issues.
> >
> > httperf --hog --server lab05 --port 80 --uri /mongrel_alive.html
> --num-conns
> > 4500 --rate 450
> >
> > This gives me back 10 seconds of time, and 450 req/sec, 450 conn/sec.
> Try inching that up incrementally until you find the "sweet spot".
> It's probably going to be 450 or near it, but try 500.  You'll know you
> passed the sweet spot when the req/sec crashes suddenly.  I do kind of
> a binary search algo until I find the right number.
> > So, now I add a Mongrel into the mix, restart Apache, etc.  I would
> think
> > that I can now use:
> >
> > httperf --hog --server lab05 --port 80 --uri /mongrel_alive.html
> --num-conns
> > 9000 --rate 900
> You won't get 900 right away, especially since you have one CPU and are
> maxing them out but if you get 350 req/sec then try again inching it
> down until you get a steady number.  Try 800 to see if that gives you
> 800 req/sec, then further down until you get it, then inch up to see
> where the sweet spot is.
> > In my case it starts breaking down with just two Mongrels (and to be
> clear,
> > I was not running top during the tests).  I drop to about 350 req/sec
> > without errors.
> Yep, and that's just kind of the way it goes.  In your case, having
> more mongrels isn't going to get you higher performance, so just add
> one more mongrel and use your mongrel processes more to ensure
> concurrency when running Rails.  Also, you haven't even hit testing
> your rails performance yet, do that too and just kind of accept it as
> your speed then plan for it.
> --
> Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu
> http://www.zedshaw.com/
> http://www.awprofessional.com/title/0321483502 -- The Mongrel Book
> http://mongrel.rubyforge.org/
> http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070228/5535dcac/attachment.html 

More information about the Mongrel-users mailing list