X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 11BC652A72 for ; Fri, 6 May 2005 15:38:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 60745-01 for ; Fri, 6 May 2005 18:38:04 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id E875A53551 for ; Fri, 6 May 2005 15:38:02 -0300 (ADT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 06 May 2005 13:38:03 -0500 Subject: Re: memory allocation ; postgresql-8.0 From: Scott Marlowe To: "Kavan, Dan (IMS)" Cc: pgsql-admin@postgresql.org In-Reply-To: <782D2A81EC812642B857B03B506E0B44309E88@granite.omni.imsweb.com> References: <782D2A81EC812642B857B03B506E0B44309E88@granite.omni.imsweb.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1115404683.3868.86.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 06 May 2005 13:38:03 -0500 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/72 X-Sequence-Number: 17501 On Fri, 2005-05-06 at 13:28, Kavan, Dan (IMS) wrote: > Hi, > > I am reserving 2.1 GB of memory for postgres to use with SuSE linux 9.0 > (SLES) in sysctl.conf. > I have configured postgres to use 1.9 GB of memory so it won't go over > the 2.1 cap (postgresql.conf). > I have a total of 4GB of memory. Somewhere I read to keep half of the > memory for other things. This server is dedicated to postgresql. Does > anyone agree with just using 2GB? Does anyone know where I might have > read that? Unless you routinely actually handle data sets that are 1.9 gigabytes in size, it's probably not a great idea. PostgreSQL doesn't really cache data in the classical sense. All the data stored in its internal buffers is tossed away when the last backend referencing said material stops referencing it. Plus, there's a fair bit of overhead to managing such a large data set, and, until 8.0, the algorithms for doing so with efficiency weren't a part of PostgreSQL. While some future version might incorporate genuine caching that could utilize all that memory, for now, one is still better off giving postgresql about 250 megabytes max and letting the kernel use the rest for caching.