Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 5ACF29FBB63 for ; Thu, 28 Jun 2007 05:01:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 86106-06-3 for ; Thu, 28 Jun 2007 05:01:30 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.228]) by postgresql.org (Postfix) with ESMTP id B8AFF9FBEE7 for ; Thu, 28 Jun 2007 05:01:32 -0300 (ADT) Received: by nz-out-0506.google.com with SMTP id m22so212130nzf for ; Thu, 28 Jun 2007 01:01:31 -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=bSpUI3/DgnzaEIyfin/bJjt3UtYQ+N74i6r6Ko/PVAFnSjkMdDrmgIYE/E0wcF+2ueXDK0QEfDWceY2ceoxgUVFlQ9zrhS1BYXWwh7tgenTbxSPxA+mHeESC6EYqCE2bT3vR/IDOgcQqfNLgAOvx+B5XpsiUAxj1xaMyEo9CP8Y= 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=gVePuxlTA2/cmOXS90S0dfux/0COHXvNvSeSfHc9Er07SODmIvixPNXyZem0Q/D1SUNo+zyt4m/hOWR9ms7+Jj2vs74/LtQiS6Q4GH5QC87ZH/0niymSZs3krheCnoCP47hv3IfUf/Ww9CUMREz895V2ferfIJuBs5xKMjXKJnY= Received: by 10.142.155.4 with SMTP id c4mr92544wfe.1183017690852; Thu, 28 Jun 2007 01:01:30 -0700 (PDT) Received: by 10.143.30.13 with HTTP; Thu, 28 Jun 2007 01:01:30 -0700 (PDT) Message-ID: <97e6e20f0706280101y543b871ao4cbf85e57f07f7e9@mail.gmail.com> Date: Thu, 28 Jun 2007 16:01:30 +0800 From: "Ho Fat Tsang" To: "Richard Huxton" Subject: Re: PostgreSQL 8.0 occasionally slow down Cc: pgsql-performance@postgresql.org In-Reply-To: <468361A9.1040308@archonet.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_38537_25212833.1183017690665" References: <97e6e20f0706272354m5e42c91em177c8b80abb2ea52@mail.gmail.com> <468361A9.1040308@archonet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/623 X-Sequence-Number: 25656 ------=_Part_38537_25212833.1183017690665 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Richard, I have tuned the checkpoint_timeout to 30 second which is ten times less than default and the issue is still reproduced. Do you have any recommended configuration for WAL ? Thanks Twinsen 2007/6/28, Richard Huxton : > > Ho Fat Tsang wrote: > > > > I am new for postgresql server. And now i work on a projects which > > requires postgreSQL 8.0 and Java. I don't know why the server > occasionally > > slow down a bit for every 3 minutes. > > > Do anyone can help me about this ? or any resolution for a sudden > > performance degrade ( because the application i need to develop is quite > > time-critical). > > It's probably checkpointing. PG will write updates to the transaction > log (WAL) immediately and update the main data files later. Every so > often it makes sure the data files are up-to-date and this is called > checkpointing. > > You want checkpointing to happen more often, not less. That way the load > will be less each time it happens. See the manual for details. > > -- > Richard Huxton > Archonet Ltd > ------=_Part_38537_25212833.1183017690665 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Richard,
 
   I have tuned the checkpoint_timeout to 30 second which is ten times less than default and the issue is still reproduced. Do you have any recommended configuration for WAL ?
 
Thanks
Twinsen

2007/6/28, Richard Huxton <dev@archonet.com>:
Ho Fat Tsang wrote:
>
>   I am new for postgresql server. And now i work on a projects which
> requires postgreSQL 8.0 and Java. I don't know why the server occasionally
> slow down a bit for every 3 minutes.

> Do anyone can help me about this ? or any resolution for a sudden
> performance degrade ( because the application i need to develop is quite
> time-critical).

It's probably checkpointing. PG will write updates to the transaction
log (WAL) immediately and update the main data files later. Every so
often it makes sure the data files are up-to-date and this is called
checkpointing.

You want checkpointing to happen more often, not less. That way the load
will be less each time it happens. See the manual for details.

--
   Richard Huxton
   Archonet Ltd

------=_Part_38537_25212833.1183017690665--