Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 1AA4A9FC16F for ; Thu, 7 Jun 2007 16:27:02 -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 91394-08 for ; Thu, 7 Jun 2007 16:26:58 -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 D04FF9FC158 for ; Thu, 7 Jun 2007 16:26:58 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id l57JQxLl029421 for ; Thu, 7 Jun 2007 15:26:59 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id l57JQw86029418 for ; Thu, 7 Jun 2007 15:26:59 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Thu, 7 Jun 2007 15:26:58 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: pgsql-performance@postgresql.org Subject: Re: Getting Slow In-Reply-To: <14D118F0-20F6-4096-93D7-E6CB2893E895@sweetwater.com> Message-ID: References: <14D118F0-20F6-4096-93D7-E6CB2893E895@sweetwater.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/140 X-Sequence-Number: 25173 On Thu, 7 Jun 2007, Joe Lester wrote: > Memory: 4GB RAM > > shared_buffers = 10000 > work_mem = 2048 > effective_cache_size = 30000 With these parameters, your server has 80MB dedicated to its internal caching, is making query decisions assuming the operating system only has 240MB of memory available for its caching, and is only allowing individual clients to have a tiny amount of memory to work with before they have to swap things to disk. You're not giving it anywhere close to enough memory to effectively work with a 5GB database, and your later reports show you're barely using 1/2 the RAM in this system usefully. Multiply all these parameters by 10X, restart your server, and then you'll be in the right ballpark for a system with 4GB of RAM. There might be some other tuning work left after that, but these values are so far off that until you fix them it's hard to say what else needs to be done. See http://www.westnet.com/~gsmith/content/postgresql/pg-5minute.htm for more information on this topic. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD