Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 1F10C9FB3EA for ; Tue, 3 Jul 2007 14:03:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 69582-09 for ; Tue, 3 Jul 2007 14:03:18 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.226]) by postgresql.org (Postfix) with ESMTP id 8D4179FB2E3 for ; Tue, 3 Jul 2007 14:03:19 -0300 (ADT) Received: by nz-out-0506.google.com with SMTP id l8so1090306nzf for ; Tue, 03 Jul 2007 10:03:18 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=nAJOB/qxW5t8r+YQtIDPItpAq4ZXcJeomrKD1JaO2noEO4sVatZqi1UIFvQh7RTFigCrq2E/+iqC+3xEml9cn1bWVwM2RqkYxLnkNf3B9LkPLuqXS2zJHxtLOdxk+GoDlD1QRTPnjVhH2WjcwY6RgcjBp9S9K8n8NILPuljWNGY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=rNSlBt7j1ufxBF1oBXsnovyGXI26IFk4fsPEFpYtOc9CrhN79iA00iA58iGuuM475eogHVh0apVYuf+ZlMeFJSYFOG+7QIYbBsIVg5LhCIq/nwd6pemHuHyZhBxhOzOQ481PvgJK5wZ6R2oEFp9pJ2I6iwyeTT9H4eyZ0LNLolM= Received: by 10.143.16.9 with SMTP id t9mr446599wfi.1183482197742; Tue, 03 Jul 2007 10:03:17 -0700 (PDT) Received: by 10.143.30.13 with HTTP; Tue, 3 Jul 2007 10:03:17 -0700 (PDT) Message-ID: <97e6e20f0707031003q69f7bb32kf69531f39cd416cd@mail.gmail.com> Date: Wed, 4 Jul 2007 01:03:17 +0800 From: "Ho Fat Tsang" To: "Greg Smith" Subject: Re: PostgreSQL 8.0 occasionally slow down Cc: pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_93669_20590462.1183482197707" References: <97e6e20f0706272354m5e42c91em177c8b80abb2ea52@mail.gmail.com> <468361A9.1040308@archonet.com> <97e6e20f0706280101y543b871ao4cbf85e57f07f7e9@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/13 X-Sequence-Number: 25697 ------=_Part_93669_20590462.1183482197707 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Greg. 2007/6/28, Greg Smith : > > 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. Yes, Thank you for your suggestion. i have found that the slowdown time does not align to checkpoint after i turned on the warning. The issue is related what Richard has been mentioned - Something outsides PG doing many write operations to pages. -- > * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD > > ---------------------------(end of broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match > ------=_Part_93669_20590462.1183482197707 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Greg.

2007/6/28, Greg Smith <gsmith@gregsmith.com>:
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.

Yes, Thank you for your suggestion. i have found that the slowdown time does not align to checkpoint after i turned on the warning. The issue is related what Richard has been mentioned - Something outsides PG doing many write operations to pages.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

------=_Part_93669_20590462.1183482197707--