Running Python on SMP machine

Aahz Maruch aahz at panix.com
Thu Oct 5 22:33:17 EDT 2000


In article <mailman.970779431.29989.python-list at python.org>,
William Park  <parkw at better.net> wrote:
>
>How do I take advantage of a SMP (2 CPU) machine?  The speed improvement that
>I get is what I would expect from 1 CPU machine.  Is anyone using Python on
>SMP machines?

You're hitting the Global Interpreter Lock.  The only way around it is
to use an extension that releases the GIL; all the blocking I/O routines
do so, so the simplest way to get fast threading is to use it for I/O.
If you need to speed up computations, you'll need to write an extension
yourself.
-- 
                      --- Aahz (Copyright 2000 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

There's a difference between a person who gets shit zie doesn't
deserve and a person who gets more shit than zie deserves.  --Aahz



More information about the Python-list mailing list