Python does not play well with others

Graham Dumpleton grahamd at dscpl.com.au
Mon Feb 5 16:42:30 EST 2007


On Feb 6, 5:39 am, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> John Nagle <n... at animats.com> writes:
> > > The GIL doesn't affect seperate processes, and any large server that
> > > cares about stability is going to be running a pre-forking MPM no
> > > matter what language they're supporting.
>
> >    Pre-forking doesn't reduce load; it just improves responsiveness.
> > You still pay for loading all the modules on every request.  For
> > many AJAX apps, the loading cost tends to dominate the transaction.
>
> I think the idea is that each pre-forked subprocess has its own
> mod_python that services multiple requests serially.  

And where 'worker' MPM is used, each child process can be handling
multiple concurrent requests at the same time. Similarly on Windows
although there is only one process.

> New to me is the idea that you can have multiple separate Python
> interpreters in a SINGLE process (mentioned in another post).  I'd
> thought that being limited to one interpreter per process was a
> significant and hard-to-fix limitation of the current CPython
> implementation that's unlikely to be fixed earlier than 3.0.

No such limitation exists with mod_python as it does all the
interpreter creation and management at the Python C API level. The one
interpreter per process limitation is only when using the standard
'python' runtime executable and you are doing everything in Python
code.

Graham





More information about the Python-list mailing list