@@ -796,7 +796,8 @@ psql: could not connect to server: No such file or directory
796796 <para>
797797 In some cases it might also be necessary to increase
798798 <varname>SEMMAP</varname> to be at least on the order of
799- <varname>SEMMNS</varname>. This parameter defines the size of the semaphore
799+ <varname>SEMMNS</varname>. If the system has this parameter
800+ (many do not), it defines the size of the semaphore
800801 resource map, in which each contiguous block of available semaphores
801802 needs an entry. When a semaphore set is freed it is either added to
802803 an existing entry that is adjacent to the freed block or it is
@@ -853,7 +854,7 @@ psql: could not connect to server: No such file or directory
853854 </term>
854855 <listitem>
855856 <para>
856- The default settings can be changed using
857+ The default IPC settings can be changed using
857858 the <command>sysctl</command> or
858859 <command>loader</command> interfaces. The following
859860 parameters can be set using <command>sysctl</command>:
@@ -872,13 +873,9 @@ psql: could not connect to server: No such file or directory
872873<programlisting>
873874kern.ipc.semmni=256
874875kern.ipc.semmns=512
875- kern.ipc.semmnu=256
876876</programlisting>
877- After modifying these values a reboot is required for the new
877+ After modifying that file, a reboot is required for the new
878878 settings to take effect.
879- (Note: FreeBSD does not use <varname>SEMMAP</varname>. Older versions
880- would accept but ignore a setting for <literal>kern.ipc.semmap</literal>;
881- newer versions reject it altogether.)
882879 </para>
883880
884881 <para>
@@ -902,7 +899,7 @@ kern.ipc.semmnu=256
902899
903900 <para>
904901 <systemitem class="osname">FreeBSD</systemitem> versions before 4.0 work like
905- <systemitem class="osname">OpenBSD</systemitem> (see below).
902+ old <systemitem class="osname">OpenBSD</systemitem> (see below).
906903 </para>
907904 </listitem>
908905 </varlistentry>
@@ -917,12 +914,19 @@ kern.ipc.semmnu=256
917914 IPC parameters can be adjusted using <command>sysctl</command>,
918915 for example:
919916<screen>
920- <prompt>$ </prompt> <userinput>sysctl -w kern.ipc.shmmax=16777216 </userinput>
917+ <prompt># </prompt> <userinput>sysctl -w kern.ipc.semmni=100 </userinput>
921918</screen>
922- To have these settings persist over reboots, modify
919+ To make these settings persist over reboots, modify
923920 <filename>/etc/sysctl.conf</filename>.
924921 </para>
925922
923+ <para>
924+ You will usually want to increase <literal>kern.ipc.semmni</literal>
925+ and <literal>kern.ipc.semmns</literal>,
926+ as <systemitem class="osname">NetBSD</systemitem>'s default settings
927+ for these are uncomfortably small.
928+ </para>
929+
926930 <para>
927931 You might also want to configure your kernel to lock shared
928932 memory into RAM and prevent it from being paged out to swap.
@@ -931,10 +935,10 @@ kern.ipc.semmnu=256
931935 </para>
932936
933937 <para>
934- <systemitem class="osname">NetBSD</systemitem> versions before 5.0 work like
935- <systemitem class="osname">OpenBSD</systemitem> (see below), except that
936- parameters should be set with the keyword <literal>options</literal> not
937- <literal>option</literal>.
938+ <systemitem class="osname">NetBSD</systemitem> versions before 5.0
939+ work like old <systemitem class="osname">OpenBSD</systemitem>
940+ (see below), except that kernel parameters should be set with the
941+ keyword <literal>options</literal> not <literal>option</literal>.
938942 </para>
939943 </listitem>
940944 </varlistentry>
@@ -945,11 +949,31 @@ kern.ipc.semmnu=256
945949 </term>
946950 <listitem>
947951 <para>
948- The options <varname>SYSVSHM</varname> and <varname>SYSVSEM</varname> need
949- to be enabled when the kernel is compiled. (They are by
950- default.) The maximum size of shared memory is determined by
951- the option <varname>SHMMAXPGS</varname> (in pages). The following
952- shows an example of how to set the various parameters:
952+ In <systemitem class="osname">OpenBSD</systemitem> 3.3 and later,
953+ IPC parameters can be adjusted using <command>sysctl</command>,
954+ for example:
955+ <screen>
956+ <prompt>#</prompt> <userinput>sysctl kern.seminfo.semmni=100</userinput>
957+ </screen>
958+ To make these settings persist over reboots, modify
959+ <filename>/etc/sysctl.conf</filename>.
960+ </para>
961+
962+ <para>
963+ You will usually want to
964+ increase <literal>kern.seminfo.semmni</literal>
965+ and <literal>kern.seminfo.semmns</literal>,
966+ as <systemitem class="osname">OpenBSD</systemitem>'s default settings
967+ for these are uncomfortably small.
968+ </para>
969+
970+ <para>
971+ In older <systemitem class="osname">OpenBSD</systemitem> versions,
972+ you will need to build a custom kernel to change the IPC parameters.
973+ Make sure that the options <varname>SYSVSHM</varname>
974+ and <varname>SYSVSEM</varname> are enabled, too. (They are by
975+ default.) The following shows an example of how to set the various
976+ parameters in the kernel configuration file:
953977<programlisting>
954978option SYSVSHM
955979option SHMMAXPGS=4096
0 commit comments