[ZODB-Dev] Anybody using ZODB with no calls to fsync in production?

Jim Fulton jim at zope.com
Thu Oct 12 09:10:53 EDT 2006


+1

Lennart Regebro wrote:
> On 10/11/06, Roché Compaan <roche at upfrontsystems.co.za> wrote:
>> http://mail.zope.org/pipermail/zodb-dev/2004-July/007682.html
> 
> I read this thread, and it seems to me that the ultimate solution
> would be to have a setting for FSStorage, say "fsync-behaviour" with
> the options of "single", "double", "none" or "interval". We'd need an
> explaining text too. Something like:
> 
> fsync-behaviour: Determines when fsync is called. Default: single.
> 
> Options:
> 
> Single: Calls fsync once per transaction. Gives you reasonable data
> reliability in most cases. You should in a crash only lose one
> transaction.
> 
> Double: Calls fsync before marking transaction as complete as well as
> after marking it as complete. This setting is only useful if you have
> configured the complete storage chain (operating system, filesystem,
> drivers, controllers and disks) will not let fsync return until data
> is safely and completely written to disk. In most cases and without
> configuration of the complete storage chain, this setting will slow
> down FSStorage without actually increasing the reliability of data
> written to disk.
> 
> Interval: Will call fsync only every couple of transactions, with the
> interval determined by the setting "fsync-interval". This is good for
> write-intensive applications where you don't mind loosing a couple of
> transactions if the computer should crash.
> 
> None: Will never call fsync. Good for applications of high write load
> where the data is not critical. Never ever use this setting on
> windows, as it on windows makes it highly likely that data will not be
> written to disk at all, and a crash could quite likely make you loose
> all your changes.
> 


-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the ZODB-Dev mailing list