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