Re: Diazo performance problem

Domen Kožar <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <CAMvcdZQQ-2Q+9o_mpqmDLK1v3AGwXSbpYn2dbp6epqY8B7LcHA@mail.gmail.com>
Hi Bogdan,

I'd recommend using RunSnakeRun
http://www.vrplumber.com/programming/runsnakerun/ and see if there is some
space for optimizations.

lpd


On Tue, Feb 4, 2014 at 3:06 PM, Гирман Богдан <[email protected]>wrote:

> Hi,
>
> I'm investigating a performance issues with diazo.
> With diazo enabled my site loads two times slower than without diazo.
>
> For testing I use apache benchmark and ZopeProfiler.
> I run 100 request for the front-page *with diazo* enabled and get from
> ZopeProfiler:
>
>    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
>       900   21.015    0.023   21.019    0.023 /home/bogdan/.buildout/eggs/diazo-1.0.4-py2.7.egg/diazo/utils.py:59(__call__)
> 1057912/934100    1.825    0.000    5.994    0.000 {getattr}
>       100    1.661    0.017   29.061    0.291 /home/bogdan/.buildout/eggs/plone.app.theming-1.0.4-py2.7.egg/plone/app/theming/transform.py:200(transformIterable)
>
> Diazo takes about half of all time for the servicing request.
> ab output:
>
> Server Software:        Zope/(2.13.21,
> Server Hostname:        localhost
> Server Port:            8080
>
> Document Path:          /Plone/
>
> Document Length:        36403 bytes
>
> Concurrency Level:      1
> Time taken for tests:   58.157 seconds
> Complete requests:      100
> Failed requests:        0
> Write errors:           0
> Total transferred:      3686300 bytes
>
> HTML transferred:       3640300 bytes
> Requests per second:    1.72 [#/sec] (mean)
> Time per request:       581.567 [ms] (mean)
> Time per request:       581.567 [ms] (mean, across all concurrent requests)
> Transfer rate:          61.90 [Kbytes/sec] received
>
> Connection Times (ms)
>               min  mean[+/-sd] median   max
> Connect:        0    0   0.0      0       0
> Processing:   529  581  36.8    574     693
> Waiting:      492  576  37.8    569     692
> Total:        529  581  36.8    574     693
>
> Percentage of the requests served within a certain time (ms)
>   50%    574
>   66%    593
>   75%    608
>   80%    612
>   90%    629
>   95%    667
>   98%    682
>   99%    693
>  100%    693 (longest request)
>
>
>
> I run 100 request for the front-page *without diazo* enabled:
> ab output:
>
> Server Software:        Zope/(2.13.21,
> Server Hostname:        127.0.0.1
> Server Port:            8080
>
> Document Path:          /Plone/
> Document Length:        33387 bytes
>
> Concurrency Level:      1
> Time taken for tests:   27.629 seconds
> Complete requests:      100
> Failed requests:        0
> Write errors:           0
> Total transferred:      3384700 bytes
> HTML transferred:       3338700 bytes
> Requests per second:    3.62 [#/sec] (mean)
> Time per request:       276.294 [ms] (mean)
> Time per request:       276.294 [ms] (mean, across all concurrent requests)
> Transfer rate:          119.63 [Kbytes/sec] received
>
> Connection Times (ms)
>               min  mean[+/-sd] median   max
> Connect:        0    0   0.0      0       0
> Processing:   258  276  24.7    271     382
> Waiting:      224  272  24.2    267     381
> Total:        258  276  24.7    271     382
>
> Percentage of the requests served within a certain time (ms)
>   50%    271
>   66%    273
>   75%    275
>   80%    277
>   90%    289
>   95%    366
>   98%    380
>   99%    382
>  100%    382 (longest request)
>
> Also I seeing that running 100 requests with ab
> "diazo/utils.py:59(__call__)" get called 900 times, is it right?
>
>    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
>       900   21.015    0.023   21.019    0.023 /home/bogdan/.buildout/eggs/diazo-1.0.4-py2.7.egg/diazo/utils.py:59(__call__)
> 1057912/934100    1.825    0.000    5.994    0.000 {getattr}
>       100    1.661    0.017   29.061    0.291 /home/bogdan/.buildout/eggs/plone.app.theming-1.0.4-py2.7.egg/plone/app/theming/transform.py:200(transformIterable)
>
>
> I have tested it in foreground mode and in usual mode but the difference
> in two times between diazo theme enabled and without diazo still present.
>
> Best regards,
> Bogdan.
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> Plone-developers mailing list
> Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/plone-developers
>
>

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk

_______________________________________________
Plone-developers mailing list
Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/plone-developers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.