Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UzqL8-0001il-6D for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jul 2013 15:41:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UzqL7-0002or-E9 for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jul 2013 15:41:57 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UzqL5-0002ok-Vk for pgsql-hackers@postgresql.org; Thu, 18 Jul 2013 15:41:56 +0000 Received: from moutng.kundenserver.de ([212.227.17.9]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UzqL3-0005XI-AX for pgsql-hackers@postgresql.org; Thu, 18 Jul 2013 15:41:55 +0000 Received: from [192.168.1.110] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0LrGCe-1TzNHF1JqG-013RPi; Thu, 18 Jul 2013 17:41:49 +0200 Message-ID: <51E80CBC.10204@2ndQuadrant.com> Date: Thu, 18 Jul 2013 11:41:48 -0400 From: Greg Smith User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Robert Haas CC: Heikki Linnakangas , KONDO Mitsumasa , PostgreSQL-development Subject: Re: Improvement of checkpoint IO scheduler for stable transaction responses References: <51B5AFB1.5030404@lab.ntt.co.jp> <51BDCB6C.1090507@vmware.com> <51BEB6F5.7070907@lab.ntt.co.jp> <51C40EF4.1080201@lab.ntt.co.jp> <51C9D03B.10107@vmware.com> <51C9FD5C.5050706@vmware.com> <51E2F865.8030406@2ndQuadrant.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:0T7UbT1F8s2OvX7OCfPuuOwlBUcYCHAZkdc22/udHe3 f+ovlKZ92lbB/bP7sjOkOoqnWB/GF1ctvaPxDo2lYhNjxMg4ng iJDcFZMlJg1Rq1QVdEa228hls7wBW0QmGTdubCy5cri32zUzjB OFmX541RFrKwZ5cGdy/Ur2GVyyzaQiF0TUML6EjUnqJlgW0IVv QVk6IYyeX+eY0bCmGryLsLwtZ++6bXVHjyVQOp+q3b2GyZVu9F 4HVAmIYwatgPbPl2uxqz8GTTJyR3cPuoZsGdclqLgbtKXp7Nm+ /yUjt9hLWPXT8CZZhO/TeONlIEqigHTLAah/e95ngz/wmVZJhB UQatZFWEyTVmxD7VBsVA= X-Pg-Spam-Score: -0.0 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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. You don't need to introduce a feedback loop--something that has significant schedule stability implications if it gets out of control--just to spread I/O out further. I'd like to wander down the road of load-sensitive feedback for database operations, especially for maintenance work. But if I build something that works mainly because it shifts the right edge of the I/O deadline forward, I am not fooled into thinking I did something awesome. That's cheating, getting better performance mainly by throwing out the implied contract with the user--the one over their expected recovery time after a crash. And I'm not excited about complicating the PostgreSQL code to add a new way to do that, not when checkpoint_timeout is already there with a direct, simple control on the exact same trade-off. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers