postgresql.conf shared buffers

Started by kmover 19 years ago4 messagesgeneral
Jump to latest
#1km
km@mrna.tn.nic.in

Hi all,

- What does the shared_buffers setting do ?
- Does it mean that that the postgres cannot access most of the physical RAM but limited to the memory setting (shared_buffers) specified ?
- How do i relate and set max_connections and shared_buffers?
- Is there a thumb rule to determine shared_buffers from max connections ?
- I see , by default max_connections set to 100 and shared_buffers to 1000 - does 1000 mean 1000 bytes or KB ?
- Also postgres will not start if the shared_buffers value exceeds the kernel setting of SHMMAX. do i need to recompile the kernel to increase this value ? or is there any workaround ?

tia,
regards,
KM

#2Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: km (#1)
Re: postgresql.conf shared buffers

Please take a look at
http://www.varlena.com/GeneralBits/Tidbits/annotated_conf_e.html first.

In a nutshell, set shared_buffers to between 10% and 25% of your memory
if it's a server. And increase estimated_cache_size to something close
to how much memory you have.

On Tue, Oct 03, 2006 at 07:50:42PM +0530, km wrote:

Hi all,

- What does the shared_buffers setting do ?
- Does it mean that that the postgres cannot access most of the physical RAM but limited to the memory setting (shared_buffers) specified ?
- How do i relate and set max_connections and shared_buffers?
- Is there a thumb rule to determine shared_buffers from max connections ?
- I see , by default max_connections set to 100 and shared_buffers to 1000 - does 1000 mean 1000 bytes or KB ?
- Also postgres will not start if the shared_buffers value exceeds the kernel setting of SHMMAX. do i need to recompile the kernel to increase this value ? or is there any workaround ?

tia,
regards,
KM

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

#3Alexander Staubo
alex@purefiction.net
In reply to: Jim Nasby (#2)
Re: postgresql.conf shared buffers

On Oct 11, 2006, at 03:34 , Jim C. Nasby wrote:

And increase estimated_cache_size to something close
to how much memory you have.

That would be "effective_cache_size".

Alexander.

#4Harald Armin Massa
haraldarminmassa@gmail.com
In reply to: Jim Nasby (#2)
Re: postgresql.conf shared buffers

Jim, list,

from your link:

ttp://www.varlena.com/GeneralBits/Tidbits/annotated_conf_e.html

I quote:

"""As a rule of thumb, observe shared memory usage of PostgreSQL with tools
like ipcs and determine the setting. Remember that this is only half the
story. You also need to set effective_cache_size so that postgreSQL will use
available memory optimally.
"""

and add the question (not necessarily to you):

-what is the best way to obsere shared memory usage on win32?

- which memory-size should be taken for "effective_cache_size" on windows
servers with multpile purposes (i.e.: more then PostgreSQL running on them)
Available are (propable ones): physical memory, system cache, available
memory (depends on system load)

Harald

--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more web frameworks than keywords.