[ZODB-Dev] Use of fsync in FileStorage

Sidnei da Silva sidnei at awkly.org
Wed Jul 28 19:11:37 EDT 2004


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.

| 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


| 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

| 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

-- 
Sidnei da Silva <sidnei at awkly.org>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

<radix> it's stupid
<slyphon> it is?
<radix> the proper solution is to use an alternative implementation of time


More information about the ZODB-Dev mailing list