pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan Wieck <JanWieck@Yahoo.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Zeugswetter Andreas SB SD <ZeugswetterA@spardat.at>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: PostgreSQL Win32 port list <pgsql-hackers-win32@postgresql.org>
Subject: Re: [HACKERS] Sync vs. fsync during checkpoint
Date: Fri, 06 Feb 2004 10:07:58 -0500
Message-ID: <4023ADCE.5000802@Yahoo.com> (raw)
In-Reply-To: <2297.1075992889@sss.pgh.pa.us>
References: <46C15C39FEB2C44BA555E356FBCD6FA49620A3@m0114.s-mxs.net>
	<2297.1075992889@sss.pgh.pa.us>

Tom Lane wrote:

> "Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
>> So Imho the target should be to have not much IO open for the checkpoint, 
>> so the fsync is fast enough, even if serial.
> 
> The best we can do is push out dirty pages with write() via the bgwriter
> and hope that the kernel will see fit to write them before checkpoint
> time arrives.  I am not sure if that hope has basis in fact or if it's
> just wishful thinking.  Most likely, if it does have basis in fact it's
> because there is a standard syncer daemon forcing a sync() every thirty
> seconds.

Looking at the response time charts I did for showing how vacuum delay 
is doing, it seems at least on Linux there is hope that that is the 
case. Those charts have just a regular 5 minute checkpoint with enough 
checkpoint segments for that, and no other sync effort done at all.

The system has a hard time to handle a larger scaled test DB, so it is 
definitely well saturated with IO. The charts are here:

     http://developer.postgresql.org/~wieck/vacuum_cost/

> 
> That means that instead of an I/O storm every checkpoint interval,
> we get a smaller I/O storm every 30 seconds.  Not sure this is a big
> improvement.  Jan already found out that issuing very frequent sync()s
> isn't a win.

In none of those charts I can see any checkpoint caused IO storm any 
more. Charts I'm currently doing for 7.4.1 show extremely clear spikes 
at checkpoints. If someone is interested in those as well I will put 
them up.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #




view thread (31+ messages)  latest in thread

Message-ID: <4023ADCE.5000802@Yahoo.com>
Permalink:  ../4023ADCE.5000802@Yahoo.com/
Also on:    postgresql.org/message-id/4023ADCE.5000802@Yahoo.com

 · 

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-hackers@postgresql.org
  Cc: JanWieck@Yahoo.com, tgl@sss.pgh.pa.us, ZeugswetterA@spardat.at, pgman@candle.pha.pa.us, pgsql-hackers-win32@postgresql.org
  Subject: Re: [HACKERS] Sync vs. fsync during checkpoint
  In-Reply-To: <4023ADCE.5000802@Yahoo.com>

* 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