From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bossart, Nathan <bossartn@amazon.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Bernd Helmle <mailings@oopsware.de>
Cc: tsunakawa.takay@fujitsu.com <tsunakawa.takay@fujitsu.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Change default of checkpoint_completion_target
Date: Fri, 15 Jan 2021 23:05:02 +0100
Message-ID: <9cbef4ca-807f-e65a-08bf-4f376aecea41@enterprisedb.com> (raw)
In-Reply-To: <20210115215156.uuouk2u44gac6pts@alap3.anarazel.de>
References: <20201207175329.GM16415@tamriel.snowman.net>
<5285eb02-3340-7728-9f62-1a4365eda850@enterprisedb.com>
<20201207191742.GN16415@tamriel.snowman.net>
<7CFCC359-5786-40DB-90A8-BDB0F08F2ABC@amazon.com>
<3258483.1607449295@sss.pgh.pa.us>
<20210115215156.uuouk2u44gac6pts@alap3.anarazel.de>
On 1/15/21 10:51 PM, Andres Freund wrote:
> Hi,
>
> On 2020-12-08 12:41:35 -0500, Tom Lane wrote:
>> FWIW, I kind of like the idea of getting rid of it completely.
>> Is there really ever a good reason to set it to something different
>> than that? If not, well, we have too many GUCs already, and each
>> of them carries nonzero performance, documentation, and maintenance
>> overhead.
>
> I like the idea of getting rid of it too, but I think we should consider
> evaluating the concrete hard-coded value a bit more careful than just
> going for 0.9 based on some old recommendations in the docs. It not
> being changeable afterwards...
>
> I think it might be a good idea to immediately change the default to
> 0.9, and concurrently try to evaluate whether it's really the best value
> (vs 0.95, 1 or ...).
>
> FWIW I have seen a few cases in the past where setting the target to
> something very small helped, but I think that was mostly because we
> didn't yet tell the kernel to flush dirty data more aggressively.
>
Yeah. The flushing probably makes that mostly unnecessary, but we still
allow disabling that. I'm not really convinced replacing it with a
compile-time #define is a good idea, exactly because it can't be changed
if needed.
As for the exact value, maybe the right solution is to make it dynamic.
The usual approach is to leave "enough time" for the kernel to flush
dirty data, so we could say 60 seconds and calculate the exact target
depending on the checkpoint_timeout.
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
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: tomas.vondra@enterprisedb.com, andres@anarazel.de, tgl@sss.pgh.pa.us, bossartn@amazon.com, sfrost@snowman.net, peter.eisentraut@enterprisedb.com, michael@paquier.xyz, alvherre@alvh.no-ip.org, laurenz.albe@cybertec.at, mailings@oopsware.de, tsunakawa.takay@fujitsu.com
Subject: Re: Change default of checkpoint_completion_target
In-Reply-To: <9cbef4ca-807f-e65a-08bf-4f376aecea41@enterprisedb.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