Forums / Install & configuration / eZDFS cache management

eZDFS cache management

Author Message

Matthieu Sévère

Thursday 07 January 2010 6:32:46 am

Hello :-)

I've never installed eZ Publish in eZDFS mode but I am wondering on the cache is managed :

Considering that the cache is stored locally on each front, when you edit an object for example : how the cache is cleaned for this object on each front ?

Thank you :-)

--
eZ certified developer: http://ez.no/certification/verify/346216

Nicolas Pastorino

Thursday 07 January 2010 6:36:53 am

I think so :

http://share.ez.no/forums/install-configuration/ezdfsfilehandler#comment55719

Cheers !

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Bertrand Dunogier

Thursday 07 January 2010 6:45:54 am

Based on your twitter response, it seems that the other thread doesn't explain that completely.

It is actually quite simple: the central repository for cache when using eZDFS is NFS (by default) + the ezdfsfile cluster table. The table is used to check the actual mtime, validity, etc. When a cache item is cleared, it is marked as expired in this table. When it gets regenerated, the item's mtime is modified in the table as well. Any other server of the cluster that further requests this cache file will compare its mtime in the DB to the local cache file's mtime.

So as soon as a cache item's mtime is changed in the DB, any local version older than this mtime will be replaced with the updated file.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Matthieu Sévère

Thursday 07 January 2010 7:11:11 am

Thank you for your answer I understand know.

In fact, I misunderstood your first topic because I thought that locally means out of NFS. And, if it is in NFS everything is clear :-)

Actually I asked this question because I have a ezpublish running on 3 servers : 2 fronts and one back. There is a main database on the back and everything else is shared with NFS.

But, NFS is really slow and generating the cache is taking like more than 2s each time! So I moved the cache folder out of NFS (so what I call locally :-) ) but know I have to deal with clearing the cache on each server .... I'm not sure it's the good solution though ...

Thanks for your reply :-)

--
eZ certified developer: http://ez.no/certification/verify/346216

Bertrand Dunogier

Thursday 07 January 2010 7:17:37 am

NFS alone shouldn't make things THAT slow. It is bad, but not that much when it comes to speed.

In eZDFS, we chose to consider NFS as a simple files repository, and completely ignore it when it comes to metadata & concurrency handling (this is done using the database, as we have complete control over what the DB does).

Keep in mind that you will have a small loss of performances if you use eZDFS (usually around -10% page views), but cache updates will be completely transparent.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Matthieu Sévère

Thursday 07 January 2010 7:23:28 am

Ok, so maybe there is something else that slows NFS.

Thanks for your help, it's been usefull !

--
eZ certified developer: http://ez.no/certification/verify/346216

eZ debug

Timing: Jan 17 2025 23:50:11
Script start
Timing: Jan 17 2025 23:50:11
Module start 'content'
Timing: Jan 17 2025 23:50:12
Module end 'content'
Timing: Jan 17 2025 23:50:12
Script end

Main resources:

Total runtime1.0613 sec
Peak memory usage4,096.0000 KB
Database Queries206

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.7266180.8359
Module start 'content' 0.00540.9279 768.5625635.1094
Module end 'content' 0.93340.1278 1,403.6719341.0938
Script end 1.0612  1,744.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3403210.0002
Check MTime0.00140.1321210.0001
Mysql Total
Database connection0.00080.077110.0008
Mysqli_queries0.984092.72182060.0048
Looping result0.00230.21422040.0000
Template Total1.036897.720.5184
Template load0.00200.184220.0010
Template processing1.034897.509620.5174
Template load and register function0.00010.010010.0001
states
state_id_array0.00080.077610.0008
state_identifier_array0.00130.126620.0007
Override
Cache load0.00170.1581350.0000
Sytem overhead
Fetch class attribute can translate value0.00150.145040.0004
Fetch class attribute name0.00110.108190.0001
XML
Image XML parsing0.00180.174040.0005
class_abstraction
Instantiating content class attribute0.00000.0016120.0000
General
dbfile0.00210.1954390.0001
String conversion0.00000.000430.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
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs