[zeromq-dev] Multicore Magic

Brian Granger ellisonbg at gmail.com
Mon Apr 26 19:43:13 CEST 2010

> I personally think the GIL is more of a blessing than a curse, as it allows Python to quickly integrate with C-extensions.

I agree that for now the GIL makes it easy to integrate with
C-extensions.  BUT, the GIL is killing Python's chances to be a useful
language for multicore.  Period.  In the 0MQ context, it means that
you can't use the inproc transport to communicate between parallel
threads.  Instead you have to use the slower ipc/tcp transports,
killing performance.  For 2/4/8 cores that may not be a big deal, but
for the new 24-48 core servers that are now out and even cheap, it
could be a show stopper.  I truly wish the GIL would go away (or that
I had the time and knowledge to work on this pressing issue).

> From your list:
> Stackless and PyPy do in fact have a GIL.
> Jython doesn't because it makes use of the Java environment but this also means that you cannot use C extensions. If you want to use Jython and ZMQ you should look at at the Java bindings.
> IronPython runs on Mono and does indeed not have a GIL, but again C extensions with IronPython are problematic. You could try IronClad but i suspect this will increase the latency.

But you can simply use the IronPython bindings to 0MQ and avoid the C
extension problem.

> Concerning Unladen Swallow, they are no longer optimistic about removing the Python GIL, see here for more info: http://code.google.com/p/unladen-swallow/wiki/ProjectPlan#Global_Interpreter_Lock

This is too bad, I was hoping they would be able to crack the GIL.
But, it doesn't sound like it is hopeless - merely that whatever
happens will be slow and incremental.  I do think that makes sense.



> Cheers,
> Nicholas Piël
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com

More information about the zeromq-dev mailing list