Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 72BBAB5DBE0 for ; Wed, 5 Oct 2011 02:32:20 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 76480-09 for ; Wed, 5 Oct 2011 05:32:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mail.postgresql.org (Postfix) with ESMTP id 400D3B5DBD9 for ; Wed, 5 Oct 2011 02:32:14 -0300 (ADT) Received: from [75.247.112.93] (93.sub-75-247-112.myvzw.com [75.247.112.93]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0LnHhK-1QekQ13RU6-00gw5T; Wed, 05 Oct 2011 07:32:12 +0200 Message-ID: <4E8BEBD9.6070100@2ndQuadrant.com> Date: Tue, 04 Oct 2011 22:32:09 -0700 From: Greg Smith User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110818 Icedove/3.0.11 MIME-Version: 1.0 To: Venkat Balaji CC: pgsql-performance@postgresql.org Subject: Re: : PG9.0 - Checkpoint tuning and pg_stat_bgwriter References: <4E8B8960.9030903@2ndQuadrant.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:MtQgMA49A6hz2BHWrJWGmfcsjsYMDu66tjq/huScKn1 0uXLKQg90A+MzncrghvfDOsvedUcoG6W0+e+b6Sq+lqxs0lyH6 dtJ5ZVTtQ+gitRvu4H8J4CGDXo75PCB7zVQ2p+dQc2MzKtvW4E Y8lV8ioFnmlW3joM3N+Ie1QFgpvJRLqzZiuGMb2KycwtJB2FzA poZg6N8HkSjqd9DSdKYA6Cd5kkn0rM/Ayg0Moa2+/7JH/W/DJU +5n7nmg15hLt587J2N+UArarHY9wXhDueWyFgASapWdNcFEE1t IyYmTdkGw2gJNw2qr2OSD/MkRTJtl8is5amwfx+isp8XY4nTpf gEiXFJrZNWlSCmDvADFGNHYDspO9ESSSP0ksm09OW X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201110/55 X-Sequence-Number: 45277 On 10/04/2011 07:50 PM, Venkat Balaji wrote: > I was thinking to increase checkpoint_segments to around 16 or 20. > > I think 50 is a bit higher. > Don't be afraid to increase that a lot. You could set it to 1000 and that would be probably turn out fine; checkpoints will still happen every 5 minutes. Checkpoints represent a lot of the I/O in a PostgreSQL database. The main downside to making them less frequent is that recovery after a crash will take longer; a secondary one is that WAL files in pg_xlog will take up more space. Most places don't care much about either of those things. The advantage to making them happen less often is that you get less total writes. People need to be careful about going a long *time* between checkpoints. But there's very few cases where you need to worry about the segment count going too high before another one is triggered. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us