head	1.10;
access;
symbols
	REL7_1_BETA3:1.4
	REL7_1_BETA2:1.4
	REL7_1:1.4
	REL7_0_PATCHES:1.1.0.2;
locks; strict;
comment	@# @;


1.10
date	2001.02.18.18.33.58;	author momjian;	state dead;
branches;
next	1.9;

1.9
date	2001.02.16.19.43.49;	author momjian;	state Exp;
branches;
next	1.8;

1.8
date	2001.02.16.19.27.18;	author momjian;	state Exp;
branches;
next	1.7;

1.7
date	2001.02.16.16.10.06;	author momjian;	state Exp;
branches;
next	1.6;

1.6
date	2001.02.16.00.46.21;	author momjian;	state Exp;
branches;
next	1.5;

1.5
date	2001.02.16.00.17.57;	author momjian;	state Exp;
branches;
next	1.4;

1.4
date	2000.07.07.15.41.41;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	2000.06.09.16.35.24;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	2000.06.02.16.33.15;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	2000.06.02.02.28.13;	author momjian;	state dead;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2000.06.02.02.28.13;	author momjian;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	2000.06.02.16.34.42;	author momjian;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	2000.06.09.16.35.54;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.10
log
@Add copyright mentions, per Tom Lane.
@
text
@This outlines modifications to BSD/OS for running PostgreSQL:

1)  How to increase resource limits
2)  How to increase the number of shared memory buffers
3)  How to increasing the number of semaphores

Bruce Momjian (pgman@@candle.pha.pa.us)  2000-07-7

---------------------------------------------------------------------------

1)  To increase the amount of malloc'ed memory and files opened by
PostgreSQL, add this:

          :datasize-cur=256M:\
          :openfiles-cur=256:

to your /etc/login.conf file.

---------------------------------------------------------------------------

2a)  By default, only 4MB of shared memory is supported by BSDI. Keep in
mind that shared memory is not pageable.  It is locked in RAM.

The shared memory parameters are:

#define SHMMAX		/* max shared memory segment size (bytes) */
#define SHMMIN		/* min shared memory segment size (bytes) */
#define SHMMNI		/* max number of shared memory identifiers */
#define SHMSEG		/* max shared memory segments per process */
#define SHMALL		/* max amount of shared memory (pages) */

To increase the number of buffers supported by the postmaseter, add the
following to your kernel config file.  A SHMALL value of 1024 
represents 4MB of shared memory.  Increase it accordingly:

options "SHMALL=4096"
options "SHMMAX=\(SHMALL*PAGE_SIZE\)"

For those running 4.1 or later, just recompile the kernel and reboot. 
For those running earlier releases, see step 2b.

---------------------------------------------------------------------------

2b)  For 4.01 and earlier, use bpatch to find the sysptsize value for
the current kernel.  This is computed dynamically at bootup.

	$ bpatch -r sysptsize
	0x9 = 9

Next, change SYSPTSIZE to a hard-coded value.  Use the bpatch value,
plus add 1 for every additional 4MB of shared memory you desire.

options "SYSPTSIZE=13"

sysptsize can not be changed by sysctl on the fly.

---------------------------------------------------------------------------

3)  How to increasing the number of semaphores.

You may need to increase the number of sysv semaphores. By default,
PostgreSQL allocates 32 semaphores, one for each backend connection. 
This is just over half the default system total of 60.

The defaults are in /sys/sys/sem.h:

#define SEMMNI  10              /* # of semaphore identifiers */

#define SEMMNS  60              /* # of semaphores in system */

#define SEMUME  10              /* max # of undo entries per process */

#define SEMMNU  30              /* # of undo structures in system */

Set the values you want in your kernel config file, e.g.:

options "SEMMNI=40"
options "SEMMNS=240"
options "SEMUME=40"
options "SEMMNU=120"

@


1.9
log
@Update bsdi shared memory stuff.
@
text
@@


1.8
log
@Update BSDI FAQ.
@
text
@d24 8
@


1.7
log
@Update BSDI SGML.
@
text
@a58 2
/* Configuration parameters */
#ifndef SEMMNI
d60 1
a60 2
#endif
#ifndef SEMMNS
d62 1
a62 2
#endif
#ifndef SEMUME
d64 1
a64 2
#endif
#ifndef SEMMNU
a65 1
#endif
@


1.6
log
@Update bsdi faq.
@
text
@d14 1
a14 1
          :datasize-cur=600M:\
@


1.5
log
@Update bsdi faq.
@
text
@d25 1
a25 1
following to your kernel config file.  A SHMMAXPGS value of 1024 
d28 2
a29 3
options "SHMMAXPGS=4096"

