11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.59 2001/05/01 03:00:28 tgl Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.60 2001/05/02 17:04:53 momjian Exp $
33-->
44
55<Chapter Id="runtime">
@@ -1449,7 +1449,7 @@ env PGOPTIONS='-c geqo=off' psql
14491449 <row>
14501450 <entry><varname>SHMMAX</></>
14511451 <entry>Maximum size of shared memory segment (bytes)</>
1452- <entry>512 kB + 8192 * buffers + extra ... infinity</entry>
1452+ <entry>700 kB + 8192 * buffers + extra ... infinity</entry>
14531453 </row>
14541454
14551455 <row>
@@ -1458,6 +1458,12 @@ env PGOPTIONS='-c geqo=off' psql
14581458 <entry>1 (at most about 256 kB)</>
14591459 </row>
14601460
1461+ <row>
1462+ <entry><varname>SHMALL</></>
1463+ <entry>Total amount of shared memory available (bytes or pages)</>
1464+ <entry>if bytes, same as SHMMAX; if pages, ceil(SHMMAX/PAGE_SIZE)</>
1465+ </row>
1466+
14611467 <row>
14621468 <entry><varname>SHMSEG</></>
14631469 <entry>Maximum number of shared memory segments per process</>
@@ -1588,42 +1594,37 @@ env PGOPTIONS='-c geqo=off' psql
15881594 <para>
15891595 By default, only 4 MB of shared memory is supported. Keep in
15901596 mind that shared memory is not pageable; it is locked in RAM.
1591- The shared memory parameters are:
1592- <programlisting>
1593- #define SHMMAX /* max shared memory segment size (bytes) */
1594- #define SHMMIN /* min shared memory segment size (bytes) */
1595- #define SHMMNI /* max number of shared memory identifiers */
1596- #define SHMSEG /* max shared memory segments per process */
1597- #define SHMALL /* max amount of shared memory (pages) */
1598- </programlisting>
1599-
1600- To increase the number of buffers supported by the postmaster, add the
1601- following to your kernel config file. A <varname>SHMALL</> value of 1024
1602- represents 4MB of shared memory. Increase it accordingly:
1597+
1598+ To increase the number of shared buffers supported by the
1599+ postmaster, add the following to your kernel config file. A
1600+ <varname>SHMALL</> value of 1024 represents 4MB of shared
1601+ memory. The following increases the maximum shared memory area
1602+ to 32 MB:
16031603<programlisting>
1604- options "SHMALL=4096 "
1604+ options "SHMALL=8192 "
16051605options "SHMMAX=\(SHMALL*PAGE_SIZE\)"
16061606</programlisting>
16071607 </para>
16081608 </formalpara>
16091609
16101610 <para>
1611- For those running 4.1 or later, just recompile the kernel and
1612- reboot. For those running earlier releases, use
1613- <application>bpatch</> to find the <varname>sysptsize</> value
1614- for the current kernel. This is computed dynamically at
1615- bootup.
1611+ For those running 4.1 or later, just make the above changes,
1612+ recompile the kernel, and reboot. For those running earlier
1613+ releases, use <application>bpatch</> to find the
1614+ <varname>sysptsize</> value in the current kernel. This is
1615+ computed dynamically at bootup.
16161616<screen>
16171617$ <userinput>bpatch -r sysptsize</>
16181618<computeroutput>0x9 = 9</>
16191619</screen>
1620- Next, change <varname>SYSPTSIZE</> to a hard-coded value. Use
1621- the bpatch value, plus add 1 for every additional 4 MB of
1620+ Next, add <varname>SYSPTSIZE</> as a hard-coded value in the
1621+ kernel config file. Increase the value you found using
1622+ <application>bpatch</>. Add 1 for every additional 4 MB of
16221623 shared memory you desire.
16231624<programlisting>
1624- options "SYSPTSIZE=13 "
1625+ options "SYSPTSIZE=16 "
16251626</programlisting>
1626- <varname>sysptsize</> can not be changed by sysctl on the fly .
1627+ <varname>sysptsize</> can not be changed by sysctl.
16271628 </para>
16281629
16291630 <formalpara>
@@ -1635,17 +1636,6 @@ options "SYSPTSIZE=13"
16351636 </para>
16361637 </formalpara>
16371638
1638- <para>
1639- The defaults are in <filename>/sys/sys/sem.h</>:
1640- <programlisting>
1641- #define SEMMNI 10 /* # of semaphore identifiers */
1642-
1643- #define SEMMNS 60 /* # of semaphores in system */
1644-
1645- #define SEMUME 10 /* max # of undo entries per process */
1646-
1647- #define SEMMNU 30 /* # of undo structures in system */
1648- </programlisting>
16491639 Set the values you want in your kernel config file, e.g.:
16501640<programlisting>
16511641options "SEMMNI=40"
0 commit comments