pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Ragnar Kjørstad <postgres@ragnark.vestdata.no>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Gaetano Mendola <mendola@bigfoot.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: fsync or fdatasync
Date: Tue, 10 Sep 2002 19:03:06 -0400 (EDT)
Message-ID: <200209102303.g8AN36l24270@candle.pha.pa.us> (raw)
In-Reply-To: <20020911004914.C30625@vestdata.no>

Ragnar Kjørstad wrote:
> On Tue, Sep 10, 2002 at 05:07:30PM -0400, Bruce Momjian wrote:
> > > Anyway - I'm sure this is not enough to convince you, so I'll have to
> > > set up a test instead. But not tonight.
> > 
> > Again, that is a test case for only one OS.  It is helpful if we are
> > going to start doing per-OS defaults, which is something we have talked
> > about.  
> 
> Oh; I assumed that was already the case.
> 
> > What would be great is a test program we can run on different
> > OS's to find out which is more efficient.
> 
> Yes. Bare in mind though, that this is as much a filesystem issue as a
> kernel issue. Two different filesystems on the same kernel may behave
> very differently.
> 
> Of course one can't distribute seperate postgresql in different versions
> optimized for differet filesystems, so perhaps it's just as good to
> leave the default as it is and rather put some info (e.g. benchmarks for
> different setting on different filesystems on different operating
> systems, and the benchmark-script itself so people can do their own
> tests). This way the default is allright, and users that need to tweek a
> little extra have the info they need.
> 

What we could do ideally is set the default by running some test during
initdb perhaps.

> > Remember, in most cases, we are fsync'ing only one block so there is no
> > _gathering_ to do.
> 
> Yes, I know you said so. But if that's the case for only most cases
> there are some cases were it's not - so there is still some potential.

Yes, but the cases are so rare it is probably not worth bothering about
especially since O_SYNC has to be set on file open so you can't switch
between that and fdatasync depending on how many blocks you have.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (26+ messages)  latest in thread

Message-ID: <200209102303.g8AN36l24270@candle.pha.pa.us>
Permalink:  ../200209102303.g8AN36l24270@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200209102303.g8AN36l24270@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: pgman@candle.pha.pa.us, postgres@ragnark.vestdata.no, tgl@sss.pgh.pa.us, mendola@bigfoot.com
  Subject: Re: fsync or fdatasync
  In-Reply-To: <200209102303.g8AN36l24270@candle.pha.pa.us>
  References: <20020911004914.C30625@vestdata.no> <200209102303.g8AN36l24270@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox