Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WesMh-0000MT-T1 for pgsql-performance@arkaria.postgresql.org; Mon, 28 Apr 2014 20:41:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WesMh-0001pe-BT for pgsql-performance@arkaria.postgresql.org; Mon, 28 Apr 2014 20:41:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WesMg-0001oE-0N for pgsql-performance@postgresql.org; Mon, 28 Apr 2014 20:41:26 +0000 Received: from smtp-out1.gransy.com ([77.78.126.51]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WesMd-0003lO-DL for pgsql-performance@postgresql.org; Mon, 28 Apr 2014 20:41:25 +0000 Received: from smtp-out.gransy.com (localhost [127.0.0.1]) by smtp-out1.gransy.com (Postfix) with ESMTP id 31D6A360036 for ; Mon, 28 Apr 2014 22:41:22 +0200 (CEST) Received: from smtp.gransy.com (smtp.simplia.cz [77.78.126.20]) by smtp-out1.gransy.com (Postfix) with ESMTP id E664A360005 for ; Mon, 28 Apr 2014 22:41:21 +0200 (CEST) Received: from [192.168.1.163] (ip-78-45-139-138.net.upcbroadband.cz [78.45.139.138]) (Authenticated sender: tv@fuzzy.cz) by smtp.gransy.com (Postfix) with ESMTPSA id 3BD0119A0455 for ; Mon, 28 Apr 2014 22:41:16 +0200 (CEST) Message-ID: <535EBCEC.4000501@fuzzy.cz> Date: Mon, 28 Apr 2014 22:41:16 +0200 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Checkpoints and slow queries References: <535D88B6.5090002@fuzzy.cz> <10039.1398694057@sss.pgh.pa.us> In-Reply-To: <10039.1398694057@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 28.4.2014 16:07, Tom Lane wrote: > Elanchezhiyan Elango writes: >>> The problem is that while this makes the checkpoints less >>> frequent, it accumulates more changes that need to be written to >>> disk during the checkpoint. Which means the impact more severe. > >> True. But the checkpoints finish in approximately 5-10 minutes >> every time (even with checkpoint_completion_target of 0.9). > > There's something wrong with that. I wonder whether you need to > kick checkpoint_segments up some more to keep the checkpoint from > being run too fast. > > Even so, though, a checkpoint spread over 5-10 minutes ought to > provide the kernel with enough breathing room to flush things. It > sounds like the kernel is just sitting on the dirty buffers until it > gets hit with fsyncs, and then it's dumping them as fast as it can. > So you need some more work on tuning the kernel parameters. There's certainly something fishy, because although this is the supposed configuration: checkpoint_segments = 250 checkpoint_timeout = 1h checkpoint_completion_target = 0.9 the checkpoint logs typically finish in much shorter periods of time. Like this, for example: > > regards, tom lane > > -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance