[Zope-CMF] ab bechmarks of CMF - was Re: Plone Speed

alan runyan alan runyan" <runyaga@runyaga.com
Tue, 14 May 2002 14:11:44 -0500


I dont believe skin traversal is the problem.  Here are some very rough
benchmarks done that hint at:

    * Plone isnt as slow as you would think, considering all of the heavy
lifting its doing, compared to CMFDefault which does *very very* little

    * Putting all of the used presentation elements into one folder (at the
beginning of the skinpath) makes very little difference

    * CMF itself is slow on old hardware.

NOTE: in the past I have 'trimmed out' all stuff from document_view and
main_template and benchmarked the frontpage of a CMF.  and the results are
still not very great.
I think I would get maybe a 200% speed increase.  Considering the skins are
doing absolutely nothing except loading up the content object and apply a
skin - it should be
blindingly fast.

Running CMFPlone CVS (basically 0.9.9), CMF1.3b1, Zope2.5.1, Mandrake (?)
Linux, Python 2.1.3
Hardware: 256MB RAM, 350Mhz

Here are very very rough benchmarks using:
/usr/sbin/ab -c 2 -n 100 http://127.0.0.1/xxx/index_html
I created a Document (in the published state) in the root of the CMF sites.
Using the same structured-text copy from the default Plone index_html.

CMFDefault - second pass:
---------------------------
Concurrency Level:      2
Time taken for tests:   21.812 seconds
Complete requests:      100
Failed requests:        0
Broken pipe errors:     0
Total transferred:      465900 bytes
HTML transferred:       442900 bytes
Requests per second:    4.58 [#/sec] (mean)
Time per request:       436.24 [ms] (mean)
Time per request:       218.12 [ms] (mean, across all concurrent requests)
Transfer rate:          21.36 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0     0    0.4      0     5
Processing:   374   433   33.6    435   581
Waiting:      374   433   33.2    434   570
Total:        374   433   33.8    435   586


CMFPlone - default install - second pass
-----------------------------------------
Concurrency Level:      2
Time taken for tests:   39.153 seconds
Complete requests:      100
Failed requests:        0
Broken pipe errors:     0
Total transferred:      1001100 bytes
HTML transferred:       978100 bytes
Requests per second:    2.55 [#/sec] (mean)
Time per request:       783.06 [ms] (mean)
Time per request:       391.53 [ms] (mean, across all concurrent requests)
Transfer rate:          25.57 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0     0    0.4      0     5
Processing:   637   781   51.4    783  1008
Waiting:      630   780   50.1    783   975
Total:        637   781   51.5    783  1013

all plone_ folders 'customized' into the custom folder (therefore everything
should be picked up on the first lookup as custom is the first skinpath
element in all skinspaths)
CMFPlone - with presentation objects in 'custom'
--------------------------------------------------
Concurrency Level:      2
Time taken for tests:   37.519 seconds
Complete requests:      100
Failed requests:        0
Broken pipe errors:     0
Total transferred:      1001100 bytes
HTML transferred:       978100 bytes
Requests per second:    2.67 [#/sec] (mean)
Time per request:       750.38 [ms] (mean)
Time per request:       375.19 [ms] (mean, across all concurrent requests)
Transfer rate:          26.68 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0     0    0.4      0     5
Processing:   637   749   54.7    742   935
Waiting:      635   749   53.9    742   909
Total:        637   749   54.8    742   940

NOTE:
I put the following script in portal_skins and ran it (using plone).  It
customizes all of the elements (yes we have nested
folders in CMFPlone, but none of those are used on the default page, they
are dealing with supporting form scripts or optional themes/styles)
into the ZODB custom folder in the portal_skins tool.  Of course this is a
default install and custom is the first element in all skinpaths.

customFolder = getattr(context, 'custom')

for f in [f for f in context.objectValues('Filesystem Directory View') if
f.getId().startswith('plone_')]:
    for obj in f.objectValues():
        customDestinationFolder=customFolder
        if obj.getId() not in customDestinationFolder.objectIds():
            print 'customized '+obj.getId()+' into custom'
            try:
                obj.manage_doCustomize('custom')
            except:
                pass
print 'bulkloading FilesystemDirectoryView contents into ZODB.. done'
return printed

~runyaga

----- Original Message -----
From: "Chris Withers" <chrisw@nipltd.com>
To: "alan runyan" <runyaga@runyaga.com>
Cc: <zope-cmf@zope.org>
Sent: Tuesday, May 14, 2002 11:42 AM
Subject: Plone Speed


> alan runyan wrote:
> >
> > NOTE: I believe the latest Plone has had sigificant speed improvements.
>
> Well, having chatted with AndyD, I think I can give you some clues. From
what I
> understand, you have a lot of skin layers that are used for categorisation
and you find
> METAL slow.
>
> Here's an idea:
>
> The skins tool is not being your friend. For each name you look up in a
CMF site, it goes
> through each layer until you find it, in the order defined in the skins
tool properties,
> as the you hit the portal object in the acquisition chain.
>
> Now, that includes METAL macro lookups and REQUEST lookups.
>
> REQUEST is particularly bad, since it is behind the portal object in the
acquisition
> chain, meaning ALL skin layers will be searched every time it is looked
up. To make
> matters worse, REQUEST is looked up for every page template and metal
macro usage.
>
> Ideas for optimisation:
>
> 1. stop using skin layers for categorisation, it's not what they were
designed for ;-)
>
> 2. reimplement the skins tool so it is designed to have layers for
categorisation ;-)
>
> Maybe Shane can step in here since he may have done some optimisation in
this area
> already?
>
> cheers,
>
> Chris
>