[Zope] Options for handling concurrency?

Michel Pelletier michel@digicool.com
Mon, 28 Feb 2000 15:54:19 -0800


Tony McDonald wrote:
> 
> At 9:43 am +0100 27/2/00, Martijn Pieters wrote:
> >
> >- Have a look at /Control_Panel/manage_debug. It'll show you reference
> >counts and currenlty open connections, which can be very helpful in
> >targeting hotspots.
> 
> Aye carumba! - what a lot of information. I'm going to start delving
> around there and see what happens. Is there any additional
> documentation available on what the info. means? 

Nope.

>- I've looked in the
> ApplicationManager.py code is a wee bit over my head.
> 
> As an aside (to the list), looking around the ApplicationManager.py
> reveals something called manage_profile. It looks like the main Zope
> functions are being profiled here (ie not at the object level). It's
> interesting, but it does seem to be a resource hog...

Profiling is turned off by default.  You're right though, when it's
turned on it does slow down Zope considerably.  But it shouldn't matter
because that isn't documented either.

> >- Also, what DBMS are you using? If you are using a level 1 or 2 DA (see
> >http://www.zope.org/Members/petrilli/DARoadmap) then you can do only one DB
> >query at a time. It might be time to choose a different DB, or if you are
> >using the old MySQL DA, to upgrade.
> 
> It's MySQL, but using the latest DA - I'm pretty sure I'm doing more
> than one query at a time as I set off a ZSQL query that takes 9
> seconds from the MySQL command line, and then started to use aspects
> of the site that I *know* use MySQL lookups. BTW, the 9 second SQL
> query isn't used in the site! :)
> 
> >- If you are using ZSQL a lot, do you use caching? Even a cache expiry of 1
> >second would help a  heavily hit site tremendously, noone will notice the
> >data returned being at most 1 second out of date.But all hits with equal
> >parameters on the same thread in Zope within that second need only one DB
> >query.
> 
> I do use caching Martijn, but I must admit that it's been a hit and
> miss affair.

har har...

> I'm trying to do as many of my SQL queries in external
> methods (ironically for the performance), so I may well be losing a
> lot of the caching performance breakthrough there .... hmmm. I wonder
> if I could do something like...

There really should be very, very little performance difference between
calling ZSQL methods from DTML and from an external method.  Have you
notice an significant speedup do to this?  If so, we should look at
that...

-Michel