GIL in the new glossary
Lulu of the Lotus-Eaters
mertz at gnosis.cx
Thu Oct 2 16:40:52 EDT 2003
"Luis P Caamano" <lpc at racemi.com> wrote previously:
|Although I understand this is possible and how it works, it still
|doesn't help me at all if all I write is python code. My multi-threaded
|program works great, I take it to a big HP SuperDome with lots of
|processors and it just doesn't scale at all.
True enough. But in many cases, there are other ways to utilize
multiprocessing, using pure-Python.
This has come up lots of times, and you can find some old threads (of
the c.l.py kind, not the posix kind :-)). But in general, the strategy
is to use some form of IPC, and launch many Python processes. Each
Python iterpreter can get run in its own processor, and partial
calculations/results exchanged as needed. Various libraries help you
support this.
Admittedly, this is not the absolutely most memory/CPU friendly
technique possible... but then, Python isn't to start with. If you
really need to scrape out every last CPU cycle, use C, OCaml, Fortran,
or assembly.
Yours, Lulu...
--
_/_/_/ THIS MESSAGE WAS BROUGHT TO YOU BY: Postmodern Enterprises _/_/_/
_/_/ ~~~~~~~~~~~~~~~~~~~~[mertz at gnosis.cx]~~~~~~~~~~~~~~~~~~~~~ _/_/
_/_/ The opinions expressed here must be those of my employer... _/_/
_/_/_/_/_/_/_/_/_/_/ Surely you don't think that *I* believe them! _/_/
More information about the Python-list
mailing list