pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <gsmith@gregsmith.com>
To: Gunther Mayer <gunther.mayer@googlemail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: VERY slow queries at random
Date: Thu, 7 Jun 2007 15:42:41 -0400 (EDT)
Message-ID: <Pine.GSO.4.64.0706071529380.2676@westnet.com> (raw)
In-Reply-To: <4668265D.2010200@gmail.com>
References: <46670916.9090505@gmail.com>
	<466726D3.7050102@g2switchworks.com>
	<D7DB4C26-9247-43DD-A765-E81CA0D71DFC@skype.net>
	<4668265D.2010200@gmail.com>

On Thu, 7 Jun 2007, Gunther Mayer wrote:

> wal checkpoint config is on pg defaults everywhere, all relevant config 
> options are commented out. I'm no expert in wal stuff but I don't see how 
> that could cause the problem?

Checkpoints are very resource intensive and can cause other processes 
(including your selects) to hang for a considerable period of time while 
they are processing.  With the default parameters, they can happen very 
frequently.  Normally checkpoint_segments and checkpoint_timeout are 
increased in order to keep this from happening.

This would normally be an issue only if you're writing a substantial 
amount of data to your tables.  If there are a lot of writes going on, you 
might get some improvement by adjusting those parameters upward; the 
defaults are pretty low.  Make sure you read 
http://www.postgresql.org/docs/8.2/static/wal-configuration.html first so 
you know what you're playing with, there are some recovery implications 
invoved.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD



view thread (11+ messages)  latest in thread

Message-ID: <Pine.GSO.4.64.0706071529380.2676@westnet.com>
Permalink:  ../Pine.GSO.4.64.0706071529380.2676@westnet.com/
Also on:    postgresql.org/message-id/Pine.GSO.4.64.0706071529380.2676@westnet.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: gsmith@gregsmith.com, gunther.mayer@googlemail.com
  Subject: Re: VERY slow queries at random
  In-Reply-To: <Pine.GSO.4.64.0706071529380.2676@westnet.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