The default is 1024 which allows a maximum of 4MB of shared memory.
@


1.4
log
@Remove HTML FAQ files that are really just text files.
@
text
@d24 3
a26 2
To increase the number of buffers supported by the postmaseter, increase
SHMMAXPGS by 1024 for every additional 4MB of shared memory:
d28 1
a28 1
/sys/sys/shm.h:69:#define       SHMMAXPGS       1024    /* max hardware pages...
d30 1
a30 1
The default setting of 1024 is for a maximum of 4MB of shared memory.
d46 1
a46 1
/sys/i386/i386/i386_param.c:28:#define  SYSPTSIZE 0        /* dynamically...
@


1.3
log
@Update bsdi faq.
@
text
@d5 1
d7 1
a7 1
Bruce Momjian (pgman@@candle.pha.pa.us)  2000-06-09
d48 32
@


1.2
log
@Reverse PG_BINARY defines
@
text
@d1 1
a1 3
This outlines how to increase the number of shared memory buffers
supported by BSD/OS.  By default, only 4MB of shared memory is supported
by BSDI.
d3 2
a4 1
Keep in mind that shared memory is not pageable.  It is locked in RAM.
d6 1
a6 1
Bruce Momjian (pgman@@candle.pha.pa.us)
d10 15
a24 2
Increase SHMMAXPGS by 1024 for every additional 4MB of shared
memory:
d31 1
a31 1
For those running earlier releases, there are more steps outlined below.
d35 2
a36 2
Use bpatch to find the sysptsize value for the current kernel. 
This is computed dynamically at bootup.
@


1.1
log
@file FAQ_BSDI was initially added on branch REL7_0_PATCHES.
@
text
@d1 34
@


1.1.2.1
log
@Update faq's.
@
text
@a0 31
This outlines how to increase the number of shared memory buffers
supported by BSD/OS.  By default, only 4MB of shared memory is supported
by BSDI.

Bruce Momjian (pgman@@candle.pha.pa.us)

---------------------------------------------------------------------------

First, increase SHMMAXPGS by 1024 for every additional 4MB of shared
memory:

/sys/sys/shm.h:69:#define       SHMMAXPGS       1024    /* max hardware pages...

The default setting of 1024 is for a maximum of 4MB of shared memory.

Second, use bpatch to find the sysptsize value for the current kernel. 
This is computed dynamically at bootup.

	$ bpatch -r sysptsize
	0x9 = 9

Next, change SYSPTSIZE to a hard-coded value.  Use the bpatch value,
plus add 1 for every additional 4MB of shared memory you desire.

/sys/i386/i386/i386_param.c:28:#define  SYSPTSIZE 0        /* dynamically...

sysptsize can not be changed by sysctl on the fly.

This should clearly be easier to do on BSDI.  I will add a BSDI FAQ for
PostgreSQL to cover this.  One downside is that shared memory is not
pageable.  It is locked in RAM.
@


1.1.2.2
log
@update
@
text
@a4 2
Keep in mind that shared memory is not pageable.  It is locked in RAM.

d9 1
a9 1
Increase SHMMAXPGS by 1024 for every additional 4MB of shared
d16 1
a16 6
For those running 4.1 or later, just recompile the kernel and reboot. 
For those running earlier releases, there are more steps outlined below.

---------------------------------------------------------------------------

Use bpatch to find the sysptsize value for the current kernel. 
d28 4
@


1.1.2.3
log
@Update bsdi faq.
@
text
@d1 3
a3 1
This outlines modifications to BSD/OS for running PostgreSQL:
d5 1
a5 2
1)  How to increase resource limits
2)  How to increase the number of shared memory buffers
d7 1
a7 1
Bruce Momjian (pgman@@candle.pha.pa.us)  2000-06-09
d11 2
a12 15
1)  To increase the amount of malloc'ed memory and files opened by
PostgreSQL, add this:

          :datasize-cur=600M:\
          :openfiles-cur=256:

to your /etc/login.conf file.

---------------------------------------------------------------------------

2a)  By default, only 4MB of shared memory is supported by BSDI. Keep in
mind that shared memory is not pageable.  It is locked in RAM.

To increase the number of buffers supported by the postmaseter, increase
SHMMAXPGS by 1024 for every additional 4MB of shared memory:
d19 1
a19 1
For those running earlier releases, see step 2b.
d23 2
a24 2
2b)  For 4.01 and earlier, use bpatch to find the sysptsize value for
the current kernel.  This is computed dynamically at bootup.
@


