Paul McGarry wrote:

Based on the Performance Checklist [1]  and
Annotated Postgresql.conf [2] I understand that:
-I should have less than 1/3 of my total memory as shared_buffers
-For my server 15000 is a fairly reasonable starting point for
shared_buffers which is ~120MB
-I have 100 max_connections.

So I was going to set SHMMAX to 134217728 (ie 128 Meg)

What should SHMALL be?

The current system values are
[EMAIL PROTECTED]:~/data$ cat /proc/sys/kernel/shmmax
[EMAIL PROTECTED]:~/data$ cat /proc/sys/kernel/shmall

ie SHMALL seems to be 1/16 of SHMMAX

No - shmall is in 4k pages _ so this amounts to 8G! This is fine - unless you wish to decrease it in order to prevent too many shared memory applications running.

BTW - the docs have been amended for 8.1 to suggest shmmax=134217728 and shmall=2097152 (was going to point you at them - but I cannot find them on the Postgresql site anymore...).

There seems to be some longstanding confusion in the Linux community about the units for shmall (some incorrect documentation from Oracle on the issue does not help I am sure....) - to the point where I downloaded kernel source to check (reproducing here):


#define SHMMAX 0x2000000         /* max shared seg size (bytes) */
#define SHMMIN 1             /* min shared seg size (bytes) */
#define SHMMNI 4096          /* max num of segs system wide */
#define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) /* max shm system wide (pages) */

Hope that helps

Best wishes


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
     joining column's datatypes do not match

Reply via email to