Re: Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Gaetano Mendola <mendola(at)bigfoot(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
Date: 2004-09-14 02:00:59
Message-ID: 28518.1095127259@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> If we had a majority of queries filling more than one block we would
> be checkpointing like crazy and we don't normally get reports about
> that.

[ raised eyebrow... ] And of course the 30-second-checkpoint-warning
stuff is a useless feature that no one ever exercises.

But your logic doesn't hold up anyway. People may be doing large
transactions without necessarily doing them back-to-back-to-back;
there could be idle time in between. For instance, I'd think an average
transaction size of 100 blocks would be more than enough to make fsync a
winner. There are 2K blocks per WAL segment, so 20 of these would fit
in a segment. With the default WAL parameters you could do sixty such
transactions per five minutes, or one every five seconds, without even
causing more-frequent-than-default checkpoints; and you could do two a
second without setting off the checkpoint-warning alarm. The lack of
checkpoint complaints doesn't prove that this isn't a common real-world
load.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2004-09-14 04:52:21 Re: tblspaces integrated in new postgresql (version 8.0)
Previous Message Tom Lane 2004-09-14 01:49:14 Re: Large # of rows in query extremely slow, not using index