Clustering with class edition = big performance problem

Author Message

Marc-Aurèle Brothier

Wednesday 07 May 2008 6:20:14 am

Hi!

We have a cluster environment (now with version 3.9) which was working quite well at the beginning. After having quite a high load for mainly the home page we added the static cache. Everything went fine until some months ago when editing classes started to run out of time.

If I'm trying to add new attributes to a class, it's using more than 5 minutes at least (I get a white page after this amount of time, equal to max_execution_time in PHP ini). I looked at what was going on with the DB and it seems to try to clear almost all the cache. A lot of queries are going on for the cache.
We just did some DB optimization but it didn't help.

My only work around now is to clear the cache twice before validating the modified class.

1. Does anyone have the same issue?
2. Can a developer explain me this point with cache clearance on class modification? Or am I wrong with my assumptions?
3. Will the improvements of 3.10 address my problem here?

I will review all the points described in the thread about optimization in the "important topics" but since my problem is only in the admin site, it will only help to have less load on the DB, what can help for sure. But I want to understand this problem...

Any other comments?

Thanks

André R.

Wednesday 07 May 2008 6:29:32 am

How many objects do you have on these classes?
You should not change classes with lots of objects (even if you don't use cluser version).
Look in the contribution area, there are some cli scripts there that will change the class definition for you in a safe manner.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Marc-Aurèle Brothier

Wednesday 07 May 2008 6:54:12 am

You will be surprise .... none, 0 ! For the class I tried to edit.

What I've seen on the modification of class with existing content, is that it creates new revision or edit the actual revision with the extra default value for each item. But since i don't have any content... I don't really get it

And to give more info about the problem. After my white page, if I look at the class object (view only) I can't see my new attributs. But if I go and edit the class, the edit page shows me my new attributs. If I create a content, I don't have my new attributs.

In ezcontentobject_name we have more than 24'000 rows and in "ezdbfile" more than 40'000 rows.

I'll look into the scripts, thank for your advice. It can be another work around, but I hope to find another solution for our client's webmasters.

André R.

Wednesday 07 May 2008 1:44:28 pm

Checked up a bit more and when you edit a class(doesn't matter witch one), content cache clear is performed.
So yes, you will benefit from the cluster in 3.10 / 4.0 since one of the changes is that cache isn't removed physically but instead just marked as expired.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Carlos Revillo

Wednesday 09 July 2008 4:47:40 pm

my problem here is similar but not the same. i'm using ez40 and ezflow for my homepage. there some images involved in the main site, let's say about 20 images.
when the cache of this front page is cleared and regenerated again, site becomes inservible.

looking at show processlist there are several insert into ezdbfile queries that takes a lot of seconds, event minutes to end.
there are question like

INSERT INTO ezdbfile (datatype, name, name_hash, scope, size, mtime,
expired) VALUES ('image/jpeg',
'var/ezflow_site/storage/images/xxxxx/2102465-2-esl-ES/xxxx.jpg',
'40ad5fee3e4d66b8444f24c2a18b8766', 'image', 11253, 1215644597, 0)
    -> ON DUPLICATE KEY UPDATE datatype=VALUES(datatype),
scope=VALUES(scope), size=VALUES(size), mtime=VALUES(mtime),
expired=VALUES(expired) |

so, it seems like every time that my homepage is modified all this images need to be added again to the database...

when there are no publishing work, the site works perfectly...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 03:42:14
Script start
Timing: Jan 31 2025 03:42:14
Module start 'layout'
Timing: Jan 31 2025 03:42:14
Module start 'content'
Timing: Jan 31 2025 03:42:14
Module end 'content'
Timing: Jan 31 2025 03:42:14
Script end

Main resources:

Total runtime0.0280 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 588.2813151.2266
Module start 'layout' 0.00660.0042 739.5078220.7188
Module start 'content' 0.01080.0154 960.22661,005.9297
Module end 'content' 0.02620.0018 1,966.156337.9922
Script end 0.0280  2,004.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002910.3217140.0002
Check MTime0.00124.2450140.0001
Mysql Total
Database connection0.00124.442410.0012
Mysqli_queries0.00248.493530.0008
Looping result0.00000.053610.0000
Template Total0.00145.010.0014
Template load0.00113.832410.0011
Template processing0.00031.127210.0003
Override
Cache load0.00072.340310.0007
General
dbfile0.00165.649680.0002
String conversion0.00000.024740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs