[Zope] Zope + Postgresql = poor performance

Jim Penny jpenny@universal-fasteners.com
Thu, 15 Feb 2001 19:56:33 -0500


On Thu, Feb 15, 2001 at 05:50:45PM -0500, marc lindahl wrote:
> I don't think single threaded necessarily means slower...
> Perhaps the performance problem lies elsewhere.

pygresqlda sequentializes queries.  Period.

In fact, threaded-ness has little effect on overall _total_
speed.  But, a threaded solution can be very useful where
there is a large range of queries running, i.e. some of
which require only a short time to execute and some of
which require a long time to execute.

In a threaded environment, the short running tasks can
steal time from the long running tasks.  In a single threaded
model, once a long running task starts, everyone else is
blocked until the big task terminates.

This gives a pyschological impression of poor performance,
because the ones who are doing small units of work are 
blocked for arbitrary amounts of times by the hogs on the
system.

That said, you have two choices, stay with the simpler
pygresqlda and make it harder to launch horrible queries.
Or install ZPoPyDa and PoPy, which DO thread.
(pychopg (sp?) is a new da just released, search freshmeat,
also mutithreaded.).

Again, using a threaded DA favors short running queries
at the expense of long running queries.  Single threaded
DA favor long running queries at the expense of short running
queries.  Choose your poison.

> 
> > From: Hannu Krosing <hannu@tm.ee>
> > Date: Fri, 16 Feb 2001 00:30:18 +0200
> > To: felipe.alvarez@qlsoft.cl
> > Cc: zope@zope.org, Hung Jung Lu <hungjunglu@hotmail.com>
> > Subject: Re: [Zope] Zope + Postgresql = poor performance
> > 
> > Felipe Alvarez Harnecker wrote:
> >> 
> >> Hi Zopistas,
> >> 
> >> I'm having extremely poor performance with
> >> 
> >> zope  2.1.6
> >> postgresql 7.0.2
> >> pygresqlda  0.3rjr2
> >> 
> >> actualy zope create just one connection to postgres, so when postgres
> >> is executing one query all the rest are queued. Just image the mess
> >> 
> >> So, can one tell me where to look at ?
> > 
> > You are probably running zope single-threaded - this may happen if you
> > start zope up from pcgi ( or just say so in your zope start file)
> > 
> > 
> > ------------
> > Hannu
> > 
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists - 
> > http://lists.zope.org/mailman/listinfo/zope-announce
> > http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>