@@ -733,7 +733,8 @@ psql: could not connect to server: No such file or directory
733
733
<para>
734
734
In some cases it might also be necessary to increase
735
735
<varname>SEMMAP</> to be at least on the order of
736
- <varname>SEMMNS</>. This parameter defines the size of the semaphore
736
+ <varname>SEMMNS</>. If the system has this parameter
737
+ (many do not), it defines the size of the semaphore
737
738
resource map, in which each contiguous block of available semaphores
738
739
needs an entry. When a semaphore set is freed it is either added to
739
740
an existing entry that is adjacent to the freed block or it is
@@ -786,7 +787,7 @@ psql: could not connect to server: No such file or directory
786
787
</term>
787
788
<listitem>
788
789
<para>
789
- The default settings can be changed using
790
+ The default IPC settings can be changed using
790
791
the <command>sysctl</command> or
791
792
<command>loader</command> interfaces. The following
792
793
parameters can be set using <command>sysctl</command>:
@@ -805,13 +806,9 @@ psql: could not connect to server: No such file or directory
805
806
<programlisting>
806
807
kern.ipc.semmni=256
807
808
kern.ipc.semmns=512
808
- kern.ipc.semmnu=256
809
809
</programlisting>
810
- After modifying these values a reboot is required for the new
810
+ After modifying that file, a reboot is required for the new
811
811
settings to take effect.
812
- (Note: FreeBSD does not use <varname>SEMMAP</>. Older versions
813
- would accept but ignore a setting for <literal>kern.ipc.semmap</>;
814
- newer versions reject it altogether.)
815
812
</para>
816
813
817
814
<para>
@@ -835,7 +832,7 @@ kern.ipc.semmnu=256
835
832
836
833
<para>
837
834
<systemitem class="osname">FreeBSD</> versions before 4.0 work like
838
- <systemitem class="osname">OpenBSD</> (see below).
835
+ old <systemitem class="osname">OpenBSD</> (see below).
839
836
</para>
840
837
</listitem>
841
838
</varlistentry>
@@ -850,12 +847,19 @@ kern.ipc.semmnu=256
850
847
IPC parameters can be adjusted using <command>sysctl</command>,
851
848
for example:
852
849
<screen>
853
- <prompt>$ </prompt> <userinput>sysctl -w kern.ipc.shmmax=16777216 </userinput>
850
+ <prompt># </prompt> <userinput>sysctl -w kern.ipc.semmni=100 </userinput>
854
851
</screen>
855
- To have these settings persist over reboots, modify
852
+ To make these settings persist over reboots, modify
856
853
<filename>/etc/sysctl.conf</filename>.
857
854
</para>
858
855
856
+ <para>
857
+ You will usually want to increase <literal>kern.ipc.semmni</literal>
858
+ and <literal>kern.ipc.semmns</literal>,
859
+ as <systemitem class="osname">NetBSD</systemitem>'s default settings
860
+ for these are uncomfortably small.
861
+ </para>
862
+
859
863
<para>
860
864
You might also want to configure your kernel to lock shared
861
865
memory into RAM and prevent it from being paged out to swap.
@@ -864,10 +868,10 @@ kern.ipc.semmnu=256
864
868
</para>
865
869
866
870
<para>
867
- <systemitem class="osname">NetBSD</> versions before 5.0 work like
868
- <systemitem class="osname">OpenBSD</> (see below), except that
869
- parameters should be set with the keyword <literal>options</> not
870
- <literal>option</>.
871
+ <systemitem class="osname">NetBSD</systemitem > versions before 5.0
872
+ work like old <systemitem class="osname">OpenBSD</systemitem>
873
+ (see below), except that kernel parameters should be set with the
874
+ keyword <literal>options</literal> not <literal> option</literal >.
871
875
</para>
872
876
</listitem>
873
877
</varlistentry>
@@ -878,11 +882,31 @@ kern.ipc.semmnu=256
878
882
</term>
879
883
<listitem>
880
884
<para>
881
- The options <varname>SYSVSHM</> and <varname>SYSVSEM</> need
882
- to be enabled when the kernel is compiled. (They are by
883
- default.) The maximum size of shared memory is determined by
884
- the option <varname>SHMMAXPGS</> (in pages). The following
885
- shows an example of how to set the various parameters:
885
+ In <systemitem class="osname">OpenBSD</systemitem> 3.3 and later,
886
+ IPC parameters can be adjusted using <command>sysctl</command>,
887
+ for example:
888
+ <screen>
889
+ <prompt>#</prompt> <userinput>sysctl kern.seminfo.semmni=100</userinput>
890
+ </screen>
891
+ To make these settings persist over reboots, modify
892
+ <filename>/etc/sysctl.conf</filename>.
893
+ </para>
894
+
895
+ <para>
896
+ You will usually want to
897
+ increase <literal>kern.seminfo.semmni</literal>
898
+ and <literal>kern.seminfo.semmns</literal>,
899
+ as <systemitem class="osname">OpenBSD</systemitem>'s default settings
900
+ for these are uncomfortably small.
901
+ </para>
902
+
903
+ <para>
904
+ In older <systemitem class="osname">OpenBSD</systemitem> versions,
905
+ you will need to build a custom kernel to change the IPC parameters.
906
+ Make sure that the options <varname>SYSVSHM</varname>
907
+ and <varname>SYSVSEM</varname> are enabled, too. (They are by
908
+ default.) The following shows an example of how to set the various
909
+ parameters in the kernel configuration file:
886
910
<programlisting>
887
911
option SYSVSHM
888
912
option SHMMAXPGS=4096
0 commit comments