From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Greg Smith <greg@2ndQuadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: KONDO Mitsumasa <kondo.mitsumasa@lab.ntt.co.jp>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Improvement of checkpoint IO scheduler for stable transaction responses
Date: Thu, 18 Jul 2013 12:00:45 -0400
Message-ID: <20130718160045.GN4165@eldon.alvh.no-ip.org> (raw)
In-Reply-To: <51E80CBC.10204@2ndQuadrant.com>
References: <51BDCB6C.1090507@vmware.com>
<51BEB6F5.7070907@lab.ntt.co.jp>
<51C40EF4.1080201@lab.ntt.co.jp>
<51C9D03B.10107@vmware.com>
<CA+TgmoZ+ofyg4e+hRBTnnfrC7M2ATX-Pg0k4AtyHx60A+_DFhQ@mail.gmail.com>
<51C9FD5C.5050706@vmware.com>
<CA+TgmoZj-0CFLbjceMtgi1t_=hpfe9z8uSa+D0g77sNYcFy04w@mail.gmail.com>
<51E2F865.8030406@2ndQuadrant.com>
<CA+TgmoY=GTANT6uNV4Ds6H6K0sRuWxSHErOaHSVDLvMPxYwqDA@mail.gmail.com>
<51E80CBC.10204@2ndQuadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Greg Smith escribió:
> On 7/18/13 11:04 AM, Robert Haas wrote:
> >On a system where fsync is sometimes very very slow, that
> >might result in the checkpoint overrunning its time budget - but SO
> >WHAT?
>
> Checkpoints provide a boundary on recovery time. That is their only
> purpose. You can always do better by postponing them, but you've
> now changed the agreement with the user about how long recovery
> might take.
>
> And if you don't respect the checkpoint boundary, what you can't do
> is then claim better execution performance than something that did.
> It's always possible to improvement throughput by postponing I/O.
> SO WHAT? If that's OK, you don't need complicated logic to do that.
> Increase checkpoint_timeout. The system with checkpoint_timeout at
> 6 minutes will always outperform one where it's 5.
I think the idea is to have a system in which most of the time the
recovery time will be that for checkpoint_timeout=5, but in those
(hopefully rare) cases where checkpoints take a bit longer, the recovery
time will be that for checkpoint_timeout=6.
In any case, if the system crashes past minute 5 after the previous
checkpoint (the worst possible timing), the current checkpoint will have
already started, so recovery will take slightly less time because some
flush work had already been done.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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: alvherre@2ndquadrant.com, greg@2ndQuadrant.com, robertmhaas@gmail.com, hlinnakangas@vmware.com, kondo.mitsumasa@lab.ntt.co.jp
Subject: Re: Improvement of checkpoint IO scheduler for stable transaction responses
In-Reply-To: <20130718160045.GN4165@eldon.alvh.no-ip.org>
* 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