Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id A0E8D9FB2F5; Mon, 2 Apr 2007 12:32:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 93155-04-4; Mon, 2 Apr 2007 12:32:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.potentialtech.com (internet.potentialtech.com [66.167.251.6]) by postgresql.org (Postfix) with ESMTP id AEA859FB7BE; Mon, 2 Apr 2007 12:32:24 -0300 (ADT) Received: from vanquish.pgh.priv.collaborativefusion.com (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTP id A1A48EBC6D; Mon, 2 Apr 2007 11:32:23 -0400 (EDT) Date: Mon, 2 Apr 2007 11:32:22 -0400 From: Bill Moran To: "Sorin N. Ciolofan" Cc: "'Shoaib Mir'" , , Subject: Re: [GENERAL] Increasing the shared memory Message-Id: <20070402113222.9415258c.wmoran@potentialtech.com> In-Reply-To: <20070402145131.4D83A8E40FC@mailhost.ics.forth.gr> References: <20070402145131.4D83A8E40FC@mailhost.ics.forth.gr> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.11; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/16 X-Sequence-Number: 25080 In response to "Sorin N. Ciolofan" : > > I've a value of 1000 set for shared_buffers, does this means > that I use 8kbX1000=8Mb of Shared Mem? > > > > The definition from the manual is quite confusing: > > > > shared_buffers (integer) > > Sets the amount of memory the database server uses for shared memory > buffers. The default is typically 32 megabytes (32MB), but may be less if > your kernel settings will not support it (as determined during initdb). This > setting must be at least 128 kilobytes and at least 16 kilobytes times > max_connections > l#GUC-MAX-CONNECTIONS> . > > > > What does the integer number represent? Number of shared buffers? If yes, > what size does each shared buffer have? > > "The default is typically 32 megabytes" suggests that this integer could > also represent the number of megabytes?!? > > In the postgresql.conf file is an ambiguous comment that could induce the > idea that each shared buffer has 8 kb. > > So, which is the meaning of this integer? Older versions of PostgreSQL, the number was the _number_ of shared buffers. Each buffer is typically 8K, but this can be altered at compile time (I believe) and the PGDG has no way to know for sure if whatever packaged version you installed might have done so. However, on more recent versions of Postgres (although I don't know exactly what version first included this) you can specify this value as "M" or "G" to specify a number of megabytes or gigabytes. Internally, this is still converted to a number of 8K buffers, but it makes the config file easier to read and understand. -- Bill Moran http://www.potentialtech.com