Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 069D19FB574 for ; Thu, 28 Jun 2007 10:52:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 76119-06 for ; Thu, 28 Jun 2007 10:52:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id AE8FA9FB4C3 for ; Thu, 28 Jun 2007 10:52:55 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id l5SDqsEn022056 for ; Thu, 28 Jun 2007 09:52:54 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id l5SDqsqJ022052 for ; Thu, 28 Jun 2007 09:52:54 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Thu, 28 Jun 2007 09:52:54 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: pgsql-performance@postgresql.org Subject: Re: PostgreSQL 8.0 occasionally slow down In-Reply-To: <97e6e20f0706280101y543b871ao4cbf85e57f07f7e9@mail.gmail.com> Message-ID: References: <97e6e20f0706272354m5e42c91em177c8b80abb2ea52@mail.gmail.com> <468361A9.1040308@archonet.com> <97e6e20f0706280101y543b871ao4cbf85e57f07f7e9@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/633 X-Sequence-Number: 25666 On Thu, 28 Jun 2007, Ho Fat Tsang wrote: > I have tuned the checkpoint_timeout to 30 second which is ten times less > than default and the issue is still reproduced. Doing a checkpoint every 30 seconds is crazy; no wonder your system is pausing so much. Put the timeout back to the default. What you should do here is edit your config file and set checkpoint_warning to its maximum of 3600. After that, take a look at the log files; you'll then get a warning message every time a checkpoint happens. If those line up with when you're getting the slowdowns, then at least you'll have narrowed the cause of your problem, and you can get some advice here on how to make the overhead of checkpoints less painful. The hint it will give is probably the first thing to try: increase checkpoint_segments from the default to something much larger (if it's at 3 now, try 10 instead to start), and see if the problem stops happening as frequently. Your problem looks exactly like a pause at every checkpoint, and I'm not sure what Richard was thinking when he suggested having them more often would improve things. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD