[ZODB-Dev] Using zodb and blobs
Christian Theune
ct at gocept.com
Wed Apr 14 02:24:18 EDT 2010
On 04/14/2010 03:30 AM, Nitro wrote:
> Am 14.04.2010, 04:39 Uhr, schrieb Tim Peters<tim.peters at gmail.com>:
>
>> [Nitro]
>>> ...
>>> I wonder if _commit is really *that* slow
>>
>> Six years ago I timed factor-of-100 speed differences due to using MS
>> _commit() on WinXP at the time:
>>
>> https://mail.zope.org/pipermail/zodb-dev/2004-July/007720.html
>>
>>> or if there's another (faster) function which can be called...
>>
>> No MS function that does the same thing.
>
> Seems like ZODB has a long history of discussions on this matter:
>
> http://www.mail-archive.com/zodb-dev@zope.org/msg01874.html
>
> There's even a proposal for improvement in that thread, also on the wiki:
>
> http://wiki.zope.org/ZODB/FsyncBehaviourSetting
>
> What I don't really get is why you should never use "None" on windows. As
> far as I can judge from the various transaction rates in the thread Tim
> mentioned, fsync is just a no-op on linux anyways (depending on the
> specific file system of course).
I'm pretty sure it's not. IIRC fsync is defined by POSIX and absolutely
requires the implementor to flush data physically to disk ensuring its
persistency. If that doesn't hold true then all transactions are borked.
I've seen virtualised environments like VMWare ESX lie about fsyncs from
a virtual hardware perspective.
A similar issue with breaking fsync was the discussion around ext4 on
notebooks with a "only actually flush discs every 10 seconds".
In the end it really depends on what you need your data for. If I'd
store the information that a customer paid me 50 EUR for something and I
presented a screen to him that told him he'll receive some good for that
then I'd rather stick with compliant transactions.
> I am almost tempted to do
>
> os.fsync = lambda fd: 0
>
> and rely on yesterday's backup. 0.49 j/k.
j/k?
--
Christian Theune · ct at gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
More information about the ZODB-Dev
mailing list