Re: fsync vs open_sync (more info)

From: pgsql(at)mohawksoft(dot)com
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: fsync vs open_sync (more info)
Date: 2004-08-10 13:48:49
Message-ID: 64988.64.119.142.34.1092145729.squirrel@mail.mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Some more information:

I started to perform the tests on one of the machines in my lab, and guess
what, almost no difference between fsync and open_sync. Either on jfs or
ext2.

The difference, Linux 2.6.3? My original tests where on Linux 2.4.25.

The good part is that open_sync wasn't worse.

Just a question about conceptually, "What is the right thing to do?" I
started to think about this. To me, the O_SYNC flag is to ensure that what
you write, at the time of write, is on the disk. In SQL terms it is like
"auto commit." Calling fsync or fdatasync is so that one can batch write
calls and flush it out to disk in one shot, conceptually, it is like
transaction.

Does it make sense, then, to say that WAL O_SYNC should be O_SYNC? If
there are no reasons not too, doesn't it make sense to make this the
default. It will give a boost for any 2.4 Linux machines and won't seem to
hurt anyone else.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-08-10 14:03:46 Re: Tablespace issues (comment on ,moving indexes)
Previous Message Harald Fuchs 2004-08-10 12:01:00 Re: Add Missing From?