[Zope] performance concern

Dario Lopez-Kästen Dario Lopez-Kästen
Fri, 5 Apr 2002 21:13:10 +0200


On Friday, April 05, 2002 5:38 PM, "Bill Ort" <billort2002@yahoo.com> wrote:

> Hi,
>
> We are new to Zope and are trying to create a form- and db-intensive web
> application using Zope 2.4.0 (though I'm testing in 2.5 also).  I've
noticed
> that our complex forms (which use nested dtml-in loops) are running
> extremely slow, taking more than 30 seconds on the server side (450MHz
> Pentium II w/ linux).  Any help would be extremely welcome...as is, the
> site is too slow to demo to potential clients.

To which  "Andreas Jung" <andreas@zope.com> answered:
> What about using state-of-the-art hardware for demonstrations?
>
> -aj

and "Maik Jablonski" <maik.jablonski@uni-bielefeld.de> answered:

> my advice: put a squid as accelerator in front of your zope and cache your
> queries... then your hardware will be fast enough to impress every
potential
> client.
>
> greetings, maik.

Hi!

I think you are missing the point here, gentlemen - the problem was not to
impress potential clients or what kind of hardware to use, but to find a way
to optimise the queries and the speed of DB-accesses. The advice that
Andreas and Maik are giving is good - however, they do not offer a solution
to the problem, but merely a workaround.

Now, we don't know what kind of DB server Bill is using, it might be a
crappy old Netware PC running and old version of Oracle thru the serial port
for all we know.

It could also be that his 450 MHz machine has 32 MB's of RAM and is running
an heavily loaded news-server for the world, nor do we know if there is some
misconfiguration of the server.

Also he does not say whether the simple test he provided is the one that
takes 30 seconds to complete (if it does, well, then we know the answer - it
is the machine that is faulty :)

This does not change the fact that there are some problems or issues with DB
intensive Zope apps. Basically what Andreas and Maik are saying is that Zope
sucks^H^H^H is sub-optimal when building DB intesive apps unless it is on
the top-of-the line hardwara - which is kind of sad, because only last
summer a 450 Mhz machine with Linux was pretty decent, and something that
competing products would have no problem performing pretty well on.

I run my app on a 1.8 GHz P4 Linux box, and it is not as fast as could be
expected. We have *all* our content in Oracle running off a Sun 450, 4 CPU,
4 GB Ram. All Zope operations happen in memory on the Linux machine (which
means no swapping) and still i have at times 98% CPU usage for something
like 4-8 concurrent queries and the users are complaining - a bit.

I am caching in Zope and using Apache with chachin on. I dunno how much
faster a PC you can buy, but not that much faster that I am using now. I
have a lot of optimisations left to do, so I can probably tweak it some
more and get greater performance.

Now, it just happens to be so that there is a thread about this very issue
Bill is asking about:

"[Zope] Z-SQL Method performance"

which discusses what to do to improve speed in html-rendering (in short
don't render html from dtml if you have very large result-sets), and here:

"[Zope] Call SQLMethods/SQL Statements directly with python"

which might be of interest too - wether it applies to Bills problem's I
don't know, but they apply to mine, and I will be testing them on my app.

Apologies for the rant - I will now step back into lurk-o-mode again.

Cheers,

/dario

- --------------------------------------------------------------------
Dario Lopez-Kästen, dario@ita.chalmers.se        IT Systems & Services
System Developer/System Administrator     Chalmers University of Tech.