[ZODB-Dev] ZEO 3.2 (Zope 2.7) ->3.6 (Zope 2.9) upgrading: Much slower startup due to cache file creation

Gfeller Martin Martin.Gfeller at comit.ch
Tue Apr 18 09:45:34 EDT 2006


Hi,

I'm further along the upgrade road and have found that starting up my
app under ZEO is *much slower* than it used to be with Zope 2.7, >10
minutes vs. <1 minute.

I have relatively large temporary cache files (generous enough to to
avoid cache flips, even if I don't know the DB size beforehand), and
that the extra time is spent in the following code (on both Windows 2000
and Windows XP):

ZEO.cache.FileCache.__init__, line 779ff, after the cache file is
created:

     # Make sure the OS really saves enough bytes for the file.
     self.f.seek(self.maxsize - 1)
     self.f.write('x')
     self.f.truncate()

This code seems to have been introduced between the mentioned versions. 

What is the reason for it? I would expect the OS to extend the file as
needed, without an initial "reservation"? It *could* lessen
fragmentation, but this then depends on the file system state. 
 
Thank you, and best regards, 
Martin Gfeller


More information about the ZODB-Dev mailing list