System V semaphores are not used on this platform.
</para>
<para>
The default IPC settings can be changed using
the <command>sysctl</command> or
<command>loader</command> interfaces. The following
parameters can be set using <command>sysctl</command>:
<screen>
<prompt>#</prompt> <userinput>sysctl kern.ipc.shmall=32768</userinput>
<prompt>#</prompt> <userinput>sysctl kern.ipc.shmmax=134217728</userinput>
</screen>
To make these settings persist over reboots, modify
<filename>/etc/sysctl.conf</filename>.
</para>
<para>
If you have set <literal>shared_memory_type</literal> to
<literal>sysv</literal>, you might also want to configure your kernel
to lock System V shared memory into RAM and prevent it from being paged
out to swap. This can be accomplished using the <command>sysctl</command>
setting <literal>kern.ipc.shm_use_phys</literal>.
</para>
<para>
If running in a FreeBSD jail, you should set its
<literal>sysvshm</literal> parameter to <literal>new</literal>, so that
it has its own separate System V shared memory namespace.
(Before FreeBSD 11.0, it was necessary to enable shared access to
the host's IPC namespace from jails, and take measures to avoid
collisions.)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><systemitem class="osname">NetBSD</systemitem>
<indexterm><primary>NetBSD</primary><secondary>IPC configuration</secondary></indexterm>
</term>
<listitem>
<para>
The default shared memory settings are usually good enough, unless
you have set <literal>shared_memory_type</literal> to <literal>sysv</literal>.
However, you will need to increase <literal>kern.ipc.semmni</literal>
and <literal>kern.ipc.semmns</literal>,
as <systemitem class="osname">NetBSD</systemitem>'s default settings
for these are unworkably small.
</para>
<para>
IPC parameters can be adjusted using <command>sysctl</command>,
for example:
<screen>
<prompt>#</prompt> <userinput>sysctl -w kern.ipc.semmni=100</userinput>
</screen>
To make these settings persist over reboots, modify
<filename>/etc/sysctl.conf</filename>.
</para>
<para>
If you have set <literal>shared_memory_type</literal> to
<literal>sysv</literal>, you might also want to configure your kernel
to lock System V shared memory into RAM and prevent it from being paged
out to swap. This can be accomplished using the <command>sysctl</command>
setting <literal>kern.ipc.shm_use_phys</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><systemitem class="osname">OpenBSD</systemitem>
<indexterm><primary>OpenBSD</primary><secondary>IPC configuration</secondary></indexterm>
</term>
<listitem>
<para>
The default shared memory settings are usually good enough, unless
you have set <literal>shared_memory_type</literal> to <literal>sysv</literal>.
However, you will need to
increase <literal>kern.seminfo.semmni</literal>
and <literal>kern.seminfo.semmns</literal>,
as <systemitem class="osname">OpenBSD</systemitem>'s default settings
for these are unworkably small.
</para>
<para>
IPC parameters can be adjusted using <command>sysctl</command>,
for example:
<screen>
<prompt>#</prompt> <userinput>sysctl kern.seminfo.semmni=100</userinput>
</screen>
To make these settings persist over reboots, modify
<filename>/etc/sysctl.conf</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><systemitem class="osname">Linux</systemitem>
<indexterm><primary>Linux</primary><secondary>IPC configuration</secondary></indexterm>