Commit 8e393fc5 authored by Bruce Momjian's avatar Bruce Momjian

Added mention of SHMALL and removed BSD/OS-specific table.

parent 4929d85e
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.59 2001/05/01 03:00:28 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.60 2001/05/02 17:04:53 momjian Exp $
--> -->
<Chapter Id="runtime"> <Chapter Id="runtime">
...@@ -1449,7 +1449,7 @@ env PGOPTIONS='-c geqo=off' psql ...@@ -1449,7 +1449,7 @@ env PGOPTIONS='-c geqo=off' psql
<row> <row>
<entry><varname>SHMMAX</></> <entry><varname>SHMMAX</></>
<entry>Maximum size of shared memory segment (bytes)</> <entry>Maximum size of shared memory segment (bytes)</>
<entry>512 kB + 8192 * buffers + extra ... infinity</entry> <entry>700 kB + 8192 * buffers + extra ... infinity</entry>
</row> </row>
<row> <row>
...@@ -1458,6 +1458,12 @@ env PGOPTIONS='-c geqo=off' psql ...@@ -1458,6 +1458,12 @@ env PGOPTIONS='-c geqo=off' psql
<entry>1 (at most about 256 kB)</> <entry>1 (at most about 256 kB)</>
</row> </row>
<row>
<entry><varname>SHMALL</></>
<entry>Total amount of shared memory available (bytes or pages)</>
<entry>if bytes, same as SHMMAX; if pages, ceil(SHMMAX/PAGE_SIZE)</>
</row>
<row> <row>
<entry><varname>SHMSEG</></> <entry><varname>SHMSEG</></>
<entry>Maximum number of shared memory segments per process</> <entry>Maximum number of shared memory segments per process</>
...@@ -1588,42 +1594,37 @@ env PGOPTIONS='-c geqo=off' psql ...@@ -1588,42 +1594,37 @@ env PGOPTIONS='-c geqo=off' psql
<para> <para>
By default, only 4 MB of shared memory is supported. Keep in By default, only 4 MB of shared memory is supported. Keep in
mind that shared memory is not pageable; it is locked in RAM. mind that shared memory is not pageable; it is locked in RAM.
The shared memory parameters are:
<programlisting> To increase the number of shared buffers supported by the
#define SHMMAX /* max shared memory segment size (bytes) */ postmaster, add the following to your kernel config file. A
#define SHMMIN /* min shared memory segment size (bytes) */ <varname>SHMALL</> value of 1024 represents 4MB of shared
#define SHMMNI /* max number of shared memory identifiers */ memory. The following increases the maximum shared memory area
#define SHMSEG /* max shared memory segments per process */ to 32 MB:
#define SHMALL /* max amount of shared memory (pages) */
</programlisting>
To increase the number of buffers supported by the postmaster, add the
following to your kernel config file. A <varname>SHMALL</> value of 1024
represents 4MB of shared memory. Increase it accordingly:
<programlisting> <programlisting>
options "SHMALL=4096" options "SHMALL=8192"
options "SHMMAX=\(SHMALL*PAGE_SIZE\)" options "SHMMAX=\(SHMALL*PAGE_SIZE\)"
</programlisting> </programlisting>
</para> </para>
</formalpara> </formalpara>
<para> <para>
For those running 4.1 or later, just recompile the kernel and For those running 4.1 or later, just make the above changes,
reboot. For those running earlier releases, use recompile the kernel, and reboot. For those running earlier
<application>bpatch</> to find the <varname>sysptsize</> value releases, use <application>bpatch</> to find the
for the current kernel. This is computed dynamically at <varname>sysptsize</> value in the current kernel. This is
bootup. computed dynamically at bootup.
<screen> <screen>
$ <userinput>bpatch -r sysptsize</> $ <userinput>bpatch -r sysptsize</>
<computeroutput>0x9 = 9</> <computeroutput>0x9 = 9</>
</screen> </screen>
Next, change <varname>SYSPTSIZE</> to a hard-coded value. Use Next, add <varname>SYSPTSIZE</> as a hard-coded value in the
the bpatch value, plus add 1 for every additional 4 MB of kernel config file. Increase the value you found using
<application>bpatch</>. Add 1 for every additional 4 MB of
shared memory you desire. shared memory you desire.
<programlisting> <programlisting>
options "SYSPTSIZE=13" options "SYSPTSIZE=16"
</programlisting> </programlisting>
<varname>sysptsize</> can not be changed by sysctl on the fly. <varname>sysptsize</> can not be changed by sysctl.
</para> </para>
<formalpara> <formalpara>
...@@ -1635,17 +1636,6 @@ options "SYSPTSIZE=13" ...@@ -1635,17 +1636,6 @@ options "SYSPTSIZE=13"
</para> </para>
</formalpara> </formalpara>
<para>
The defaults are in <filename>/sys/sys/sem.h</>:
<programlisting>
#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 */
</programlisting>
Set the values you want in your kernel config file, e.g.: Set the values you want in your kernel config file, e.g.:
<programlisting> <programlisting>
options "SEMMNI=40" options "SEMMNI=40"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment