pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Browne <cbbrowne@acm.org>
To: pgsql-performance@postgresql.org
Subject: Re: which is more important? freq of checkpoints or the duration of them?
Date: Mon, 03 Mar 2008 15:55:33 +0000
Message-ID: <60y78zajka.fsf@dba2.int.libertyrms.com> (raw)
References: <200803030925.02931.doug@hunley.homeip.net>

doug@hunley.homeip.net (Douglas J Hunley) writes:
> Subject about says it all. Should I be more concerned about checkpoints 
> happening 'frequently' or lasting 'longer'? In other words, is it ok to 
> checkpoint say, every 5 minutes, if it only last a second or three or better 
> to have checkpoints every 10 minutes that last half a minute? Stupid examples 
> probably, but you get my point I hope :)

Well, with the (new-in-8.1) background writer, you should be able to
have whatever combination might appear attractive, as the point of the
background writer is to push out dirty pages.

Pre-8.1, your choice would be either to:
a) Flush frequently, and so have the checkpoints be of short duration, or
b) Flush infrequently, so that the checkpoint flushes would have a long
   duration.

Now, if you have reasonable settings (I'm not sure how well its tuning
is documented :-(), checkpoint "flushes" should be able to be short,
however infrequent they may be.

In effect, the "oops, the database got blocked by checkpoint flushing"
issue should now be gone...

The issue that then remains is whether to checkpoint often, in which
case crash recovery will tend to be be quicker, or whether to
checkpoint seldom, in which case crash recovery will have fewer
checkpoints to choose from, and hence will run somewhat longer.

If your systems don't crash much, and recovery time isn't a big deal,
then this probably doesn't much matter...
-- 
(reverse (concatenate 'string "ofni.sesabatadxunil" "@" "enworbbc"))
http://linuxfinances.info/info/sap.html
"I don't plan to maintain it, just to install it." -- Richard M. Stallman



view thread (5+ messages)  latest in thread

Message-ID: <60y78zajka.fsf@dba2.int.libertyrms.com>
Permalink:  ../60y78zajka.fsf@dba2.int.libertyrms.com/
Also on:    postgresql.org/message-id/60y78zajka.fsf@dba2.int.libertyrms.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-performance@postgresql.org
  Cc: cbbrowne@acm.org
  Subject: Re: which is more important? freq of checkpoints or the duration of them?
  In-Reply-To: <60y78zajka.fsf@dba2.int.libertyrms.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