Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id E89CB63520D for ; Thu, 15 Apr 2010 14:47:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 11472-02 for ; Thu, 15 Apr 2010 17:47:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 2A658634E0C for ; Thu, 15 Apr 2010 14:47:33 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 15 Apr 2010 12:47:32 -0500 Message-Id: <4BC70ADE0200002500030965@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 15 Apr 2010 12:47:26 -0500 From: "Kevin Grittner" To: "Marinos Yannikos" Cc: "pgsql-performance" , "Tom Lane" Subject: Re: 8.3.9 - latency spikes with Linux (and tuning for consistently low latency) References: <4BC742C8.2050301@geizhals.at><4BC742C8.2050301@geizhals.at> <4674.1271353080@sss.pgh.pa.us> In-Reply-To: <4674.1271353080@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-10 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/186 X-Sequence-Number: 38436 Tom Lane wrote: > Have you checked whether the spikes correlate with checkpoints? > Turn on log_checkpoints and watch for awhile. If so, fooling with > the checkpoint parameters might give some relief. If that by itself doesn't do it, I've found that making the background writer more aggressive can help. We've had good luck with: bgwriter_lru_maxpages = 1000 bgwriter_lru_multiplier = 4.0 If you still have checkpoint-related latency issues, you could try scaling back shared_buffers, letting the OS cache handle more of the data. Also, if you have a RAID controller with a battery-backed RAM cache, make sure it is configured for write-back. -Kevin