[ZODB-Dev] Use of fsync in FileStorage

Christian Robottom Reis kiko at async.com.br
Wed Jul 28 20:24:58 EDT 2004


On Wed, Jul 28, 2004 at 08:11:37PM -0300, Sidnei da Silva wrote:
> On Wed, Jul 28, 2004 at 05:47:21PM -0400, Tim Peters wrote:
> | The box here is a beefy laptop, WinXP Pro SP1, 3.2GHz P4 hyper-threaded, 1GB
> | RAM, 80GB IDE disk w/ 8MB cache.
> 
> PowerBook Pismo, 400mhz, 320MB RAM, 6GB disk (dunno how much disk
> cache) ext3 filesystem. Debian GNU/Linux unstable, kernel 2.6.6.

    Athlon 1400Mhz, 1GB RAM, Debian Woody with a Linux software RAID-1
    array of two ATLAS10K3_36_WLS SCSI U2-LVD drives in an Adaptec 29160
    (no hardware raid)

> | Using current (Zope 2.7 branch HEAD) FileStorage code:
> | 
> | C:\Code\ZODB3.2>timefsync.py
> | Doing 10000 transactions, timed with time.clock()
> | 323.649 seconds, 30.8977 txn/sec
> 
> (Lowered the number of transactions for clear reasons)
> sidnei at cotia:~/tmp$ python timefsync.py 
> Doing 1000 transactions, timed with time.time()
> 20.3959 seconds, 49.0295 txn/sec

    kiko at anthem:~$ python x.py 
    Doing 10000 transactions, timed with time.time()
    11.0426 seconds, 905.587 txn/sec

(/me whomps Sidnei's puny notebook)

> | After adding a second fsync, in tpc_vote():
> | 
> |                 self._file.flush()   # existing line
> |                 if fsync is not None: fsync(self._file.fileno()) # new
> | 
> | C:\Code\ZODB3.2>timefsync.py
> | Doing 10000 transactions, timed with time.clock()
> | 666.169 seconds, 15.0112 txn/sec
> 
> sidnei at cotia:~/tmp$ python timefsync.py 
> Doing 1000 transactions, timed with time.time()
> 21.1342 seconds, 47.3166 txn/sec

    kiko at anthem:~$ python x.py 
    Doing 10000 transactions, timed with time.time()
    12.5261 seconds, 798.336 txn/sec

> | Finally, commenting out both fsync()'s in FileStorage.py:
> | 
> | C:\Code\ZODB3.2>timefsync.py
> | Doing 10000 transactions, timed with time.clock()
> | 3.49118 seconds, 2864.36 txn/sec
> 
> sidnei at cotia:~/tmp$ python timefsync.py 
> Doing 1000 transactions, timed with time.time()
> 2.20281 seconds, 453.965 txn/sec

    kiko at anthem:~$ python x.py 
    Doing 10000 transactions, timed with time.time()
    8.03715 seconds, 1244.22 txn/sec

That's interesting, isn't it? Let's try on an nfs-mounted directory.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331


More information about the ZODB-Dev mailing list