Re: AW: AW: WAL does not recover gracefully from out-of-dis k-sp ace

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
Cc: "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: AW: AW: WAL does not recover gracefully from out-of-dis k-sp ace
Date: 2001-03-09 17:48:39
Message-ID: 7342.984160119@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> writes:
> A short test shows, that opening the file O_SYNC, and thus avoiding fsync()
> would cut the effective time needed to sync write the xlog more than in half.
> Of course we would need to buffer >= 1 xlog page before write (or commit)
> to gain the full advantage.

> prewrite 0 + write and fsync: 60.4 sec
> sparse file + write with O_SYNC: 37.5 sec
> no prewrite + write with O_SYNC: 36.8 sec
> prewrite 0 + write with O_SYNC: 24.0 sec

This seems odd. As near as I can tell, O_SYNC is simply a command to do
fsync implicitly during each write call. It cannot save any I/O unless
I'm missing something significant. Where is the performance difference
coming from?

The reason I'm inclined to question this is that what we want is not an
fsync per write but an fsync per transaction, and we can't easily buffer
all of a transaction's XLOG writes...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-03-09 17:50:27 Re: PQfinish(const PGconn *conn) question
Previous Message Zeugswetter Andreas SB 2001-03-09 17:41:15 AW: AW: WAL does not recover gracefully from out-of-dis k-sp ace