pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tory M Blue <tmblue@gmail.com>
To: Devrim GÜNDÜZ <devrim@gunduz.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: bgwriter, checkpoints, curious (seeing delays)
Date: Thu, 25 Feb 2010 23:01:36 -0800
Message-ID: <8a547c841002252301g49d7f183ue0909929de09d20@mail.gmail.com> (raw)
In-Reply-To: <1267166541.2094.52.camel@hp-laptop2.gunduz.org>
References: <8a547c841002252212t382cfeb4pde3e668a9d3f2f10@mail.gmail.com>
	<1267166541.2094.52.camel@hp-laptop2.gunduz.org>

2010/2/25 Devrim GÜNDÜZ <devrim@gunduz.org>:
> On Thu, 2010-02-25 at 22:12 -0800, Tory M Blue wrote:
>> shared_buffers = 1500MB
>
> Some people tend to increase this to 2.2GB(32-bit) or 4-6 GB (64 bit),
> if needed. Please note that more shared_buffers will lead to more
> pressure on bgwriter, but it also has lots of benefits, too.
>
>> work_mem = 100MB
>
> This is too much. Since you have 300 connections, you will probably swap
> because of this setting, since each connection may use this much
> work_mem. The rule of the thumb is to set this to a lower general value
> (say, 1-2 MB), and set it per-query when needed.
>
>> checkpoint_segments = 100
>> checkpoint_warning = 3600s
>
> What about checkpoint_timeout? Please note that even if
> checkpoint_segments = 100, if timeout value is low (say 5 mins),
> PostgreSQL will probably checkpoint every checkpoint_timeout minutes
> (unless PostgreSQL creates $checkpoint_segments xlogs before
> checkpoint_timeout value). Depending on your workload, this may not be
> intended, and it may cause spikes -- which will lead to the issues you
> complain.
>
> I'll stop here, and suggest you read this:
>
> http://www.westnet.com/~gsmith/content/postgresql/chkp-bgw-83.htm
>
> for details about this subject. As noted there, if you are running 8.3+,
> pg_stat_bgwriter will help you to tune checkpoint & bgwriter settings.
>
> -HTH.

Checkpoint_timeout is the default and that looks like 5 mins (300
seconds). And is obviously why I have such a discrepancy between time
reached and requested.

Thank you sir, that's actually the page that I've spent much of my
time on this eve :)  I'll continue to read and check my configuration
settings.

Tory



view thread (17+ messages)  latest in thread

Message-ID: <8a547c841002252301g49d7f183ue0909929de09d20@mail.gmail.com>
Permalink:  ../8a547c841002252301g49d7f183ue0909929de09d20@mail.gmail.com/
Also on:    postgresql.org/message-id/8a547c841002252301g49d7f183ue0909929de09d20@mail.gmail.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: tmblue@gmail.com, devrim@gunduz.org
  Subject: Re: bgwriter, checkpoints, curious (seeing delays)
  In-Reply-To: <8a547c841002252301g49d7f183ue0909929de09d20@mail.gmail.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