Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WemDs-0002Un-55 for pgsql-performance@arkaria.postgresql.org; Mon, 28 Apr 2014 14:07:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WemDr-0007Up-HK for pgsql-performance@arkaria.postgresql.org; Mon, 28 Apr 2014 14:07:55 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WemDq-0007TO-5k for pgsql-performance@postgresql.org; Mon, 28 Apr 2014 14:07:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WemDo-0004EW-3Y for pgsql-performance@postgresql.org; Mon, 28 Apr 2014 14:07:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s3SE7bnO010040; Mon, 28 Apr 2014 10:07:37 -0400 From: Tom Lane To: Elanchezhiyan Elango cc: Tomas Vondra , pgsql-performance@postgresql.org Subject: Re: Checkpoints and slow queries In-reply-to: References: <535D88B6.5090002@fuzzy.cz> Comments: In-reply-to Elanchezhiyan Elango message dated "Sun, 27 Apr 2014 22:50:08 -0700" Date: Mon, 28 Apr 2014 10:07:37 -0400 Message-ID: <10039.1398694057@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) 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 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. 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