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