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

Christopher Bailey chris at codeintensity.com
Wed Feb 28 01:02:58 EST 2007


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.

So, as per Zed's email, let's say you establish your baseline of what your
Apache and 1 Mongrel can do.  Let's say that's 450 req/sec and since it's
single, that's 450 conn/sec, as a result of this command:

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.

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

This doubles the rate, and doubles the number of connections, but since I
have a supposed double handling capacity, I should yield the same total time
(of 10 seconds).  Is that right?  Watching this in top I do see that both
Mongrels are grabbing CPU time.

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.


On 2/27/07, Christopher Bailey <chris at codeintensity.com> wrote:
>
> When you are testing Apache, is it configured exactly the same as when you
> are using it to front Mongrel?  i.e. do you have the mod_proxy_balancer
> module setup and configured, with Mongrel running, etc.?  I am doing that.
> So, it's likely I could get it faster if I didn't have any of that.
>
>
> On 2/27/07, Kirk Haines <wyhaines at gmail.com> wrote:
> >
> > On 2/27/07, Christopher Bailey <chris at codeintensity.com> wrote:
> >
> > > What I'm running into is that Mongrel appears only half as fast as
> > Apache
> > > when serving a small static HTML file.  If I then add in Apache with
> > > mod_proxy_balancer, going to a single Mongrel, it drops down to nearly
> > about
> > > a third of what pure static Apache will do.  This seems bogus to me,
> > and I
> > > suspect I have either some configuration problem, or something.  My
> > > understanding from what I've read is that Mongrel should be fairly
> > close to
> > > Apache when serving static content (at least not only 50% as
> > fast).  Is that
> > > right as a generalization?
> >
> > That may not be far off at all, and that difference between going
> > directly to Mongrel versus going through Apache with proxying that you
> > report is about what I have seen.
> >
> > > - Just Apache, num-conns=15000, ~1400 req/sec
> >
> > That actually seems really slow.  My box is a lot slower than yours
> > (dual 2ghz 32 bit AMD processors on 2gb RAM, older kernel, slower
> > disk), and I get twice that speed through Apache (2.0) to a small
> > static file.  About 2800/second.
> >
> > > - Direct to Mongrel on port 5000, num-conns=8000, ~740 req/sec
> >
> > This is close to what I have seen in my direct-to-mongrel tests,
> > though I get speeds that are a little bit higher.  In the 800+
> > req/second range.  I don't think anything is wrong with your tests.
> >
> >
> > Kirk Haines
> > _______________________________________________
> > 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/20070227/502b2de0/attachment.html 


More information about the Mongrel-users mailing list