pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Mark Kirkwood <markir@paradise.net.nz>
Cc: pgsql-performance@postgresql.org, PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] fsync method checking
Date: Thu, 18 Mar 2004 13:44:02 -0500
Message-ID: <11043.1079635442@sss.pgh.pa.us> (raw)
In-Reply-To: <200403181746.i2IHkDA00975@candle.pha.pa.us>
References: <200403181746.i2IHkDA00975@candle.pha.pa.us>

Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I have been poking around with our fsync default options to see if I can
> improve them.  One issue is that we never default to O_SYNC, but default
> to O_DSYNC if it exists, which seems strange.

As I recall, that was based on testing on some different platforms.
It's not particularly "strange": O_SYNC implies writing at least two
places on the disk (file and inode).  O_DSYNC or fdatasync should
theoretically be the fastest alternatives, O_SYNC and fsync the worst.
	
> 	Compare fsync before and after write's close:
> 	        write, fsync, close    0.000707
> 	        write, close, fsync    0.000808

What does that mean?  You can't fsync a closed file.

> This shows terrible O_SYNC performance for 2 8k writes, but is faster
> for a single 8k write.  Strange.

I'm not sure I believe these numbers at all... my experience is that
getting trustworthy disk I/O numbers is *not* easy.

			regards, tom lane



view thread (42+ messages)  latest in thread

Message-ID: <11043.1079635442@sss.pgh.pa.us>
Permalink:  ../11043.1079635442@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11043.1079635442@sss.pgh.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us, markir@paradise.net.nz, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] fsync method checking
  In-Reply-To: <11043.1079635442@sss.pgh.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