Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 8B86C9FB427 for ; Mon, 21 May 2007 15:40:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 30545-02 for ; Mon, 21 May 2007 15:40:13 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by postgresql.org (Postfix) with ESMTP id 8822A9FB44A for ; Mon, 21 May 2007 15:40:12 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id k3so8385ugf for ; Mon, 21 May 2007 11:40:11 -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:content-transfer-encoding:content-disposition:references; b=DTO6KSziuAisExp14YlEhBgtF7T9M+QHNQcegYAXB5LblTufoIwcU9N1dqdclGZMtdntSTbyEPZs8EbxtyCzrj31qEZrJfFncaXLK+3k27n9ldvKjQBRLxIs9l9WB0zsIc5zzLnLFCZgvQG+mpQ4nttffOd7abwXtWOSM1yNPxw= 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:content-transfer-encoding:content-disposition:references; b=RujCUxUIaehE4+WXcc0sLMQ/cp8OBMD5GaGiJqxyTJczp17AiInlHM/TFx+zqR5LMZMNiaLV0PkNq9ZReUpjqseBahINuy28qFVe88xoblXXUhpYBS+nKsgchYjKdj//0wpMLz3gp/AYZWlublT38CP233/JVKeXakAY6aRz/ic= Received: by 10.78.162.4 with SMTP id k4mr1240853hue.1179772810993; Mon, 21 May 2007 11:40:10 -0700 (PDT) Received: by 10.78.58.19 with HTTP; Mon, 21 May 2007 11:40:10 -0700 (PDT) Message-ID: Date: Mon, 21 May 2007 14:40:10 -0400 From: "Merlin Moncure" To: "Chris Hoover" Subject: Re: Increasing Shared_buffers = slow commits? Cc: "PGSQL Performance" In-Reply-To: <1d219a6f0705210742rbd45663oc2b54bd3d1685305@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1d219a6f0705210742rbd45663oc2b54bd3d1685305@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/397 X-Sequence-Number: 24787 On 5/21/07, Chris Hoover wrote: > Hi everyone, > > I am testing my shared_buffers pool and am running into a problem with slow > inserts and commits. I was reading in several places that in the 8.X > PostgreSQL engines should set the shared_buffers closer to 25% of the > systems memory. On me development system, I have done that. We have 9GB of > memory on the machine and I set my shared_buffers = 292188 (~25% of total > memory). > > When my users logged in today, they are noticing the system is much slower. > Tracing my log files, I am seeing that most of the commits are taking over > 1sec. I am seeing a range of 1-5 seconds per commit. > > What is the correlation here between the shared_buffers and the disk > activity? This is not something I would have expected at all. have you overcommited your memory? maybe you are thrashing a bit...long commit times are usually symptom of high iowait. can you pop up top and monitor iowait for a bit? can you lower shared buffers again and confirm that performance increases? how about doing some iostat/vmstat runs and looking for values that are significantly different depending on the shared buffers setting. merlin