pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: pgsql-performance@postgresql.org
Subject: Re: checkpoints, proper config
Date: Thu, 10 Dec 2015 23:40:18 +0100
Message-ID: <5669FF52.2030303@2ndquadrant.com> (raw)
In-Reply-To: <5669B47B.9010504@commandprompt.com>
References: <CAEaSS0af0GpqQYSwePKRQq6RtX-x9NXDm=jOXcbcGAmGHXapFw@mail.gmail.com>
	<5669B47B.9010504@commandprompt.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 12/10/2015 06:20 PM, Joshua D. Drake wrote:
> On 12/10/2015 01:12 AM, Tory M Blue wrote:
>
>> checkpoint_timeout = 5min
>>
>> checkpoint_completion_target = 0.9
>>
>
> The above is your problem. Make checkpoint_timeout = 1h . Also,
> considering turning synchronous_commit off.

I doubt that. The report mentioned that the checkpoints happen 0.027... 
minutes apart (assuming the minutes_between_checkpoints is computed in a 
sane way). That's way below 5 minutes, so the checkpoints have to be 
triggered by something else - probably by running out of segments, but 
we don't know the value before Tory increased it to 150.

Also, recommending synchronous_commit=off is a bit silly, because not 
only it introduces data loss issues, but it'll likely cause even more 
frequent checkpoints.

Tory, please enable logging of checkpoints (log_checkpoints=on). Also, I 
don't think it makes much sense to set

    (checkpoint_warning > checkpoint_timeout)

as it kinda defeats the whole purpose of the warning.

regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (11+ messages)  latest in thread

Message-ID: <5669FF52.2030303@2ndquadrant.com>
Permalink:  ../5669FF52.2030303@2ndquadrant.com/
Also on:    postgresql.org/message-id/5669FF52.2030303@2ndquadrant.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: tomas.vondra@2ndquadrant.com
  Subject: Re: checkpoints, proper config
  In-Reply-To: <5669FF52.2030303@2ndquadrant.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