|
|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
<!-- |
|
|
|
|
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.303 2005/01/23 00:30:18 momjian Exp $ |
|
|
|
|
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.304 2005/02/10 05:14:58 neilc Exp $ |
|
|
|
|
--> |
|
|
|
|
|
|
|
|
|
<chapter Id="runtime"> |
|
|
|
|
@ -4351,9 +4351,55 @@ options "SEMMNS=240" |
|
|
|
|
|
|
|
|
|
<varlistentry> |
|
|
|
|
<term><systemitem class="osname">FreeBSD</></term> |
|
|
|
|
<indexterm><primary>FreeBSD</><secondary>IPC configuration</></> |
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
The default settings are only suitable for small installations |
|
|
|
|
(for example, default <varname>SHMMAX</varname> is 32 |
|
|
|
|
MB). Changes can be made via the <command>sysctl</command> or |
|
|
|
|
<command>loader</command> interfaces. The following |
|
|
|
|
parameters can be set using <command>sysctl</command>: |
|
|
|
|
<screen> |
|
|
|
|
<prompt>$</prompt> <userinput>systcl -w kern.ipc.shmall=32768</userinput> |
|
|
|
|
<prompt>$</prompt> <userinput>systcl -w kern.ipc.shmmax=134217728</userinput> |
|
|
|
|
<prompt>$</prompt> <userinput>systcl -w kern.ipc.semmap=256</userinput> |
|
|
|
|
</screen> |
|
|
|
|
To have these settings persist over reboots, modify |
|
|
|
|
<filename>/etc/sysctl.conf</filename>. |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
The remaining sempahore settings are read-only as far as |
|
|
|
|
<command>sysctl</command> is concerned, but can be changed |
|
|
|
|
before boot using the <command>loader</command> prompt: |
|
|
|
|
<screen> |
|
|
|
|
<prompt>(loader)</prompt> <userinput>set kern.ipc.semmni=256</userinput> |
|
|
|
|
<prompt>(loader)</prompt> <userinput>set kern.ipc.semmns=512</userinput> |
|
|
|
|
<prompt>(loader)</prompt> <userinput>set kern.ipc.semmnu=256</userinput> |
|
|
|
|
</screen> |
|
|
|
|
Similarly these can be saved between reboots in |
|
|
|
|
<filename>/boot/loader.conf</filename>. |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
You might also want to configure your kernel to lock shared |
|
|
|
|
memory into RAM and prevent it from being paged out to swap. |
|
|
|
|
This can be accomplished using the <command>sysctl</command> |
|
|
|
|
setting <literal>kern.ipc.shm_use_phys</literal>. |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
<systemitem class="osname">FreeBSD</> versions before 4.0 work like |
|
|
|
|
<systemitem class="osname">NetBSD</> and <systemitem class="osname"> |
|
|
|
|
OpenBSD</> (see below), except that the configuration file uses the |
|
|
|
|
keyword "options" instead of "option". |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
</varlistentry> |
|
|
|
|
|
|
|
|
|
<varlistentry> |
|
|
|
|
<term><systemitem class="osname">NetBSD</></term> |
|
|
|
|
<term><systemitem class="osname">OpenBSD</></term> |
|
|
|
|
<indexterm><primary>FreeBSD</><secondary>IPC configuration</></> |
|
|
|
|
<indexterm><primary>NetBSD</><secondary>IPC configuration</></> |
|
|
|
|
<indexterm><primary>OpenBSD</><secondary>IPC configuration</></> |
|
|
|
|
<listitem> |
|
|
|
|
@ -4364,25 +4410,23 @@ options "SEMMNS=240" |
|
|
|
|
the option <varname>SHMMAXPGS</> (in pages). The following |
|
|
|
|
shows an example of how to set the various parameters: |
|
|
|
|
<programlisting> |
|
|
|
|
options SYSVSHM |
|
|
|
|
options SHMMAXPGS=4096 |
|
|
|
|
options SHMSEG=256 |
|
|
|
|
|
|
|
|
|
options SYSVSEM |
|
|
|
|
options SEMMNI=256 |
|
|
|
|
options SEMMNS=512 |
|
|
|
|
options SEMMNU=256 |
|
|
|
|
options SEMMAP=256 |
|
|
|
|
option SYSVSHM |
|
|
|
|
option SHMMAXPGS=4096 |
|
|
|
|
option SHMSEG=256 |
|
|
|
|
|
|
|
|
|
option SYSVSEM |
|
|
|
|
option SEMMNI=256 |
|
|
|
|
option SEMMNS=512 |
|
|
|
|
option SEMMNU=256 |
|
|
|
|
option SEMMAP=256 |
|
|
|
|
</programlisting> |
|
|
|
|
(On <systemitem class="osname">NetBSD</> and <systemitem |
|
|
|
|
class="osname">OpenBSD</> the key word is actually |
|
|
|
|
<literal>option</literal> singular.) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
You might also want to configure your kernel to lock shared |
|
|
|
|
memory into RAM and prevent it from being paged out to swap. |
|
|
|
|
Use the <command>sysctl</> setting |
|
|
|
|
<literal>kern.ipc.shm_use_phys</>. |
|
|
|
|
This can be accomplished using the <command>sysctl</command> |
|
|
|
|
setting <literal>kern.ipc.shm_use_phys</literal>. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
</varlistentry> |
|
|
|
|
@ -4589,7 +4633,6 @@ set semsys:seminfo_semmsl=32 |
|
|
|
|
</varlistentry> |
|
|
|
|
|
|
|
|
|
</variablelist> |
|
|
|
|
|
|
|
|
|
</sect2> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|