[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Disable fsync at transaction commit

From: Benjamin Pflugmann <benjamin-svn-dev_at_pflugmann.de>
Date: 2003-02-23 10:53:39 CET

On Sat 2003-02-22 at 11:17:47 +0100, Branko ?ibej wrote:
> Greg Hudson wrote:
> >Anyway, I did the grunt work. I used a simplified form of your patch,
> >which I'll include at the end. The "make check" time appears to drop
> >from 20 minutes to 18 minutes on my machine with DB_TXN_NOSYNC set. I
> >have a 700MHz PIII Thinkpad A22P with 384MB of memory.

Just another data point: I get almost the same figures on Linux 2.4.21pre3
using an IBM Deskstar 120 GXP disk (IC35L060AVVA07: 7200RPM, 8.5ms seek,
Ultra ADA/100, 60GB). Btw, on a 500MHz Athlon, 384MB - but the relevant
part are the disks, of course. The times go down from 18.5 to 17 mins for

> How unfortunate. 10% is nothing to sneer at, but it seems that Windows
> is a terrible host for any kind of database. My box is a dual Athlom MP
> 2200+ (1.8GHz) with 1GB of memory and 4-way RAID 5 disks, running
> Windows XP. Hm, maybe the fsyncs are that much slower because of the
> RAID thing.

Very well possible. Dependend on implementation, RAID5 is slower than a
plain disk at writes, but never better.

But let me guess, the RAID uses SCSI disks? Most (all?) IDE disks lie
about writing. They are using write-caching, while SCSI disks only say
they have written stuff to disk, when it really is on the platter.

If I disable write-caching with my IDE disk (hdparm -W0 /dev/hdb, note
that some drives ignore that request and continue to use the write
cache), make check needs

  - 48 mins (without the patch)
  - 34 mins (with patch)

which is more in the range of your results.

Happier now? ;-)

One could say that users of IDE drives were already never really using

I know, more precisely, they were using asynchronous syncs instead of
synchronous ones which is better than no syncs at all, but when you
get a power outage, you'll see it's effectively the same as no
syncs. *eg*

Maybe we should add that advice somewhere:

  If you are paranoid about your repository, make sure to use disks
  without write-caching: either use SCSI disks or disable write-caching
  on IDE disks *and* test that the drive honors it, or alternatively buy
  a UPS for the IDE disk.

I know this may sound like an overkill, but if it is, why being paranoid
about repository consistency to begin with? Since we are (at least that
is my understanding from what I have read so far), tell people what
hardware requirements are to be met to make best use of the software
layer paranoia.

Maybe there should also be some way for people to play it more fast
than safe (e.g. allow to disable synchronous syncs at all), if that
meets their priorities.



  • application/pgp-signature attachment: stored
Received on Sun Feb 23 10:54:26 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.