Apache 2.2 / mod_proxy_balancer... 160 req per second?

I’m testing a deployment on a dedicated server (dual core AMD with
about 2GB ram, 100Mbps uplink) with Apache 2.2.3 (CentOS 5 build from
yum), mod proxy balancer, and mongrel.

I can get Apache to serve static files at around 1200 requests per
second, which I am happy with. However I can’t get dynamic pages
(hello world controller through mongrel) to go more than 160 req per
second. One mongrel gives me about 90, then 2 or more is 160. So the
benefits seem to max out at only 2 mongrels.

I’ve used all the different conf files out there (everyone’s seem to
look completely different), but the result is basically the same.

I found this in the Mongrel docs:

"Jason Hoffman reports:

Apache's mod_proxy_balancer module is a fully blocking module and

with the default httpd.conf you’re going to max out in the 120-160
requests/ second range on a decent box. You can tune up its proxying
to about a 1000 req/sec. So yes the net result is that you can really
only put a couple of mongrels behind apache’s proxy engine (about 2
“hello world” rails mongrels)."

Can’t find any more documentation on the subject though. Any ideas?
I’m aware of nginx and would love to test it out someday, but for now
I’d like to know what apache is capable of. I’ve seen enough people
recommending it to think that there must be a way to get better than
160 requests per second.

Any ideas? Thanks

Apache's mod_proxy_balancer module is a fully blocking module and

with the default httpd.conf you’re going to max out in the 120-160
requests/ second range on a decent box. You can tune up its proxying
to about a 1000 req/sec. So yes the net result is that you can really
only put a couple of mongrels behind apache’s proxy engine (about 2
“hello world” rails mongrels)."

Hm, would that still be accurate if you set DEFAULT_SERVER_LIMIT to a
higher
value (from 256 up to 2048 or so) and then set MaxClients to that value?
Wouldn’t that open things up a bit?

Yours,

Tom

But wouldn’t that setting also be affecting serving of static pages?
Right now I am getting 5000-8000 requests per second locally or about
1200 over the wire for static files through Apache.

I was able to get 185 requests per second out of Mongrel, but that is
still a bit underwhelming. I spent a few hours today studying the
Apache docs and settings for mod_proxy and mod_proxy_balancer and
testing different configs, but nothing made much difference.

Right now a single mongrel process (not behind Apache) is pushing
90-100 requests per second with my real app (not just a hello world
controller). So I am at a loss as to how the benefits are maxing out
at 2 mongrels when behind Apache.

question from a beginner…
i thought one can instantiate as many mongrels per ~60mb of memory
installed?

On Sat, 2008-01-19 at 01:16 -0800, Jeff wrote:

But wouldn’t that setting also be affecting serving of static pages?
Right now I am getting 5000-8000 requests per second locally or about
1200 over the wire for static files through Apache.

Yup, true, that would give you more static file capacity too.

I was able to get 185 requests per second out of Mongrel, but that is
still a bit underwhelming. I spent a few hours today studying the
Apache docs and settings for mod_proxy and mod_proxy_balancer and
testing different configs, but nothing made much difference.

Right now a single mongrel process (not behind Apache) is pushing
90-100 requests per second with my real app (not just a hello world
controller). So I am at a loss as to how the benefits are maxing out
at 2 mongrels when behind Apache.

I’m probably not understanding… so right now you’re running Mongrel
as both your web server and as your app container, is that right?

Yours,

Tom

Here’s a wiki I wrote awhile ago for deploying a mongrel cluster.
http://pastie.caboo.se/143470

I was really confused about what “thin” you are talking about until I
found
http://www.rubyinside.com/thin-a-ruby-http-daemon-thats-faster-than-mongrel-688.html

aemadrid wrote:

I would definitely give Thin a try. I got over 500 rps on a simple
hello world dynamic page.

AEM

I would definitely give Thin a try. I got over 500 rps on a simple
hello world dynamic page.

AEM

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs