On Nov 10, 3:10 am, Thadeus Burgess <
thade...@thadeusb.com> wrote:
> I use apache on virtualhost at slicehost running multiple web2py
> virtualhosts.
>
> With one web2py instance, my server stands at around 90MB average for
> memory, it *might* spike up to 115MB if I start some ram caching, however my
> reports have never reported anything higher. I am running apache with
> mod_wsgi. Also I havn't seen anything faster :) I would say it's a toss up
> between "Just Working" and "A couple more microseconds".
The important thing is to use daemon mode of mod_wsgi on memory
constrained systems and not embedded mode. Although Apache is slower
at serving static files than nginx or Cherokee, if configured
correctly you wouldn't expect to see much difference for your actual
web2py application requests. This is because the underlying web server
isn't going to be the bottleneck. Instead the performance bottleneck
is going to be your web2py code and the database access.
FWIW, a good middle ground is to use nginx as front end to Apache/
mod_wsgi (daemon mode). The nginx server will serve static files and
proxy everything else to Apache. This gives benefit of fast static
file serving from nginx and nginx will also isolate Apache from slow
HTTP clients due to how nginx buffers request/responses. This means
that Apache is only bothered for absolute minimum time required to
handle request and thus can do more with less Apache processes/threads
and thus less memory.
Graham