[Zope] zope performance issues

Dieter Maurer dieter at handshake.de
Thu May 20 04:51:20 EDT 2004

Trevor Warren wrote at 2004-5-19 19:49 -0700:
> ...
> RamCacheManager objects i used to cache all
>images/dtml scripts. The statistics show that ONLY
>DTML scripts got cached and no images...why????.

You should not cache static objects (such as images)  via
a RAMCacheManager -- the only effect: you consume more
memory (provided that the ZODB cache has adequate size).
Use the RAMCacheManager only for dynamic content.

In a real production situation, you would use an HTML cache
(e.g. Squid, Apacher + mod_cache) to cache static objects.
The "HTMLCacheManager" may help you to set the correct
cache headers.

>Ofcourse i would use a rever proxy/apache to do that
>caching but would appreciate some clarity on the same.


> There was abso no increase in performance with
>RamCacheManager enabled for dtml scripts.

Maybe, because your DTML objects have not been dynamic...
In this case, the HTML cache approach would be better...

> ...
>I am leaving
>for office in sometime and will re-setup the zope
>config towards running last nite's test for 50 users
>again with the following settings. Lemme know if you
>desire some changes???.
>> Users on the system : 50
>> Iterations per user at any given time(Defines the no
>of times the site)  is looped thro) : 1
>> 10 Threade in Zope
>> Main DB Cache as 20000
>> No temp DB Cache
>> Pool connections 15

Your application is CPU bound (at least, I expect this).
This means that a higher number of threads can only induce
higher overhead (due to more thread switches).

On the other hand this should not lead to a dramatic
slow down...

You may increase the number of instructions before Python
is ready to switch threads (again to reduce the number of thread
switches). This, too, will not drastically improve throughput,

Two more notes:

  *  You should have a feeling what you may get:

     On my machine (Athon 1.4 GHZ, 600 MB RAM), I get
     about 85 req/sec for a simple DTML page and
     about 160 req/sec for an Image.

     I think that's almost as good as you can come with Zope.

  *  The speed highly depends on how well Python was generated.

     I once observed that the Python generated by myself
     was about 50 % faster than that distributed with my
     OS installation (SuSE 7.3).

     How well your Python runs can be checked with the PyStone

     As a comparison: my Python has 26.187 pystones/second (on
     the machine mentioned above).


More information about the Zope mailing list