[Zope] performance issues

Matthew T. Kromer matt@zope.com
Mon, 28 Oct 2002 10:11:23 -0500


Paul Winkler wrote:

>[Regarding Python's use of multiple CPUs]
>
>Yes it does. It just doesn't make *good* use of it - in fact
>performance is likely to be worse than on a uniprocessor
>machine, as the python process may frequently bounce from one 
>processor to another.  Read that thread again.
>  
>

Correct.  What the GIL does in an MP environment is add latency.  The 
effect can be as much as 30% for Zope, in my experience.  Very little of 
Zope can concurrently dispatch on multiple CPUs -- the major exception 
being IO.  Since IO normally would block and suspend the thread doing it 
anyway, you don't get much benefit.

>What's needed is a way to *prevent* python from using more
>than one processor, so you can run one (or more) instances
>of Zope per processor and bind them to that processor.
>This depends on the OS.  IIRC Solaris can do this,
>but Linux out-of-the-box cannot.
>
>--PW
>
>  
>

Linux actually does have a processor dispatch mask.  To the best of my 
knowledge it is only used for interrupt handers that need to be CPU 
bound.  Linux provides no facility to set this mask, although I have 
seen patches that will allow you to set it via /proc.


-- 
Matt Kromer
Zope Corporation  http://www.zope.com/