[ZODB-Dev] Use of fsync in FileStorage
Christian Robottom Reis
kiko at async.com.br
Wed Jul 28 20:31:07 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.
Duron 1.2GHz, 256MB, NFS-mounted partition (based on the box I sent
the previous stats in). Debian Woody.
I omitted this, but the other box's filesystem was ext3. Both are kernel
2.4.26.
> | 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 manonegra:~$ python x.py
Doing 10000 transactions, timed with time.time()
18.203 seconds, 549.359 txn/sec
Still whompin'.
> | 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 manonegra:~$ python x.py
Doing 10000 transactions, timed with time.time()
22.8852 seconds, 436.964 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 manonegra:~$ python x.py
Doing 10000 transactions, timed with time.time()
13.0841 seconds, 764.286 txn/sec
I ran the tests a few times, and never did the results vary by more than
a second.
Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331
More information about the ZODB-Dev
mailing list