@@ -781,7 +781,8 @@ psql: could not connect to server: No such file or directory
781
781
<para>
782
782
In some cases it might also be necessary to increase
783
783
<varname>SEMMAP</> to be at least on the order of
784
- <varname>SEMMNS</>. This parameter defines the size of the semaphore
784
+ <varname>SEMMNS</>. If the system has this parameter
785
+ (many do not), it defines the size of the semaphore
785
786
resource map, in which each contiguous block of available semaphores
786
787
needs an entry. When a semaphore set is freed it is either added to
787
788
an existing entry that is adjacent to the freed block or it is
@@ -838,7 +839,7 @@ psql: could not connect to server: No such file or directory
838
839
</term>
839
840
<listitem>
840
841
<para>
841
- The default settings can be changed using
842
+ The default IPC settings can be changed using
842
843
the <command>sysctl</command> or
843
844
<command>loader</command> interfaces. The following
844
845
parameters can be set using <command>sysctl</command>:
@@ -857,13 +858,9 @@ psql: could not connect to server: No such file or directory
857
858
<programlisting>
858
859
kern.ipc.semmni=256
859
860
kern.ipc.semmns=512
860
- kern.ipc.semmnu=256
861
861
</programlisting>
862
- After modifying these values a reboot is required for the new
862
+ After modifying that file, a reboot is required for the new
863
863
settings to take effect.
864
- (Note: FreeBSD does not use <varname>SEMMAP</>. Older versions
865
- would accept but ignore a setting for <literal>kern.ipc.semmap</>;
866
- newer versions reject it altogether.)
867
864
</para>
868
865
869
866
<para>
@@ -887,7 +884,7 @@ kern.ipc.semmnu=256
887
884
888
885
<para>
889
886
<systemitem class="osname">FreeBSD</> versions before 4.0 work like
890
- <systemitem class="osname">OpenBSD</> (see below).
887
+ old <systemitem class="osname">OpenBSD</> (see below).
891
888
</para>
892
889
</listitem>
893
890
</varlistentry>
@@ -902,12 +899,19 @@ kern.ipc.semmnu=256
902
899
IPC parameters can be adjusted using <command>sysctl</command>,
903
900
for example:
904
901
<screen>
905
- <prompt>$ </prompt> <userinput>sysctl -w kern.ipc.shmmax=16777216 </userinput>
902
+ <prompt># </prompt> <userinput>sysctl -w kern.ipc.semmni=100 </userinput>
906
903
</screen>
907
- To have these settings persist over reboots, modify
904
+ To make these settings persist over reboots, modify
908
905
<filename>/etc/sysctl.conf</filename>.
909
906
</para>
910
907
908
+ <para>
909
+ You will usually want to increase <literal>kern.ipc.semmni</literal>
910
+ and <literal>kern.ipc.semmns</literal>,
911
+ as <systemitem class="osname">NetBSD</systemitem>'s default settings
912
+ for these are uncomfortably small.
913
+ </para>
914
+
911
915
<para>
912
916
You might also want to configure your kernel to lock shared
913
917
memory into RAM and prevent it from being paged out to swap.
@@ -916,10 +920,10 @@ kern.ipc.semmnu=256
916
920
</para>
917
921
918
922
<para>
919
- <systemitem class="osname">NetBSD</> versions before 5.0 work like
920
- <systemitem class="osname">OpenBSD</> (see below), except that
921
- parameters should be set with the keyword <literal>options</> not
922
- <literal>option</>.
923
+ <systemitem class="osname">NetBSD</systemitem > versions before 5.0
924
+ work like old <systemitem class="osname">OpenBSD</systemitem>
925
+ (see below), except that kernel parameters should be set with the
926
+ keyword <literal>options</literal> not <literal> option</literal >.
923
927
</para>
924
928
</listitem>
925
929
</varlistentry>
@@ -930,11 +934,31 @@ kern.ipc.semmnu=256
930
934
</term>
931
935
<listitem>
932
936
<para>
933
- The options <varname>SYSVSHM</> and <varname>SYSVSEM</> need
934
- to be enabled when the kernel is compiled. (They are by
935
- default.) The maximum size of shared memory is determined by
936
- the option <varname>SHMMAXPGS</> (in pages). The following
937
- shows an example of how to set the various parameters:
937
+ In <systemitem class="osname">OpenBSD</systemitem> 3.3 and later,
938
+ IPC parameters can be adjusted using <command>sysctl</command>,
939
+ for example:
940
+ <screen>
941
+ <prompt>#</prompt> <userinput>sysctl kern.seminfo.semmni=100</userinput>
942
+ </screen>
943
+ To make these settings persist over reboots, modify
944
+ <filename>/etc/sysctl.conf</filename>.
945
+ </para>
946
+
947
+ <para>
948
+ You will usually want to
949
+ increase <literal>kern.seminfo.semmni</literal>
950
+ and <literal>kern.seminfo.semmns</literal>,
951
+ as <systemitem class="osname">OpenBSD</systemitem>'s default settings
952
+ for these are uncomfortably small.
953
+ </para>
954
+
955
+ <para>
956
+ In older <systemitem class="osname">OpenBSD</systemitem> versions,
957
+ you will need to build a custom kernel to change the IPC parameters.
958
+ Make sure that the options <varname>SYSVSHM</varname>
959
+ and <varname>SYSVSEM</varname> are enabled, too. (They are by
960
+ default.) The following shows an example of how to set the various
961
+ parameters in the kernel configuration file:
938
962
<programlisting>
939
963
option SYSVSHM
940
964
option SHMMAXPGS=4096
0 commit comments