[mod_python] Why are you using mod_python?

Mike Looijmans mike.looijmans at asml.com
Mon Mar 31 07:35:36 EST 2003

Simple: There were a few dozen clients when we started this project. There
will be about 400 when we roll it out worldwide, and I didn't want the server
to spend too much time loading the interpreter for each call.
With CGI, it could process about 2 requests per second. With mod_python, that
increased to over 20 per second.

Keeping database connections alive and some internal caching were nice things
to add (I like a bit of multithreaded programming), but did not add any
measurable performance gains (I guess the Python-MySQL link is just too fast
when all is local).

Our system is now hybrid - servers can either use CGI or mod_python (bot if
they like). But I did not use cgihandler because it also took quite a
performance hit because of reloading a lot of libraries, and after a few dozen
requests the cgi library would lose the os.environ and a restart of the server
would be neccesary to get things going again. Also, cgihandler does not
combine well with Apache's "worker" thread model, cgihandler turns the whole
system into a single-threaded server in that particular case.

Mike Looijmans
ASML: http://www5nl.asml.nl/~mlooijma
Private: http://www.milosoftware.com

-----Original Message-----
From: Gregory (Grisha) Trubetskoy <grisha at modpython.org>
To: mod_python at modpython.org <mod_python at modpython.org>
Date: Saturday, March 29, 2003 12:42 AM
Subject: [mod_python] Why are you using mod_python?

>Hello everyone -
>As the original author of mod_python I think I'm allowed to jerk people's
>chains with this simple question:
>Why are you using mod_python?

More information about the Mod_python mailing list