Skip to content

Commit bc9306f

Browse files
committed
Update information about configuring SysV IPC parameters on NetBSD.
Per Emmanuel Kasper, sysctl works fine as of NetBSD 5.0.
1 parent 56d609c commit bc9306f

File tree

1 file changed

+44
-18
lines changed

1 file changed

+44
-18
lines changed

doc/src/sgml/runtime.sgml

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,11 @@ fi
338338

339339
<listitem>
340340
<para>
341-
On <productname>NetBSD</productname>, either use the
341+
On <productname>NetBSD</productname>, use either the
342342
<productname>FreeBSD</productname> or
343343
<productname>Linux</productname> start scripts, depending on
344-
preference. <indexterm><primary>NetBSD</><secondary>start script</secondary></>
344+
preference.
345+
<indexterm><primary>NetBSD</><secondary>start script</secondary></>
345346
</para>
346347
</listitem>
347348

@@ -835,36 +836,62 @@ options "SEMMNS=240"
835836

836837
<para>
837838
<systemitem class="osname">FreeBSD</> versions before 4.0 work like
838-
<systemitem class="osname">NetBSD</> and <systemitem class="osname">
839-
OpenBSD</> (see below).
839+
<systemitem class="osname">OpenBSD</> (see below).
840840
</para>
841841
</listitem>
842842
</varlistentry>
843843

844844
<varlistentry>
845845
<term><systemitem class="osname">NetBSD</></term>
846-
<term><systemitem class="osname">OpenBSD</></term>
847846
<indexterm><primary>NetBSD</><secondary>IPC configuration</></>
847+
<listitem>
848+
<para>
849+
In <systemitem class="osname">NetBSD</> 5.0 and later,
850+
IPC parameters can be adjusted using <command>sysctl</command>,
851+
for example:
852+
<screen>
853+
<prompt>$</prompt> <userinput>sysctl -w kern.ipc.shmmax=16777216</userinput>
854+
</screen>
855+
To have these settings persist over reboots, modify
856+
<filename>/etc/sysctl.conf</filename>.
857+
</para>
858+
859+
<para>
860+
You might also want to configure your kernel to lock shared
861+
memory into RAM and prevent it from being paged out to swap.
862+
This can be accomplished using the <command>sysctl</command>
863+
setting <literal>kern.ipc.shm_use_phys</literal>.
864+
</para>
865+
866+
<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+
</para>
872+
</listitem>
873+
</varlistentry>
874+
875+
<varlistentry>
876+
<term><systemitem class="osname">OpenBSD</></term>
848877
<indexterm><primary>OpenBSD</><secondary>IPC configuration</></>
849878
<listitem>
850879
<para>
851880
The options <varname>SYSVSHM</> and <varname>SYSVSEM</> need
852881
to be enabled when the kernel is compiled. (They are by
853882
default.) The maximum size of shared memory is determined by
854883
the option <varname>SHMMAXPGS</> (in pages). The following
855-
shows an example of how to set the various parameters on
856-
<systemitem class="osname">NetBSD</>
857-
(<systemitem class="osname">OpenBSD</> uses <literal>option</> instead):
884+
shows an example of how to set the various parameters:
858885
<programlisting>
859-
options SYSVSHM
860-
options SHMMAXPGS=4096
861-
options SHMSEG=256
862-
863-
options SYSVSEM
864-
options SEMMNI=256
865-
options SEMMNS=512
866-
options SEMMNU=256
867-
options SEMMAP=256
886+
option SYSVSHM
887+
option SHMMAXPGS=4096
888+
option SHMSEG=256
889+
890+
option SYSVSEM
891+
option SEMMNI=256
892+
option SEMMNS=512
893+
option SEMMNU=256
894+
option SEMMAP=256
868895
</programlisting>
869896
</para>
870897

@@ -877,7 +904,6 @@ options SEMMAP=256
877904
</listitem>
878905
</varlistentry>
879906

880-
881907
<varlistentry>
882908
<term><systemitem class="osname">HP-UX</></term>
883909
<indexterm><primary>HP-UX</><secondary>IPC configuration</></>

0 commit comments

Comments
 (0)