[Zope] Zope is very slow!

Brian Lloyd Brian@digicool.com
Thu, 17 Aug 2000 13:06:54 -0400


> I am pretty sure (61%) that in the original release of 2.2.0 there was
> something about a speed increase. One talked about on single processor
> (20-40%) and the other was dual processor (60-80%). It partly 
> has to do with
> that "one line of magic code" in the z2.py.
> 
> Ethan? Paul? DC? Care to shed some light?

The speedup involves changing sys.checkinterval, which 
controls the interval (# of bytecodes) at which the 
Python runtime performs certain housekeeping chores. 
For multithreaded programs, upping this interval can 
cause a significant performance improvement (more about
this on python.org in the sys module docs).

2.2 sets the interval to 120, a value that seemed to 
provide a general speedup across a number of systems 
I tested. Granted, this is not very scientific, which 
is why there is an '-i' option to z2.py that allows you 
to pass your own values for the interval to experiment 
and find a sweet spot for your given environment (see 
the z2.py docstring / command help).

> >> else changed I didnt see? I noticed that 2.1.6 wasnt 
> making the best use of
> >> dual processors.
> > 
> > I thought only ZEO would make good use fo dual processors?

Note that effective use of multiple processors is mostly a 
function of the Python runtime (specifically the global 
interpreter lock) rather than an issue that Zope can 
address directly. So yes, ZEO is the best way to make 
effective use of MP.


Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com