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.