Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 44C942E00A3 for ; Wed, 23 Apr 2008 08:11:30 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 77630-10 for ; Wed, 23 Apr 2008 08:11:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sd-2317.dedibox.fr (sd-2317.dedibox.fr [88.191.17.192]) by developer.postgresql.org (Postfix) with ESMTP id 90F442E008E for ; Wed, 23 Apr 2008 08:11:25 -0300 (ADT) Received: from [192.168.10.64] (ASte-Genev-Bois-153-1-40-84.w83-200.abo.wanadoo.fr [83.200.90.84]) by sd-2317.dedibox.fr (Postfix) with ESMTP id A09CCA199; Wed, 23 Apr 2008 13:11:22 +0200 (CEST) Message-ID: <480F1955.7020300@lelarge.info> Date: Wed, 23 Apr 2008 13:11:17 +0200 From: Guillaume Lelarge User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: =?ISO-8859-2?Q?Gerd_K=F6nig?= CC: pgsql-admin@postgresql.org Subject: Re: confused of buffers and memory settings References: <480F0C92.8050907@transporeon.com> In-Reply-To: <480F0C92.8050907@transporeon.com> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/233 X-Sequence-Number: 28997 Hi, Gerd König a écrit : > we're quite new to Postgres and we're going to start using Postgres8.3 > on Opensuse10.3 64 bit. We have a dedicated dbserver with 8GB RAM, and > now I'm not sure how to deal with the memory/buffer settings. The db > will be accessed heavily (~20 requests/sec.) with a read/write ration of > 50:50, yes, a lot of write activity. > > I thought of setting "shared_buffers" to 750000 (~6GB) but how depends > this on the kernel buffer setting in /etc/sysctl.conf (what is the > interaction between these two settings?). > I know the variable "shmmax" can be defined, but currently there's no > such entry. > shared_buffers should be set to 1/4 of your available RAM. It's a start value, you can tweak it after that, but you would probably be better advised to use 2GB to begin with. > The meaning of "work_mem" / "maintenance_work_mem" and "wal_buffers" is > also not clear. The maintenance_work_mem influences the size of the WAL > logs..?!? > work_mem is used for sort and group operations (for example, ORDER BY). It's not part of the shared_buffers memory and it will be used by every postgres process. So you better have small values, something between 1 MB and 64 MB. maintenance_work_mem is used for maintenance operations (VACUUM, CREATE INDEX and another one I don't remember now). You can use bigger values because you won't have many operations of this kind that will happen at the same time. Probably 256 MB would be a good start value. > What else are "top performance related" options for the usage scenario I > described earlier ? > Checkpoint and WAL settings are important ones. FSM size is another one. Regards. -- Guillaume. http://www.postgresqlfr.org http://dalibo.com