pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bill Moran <wmoran@potentialtech.com>
To: Sorin N. Ciolofan <ciolofan@ics.forth.gr>
Cc: 'Shoaib Mir' <shoaibmir@gmail.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: [GENERAL] Increasing the shared memory
Date: Mon, 2 Apr 2007 11:32:22 -0400
Message-ID: <20070402113222.9415258c.wmoran@potentialtech.com> (raw)
In-Reply-To: <20070402145131.4D83A8E40FC@mailhost.ics.forth.gr>
References: <bf54be870704020300u21fcf0fq5c8950d7dfbe9e1@mail.gmail.com>
	<20070402145131.4D83A8E40FC@mailhost.ics.forth.gr>

In response to "Sorin N. Ciolofan" <ciolofan@ics.forth.gr>:
> 
>             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
> <http://www.postgresql.org/docs/current/static/runtime-config-connection.htm
> 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



view thread (14+ messages)  latest in thread

Message-ID: <20070402113222.9415258c.wmoran@potentialtech.com>
Permalink:  ../20070402113222.9415258c.wmoran@potentialtech.com/
Also on:    postgresql.org/message-id/20070402113222.9415258c.wmoran@potentialtech.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: wmoran@potentialtech.com, ciolofan@ics.forth.gr, shoaibmir@gmail.com, pgsql-general@postgresql.org
  Subject: Re: [GENERAL] Increasing the shared memory
  In-Reply-To: <20070402113222.9415258c.wmoran@potentialtech.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox