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

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 18 2025 02:07:44
Script start
Timing: Jan 18 2025 02:07:44
Module start 'layout'
Timing: Jan 18 2025 02:07:44
Module start 'content'
Timing: Jan 18 2025 02:07:45
Module end 'content'
Timing: Jan 18 2025 02:07:45
Script end

Main resources:

Total runtime0.5947 sec
Peak memory usage4,096.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 587.9219152.6250
Module start 'layout' 0.00630.0038 740.546939.4609
Module start 'content' 0.01010.5831 780.0078630.0313
Module end 'content' 0.59320.0014 1,410.039116.1719
Script end 0.5946  1,426.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.6279160.0002
Check MTime0.00150.2462160.0001
Mysql Total
Database connection0.00120.209210.0012
Mysqli_queries0.527588.7061690.0076
Looping result0.00070.1210670.0000
Template Total0.564494.920.2822
Template load0.00240.408320.0012
Template processing0.561994.497320.2810
Template load and register function0.00010.019710.0001
states
state_id_array0.00100.161810.0010
state_identifier_array0.00070.123220.0004
Override
Cache load0.00200.3329350.0001
Sytem overhead
Fetch class attribute can translate value0.00070.116030.0002
Fetch class attribute name0.00110.190490.0001
XML
Image XML parsing0.00150.249530.0005
class_abstraction
Instantiating content class attribute0.00000.0031120.0000
General
dbfile0.00120.1976280.0000
String conversion0.00000.001640.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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