+1 from me too, this feels like a really good proposal :-)
Jim Fulton wrote:
Lennart Regebro wrote:
On 10/11/06, Roché Compaan <[EMAIL PROTECTED]> wrote:
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.
Single: Calls fsync once per transaction. Gives you reasonable data
reliability in most cases. You should in a crash only lose one
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.
Simplistix - Content Management, Zope & Python Consulting
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org