[Zope] pbind - maximising performance on a multiprocessor Solaris box (Was:
ZMySQLDA Help )
Paul Browning
paul.browning@bristol.ac.uk
Fri, 05 Jul 2002 16:05:52 +0100
Sorry. Only just caught up with this:
> Tony McDonald wrote:
> (replies to list as some of this might be interesting to them)
Agreed. I imagine quite alot of people missed this next bit because of
the subject line.
>
> Loads of Zope work, upgrading servers to 2.5.1/python 2.1.3, and therein
> lies a tale. You might have seen the interchanges on the list between
> fearless Paul Browning, magic Matt Hamilton
Overdoing the Newcastle Brown again?
> and I about threading on
> Solaris
>
> http://www.zope.org/Members/glpb/news2
>
> Upshot there is that Python is not very happy on multiprocessors
For those of you that didn't catch it:
--------------------
On Tue, 28 May 2002, Matthew T. Kromer wrote:
I do *not* recommend running Zope on multiprocessor machines without an
ability to restrict Zope to execution on a single CPU.
The reason for this is that the Python Global Interpreter Lock is shared
inside a Zope process. However, threads in Python are backed by
underlying OS threads. Thus, Zope will create multiple threads, and
each thread is likely to be assigned to a different CPU by the OS
scheduler. However, all CPUs but one which are dispatching any given
Zope process will have to then wait and attempt to acquire the GIL; this
process introduces significant latency into Python and thus into Zope.
Linux has no native mechanism for processor binding. In fact, there is
a CPU dispatch mask for processes, but there is no facility to set the
mask that I know of. Solaris can use a system command like 'pbind' to
bind a process to a particular CPU.
Full post at
<http://zope.nipltd.com/public/lists/zope-archive.nsf/ByKey/381AE53C5F57B42
6>
--------------------
> hence
> I'm using the 'pbind' (solaris) command to allocate a processor to a
> particular Zope process. This has seriously made me look at Apple Xserve
> boxes (you know I have a penchant for the kind of stuff they make :) and
> the anguish from Bristol (PB's lair - a big solaris shop) has been heard
> all the way to the northeast!
>
> Positive aspect of 2.5.1/2.1.3 is that our systems are much more stable,
> but I have a weird problem re:sessions that even has ChrisMcD baffled!
> (puffs out chest).
Tone:
So how do you use pbind? Can you share a script or two?
Thanks,
Paul
--
The Library, Tyndall Avenue, Univ. of Bristol, Bristol, BS8 1TJ, UK
E-mail: paul.browning@bristol.ac.uk URL: http://www.bris.ac.uk/