[mod_python] Mod_Python, multicore and concurrency

John Lister john.lister at kickstone.com
Fri May 29 09:44:09 EDT 2009


Hi i'm a newbie with mod_python and a quick search of google threw up no 
results..

I'm trying to run a fairly a python script under apache as an app server 
using mod_python. This is fairly cpu bound so i'd like to run on a multi 
processor/core setup (at least 8). I understand that because of the GIL 
i'd need multiple python processes to do this so i've set up apache with 
the pre-fork option.

However a quick test with a number of simultaneous requests shows 
(generally) only one apache process maxing out the cpu - i'd expect one 
per core. I would expect a python interpreter per apache process or is 
that a bad assumption? Or does mod_python place some other limit on things?

Thanks

JOHN


More information about the Mod_python mailing list