Forums / General / Clustering with class edition = big performance problem

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...

eZ debug

Timing: Jan 18 2025 16:16:13
Script start
Timing: Jan 18 2025 16:16:13
Module start 'content'
Timing: Jan 18 2025 16:16:13
Module end 'content'
Timing: Jan 18 2025 16:16:14
Script end

Main resources:

Total runtime0.9113 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0107 589.2813180.8203
Module start 'content' 0.01070.7292 770.1016606.6563
Module end 'content' 0.73990.1714 1,376.7578341.3750
Script end 0.9113  1,718.1328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.4825210.0002
Check MTime0.00160.1747210.0001
Mysql Total
Database connection0.00130.138810.0013
Mysqli_queries0.830391.10632020.0041
Looping result0.00240.26662000.0000
Template Total0.876696.220.4383
Template load0.00220.246820.0011
Template processing0.874395.934920.4372
Template load and register function0.00040.045410.0004
states
state_id_array0.00160.173610.0016
state_identifier_array0.00100.111820.0005
Override
Cache load0.00180.1951370.0000
Sytem overhead
Fetch class attribute can translate value0.00100.106640.0002
Fetch class attribute name0.00120.135860.0002
XML
Image XML parsing0.00100.108440.0002
class_abstraction
Instantiating content class attribute0.00000.001370.0000
General
dbfile0.00210.2310280.0001
String conversion0.00000.000930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs