10000 Update information about configuring SysV IPC parameters on NetBSD. · f0rk/postgres@50be28d · GitHub
[go: up one dir, main page]

Skip to content

Commit 50be28d

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 b06231a commit 50be28d

File tree

1 file changed

+45
-18
lines changed

1 file changed

+45
-18
lines changed

doc/src/sgml/runtime.sgml

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,11 @@ fi
315315

316316
<listitem>
317317
<para>
318-
On <productname>NetBSD</productname>, either use the
318+
On <productname>NetBSD</productname>, use either the
319319
<productname>FreeBSD</productname> or
320320
<productname>Linux</productname> start scripts, depending on
321-
preference. <indexterm><primary>NetBSD</><secondary>start script</secondary></>
321+
preference.
322+
<indexterm><primary>NetBSD</><secondary>start script</secondary></>
322323
</para>
323324
</listitem>
324325

@@ -829,36 +830,63 @@ options "SEMMNS=240"
829830
</para>
830831

831832
<para>
832-
<systemitem class="osname">FreeBSD</> versions before 4.0 work like
833-
<systemitem class="osname">NetBSD</> and <systemitem class="osname">
834-
OpenBSD</> (see below).
833+
<systemitem class="osname">FreeBSD</> versions before 4.0 work like
834+
<systemitem class="osname">OpenBSD</> (see below).
835835
</para>
836836
</listitem>
837837
</varlistentry>
838838

839839
<varlistentry>
840840
<term><systemitem class="osname">NetBSD</></term>
841-
<term><systemitem class="osname">OpenBSD</></term>
842841
<indexterm><primary>NetBSD</><secondary>IPC configuration</></>
842+
<listitem>
843+
<para>
844+
In <systemitem class="osname">NetBSD</> 5.0 and later,
845+
IPC parameters can be adjusted using <command>sysctl</command>,
846+
for example:
847+
<screen>
848+
<prompt>$</prompt> <userinput>sysctl -w kern.ipc.shmmax=16777216</userinput>
849+
</screen>
850+
To have these settings persist over reboots, modify
851+
<filename>/etc/sysctl.conf</filename>.
852+
</para>
853+
854+
<para>
855+
You might also want to configure your kernel to lock shared
856+
memory into RAM and prevent it from being paged out to swap.
857+
This can be accomplished using the <command>sysctl</command>
858+
setting <literal>kern.ipc.shm_use_phys</literal>.
859+
</para>
860+
861+
<para>
862+
<systemitem class="osname">NetBSD</> versions before 5.0 work like
863+
<systemitem class="osname">OpenBSD</> (see below), except that
864+
parameters should be set with the keyword <literal>options</> not
865+
<literal>option</>.
866+
</para>
867+
</listitem>
868+
</varlistentry>
869+
870+
<varlistentry>
871+
<term><systemitem class="osname">OpenBSD</></term>
843872
<indexterm><primary>OpenBSD</><secondary>IPC configuration</></>
844873
<listitem>
845874
<para>
846875
The options <varname>SYSVSHM</> and <varname>SYSVSEM</> need
847876
to be enabled when the kernel is compiled. (They are by
848877
default.) The maximum size of shared memory is determined by
849878
the option <varname>SHMMAXPGS</> (in pages). The following
850-
shows an example of how to set the various parameters
851-
(<systemitem class="osname">OpenBSD</> uses <literal>option</> instead):
879+
shows an example of how to set the various parameters:
852880
<programlisting>
853-
options SYSVSHM
854-
options SHMMAXPGS=4096
855-
options SHMSEG=256
856-
857-
options SYSVSEM
858-
options SEMMNI=256
859-
options SEMMNS=512
860-
options SEMMNU=256
861-
options SEMMAP=256
881+
option SYSVSHM
882+
option SHMMAXPGS=4096
883+
option SHMSEG=256
884+
885+
option SYSVSEM
886+
option SEMMNI=256
887+
option SEMMNS=512
888+
option SEMMNU=256
889+
option SEMMAP=256
862890
</programlisting>
863891
</para>
864892

@@ -871,7 +899,6 @@ options SEMMAP=256
871899
</listitem>
872900
</varlistentry>
873901

874-
875902
<varlistentry>
876903
<term><systemitem class="osname">HP-UX</></term>
877904
<indexterm><primary>HP-UX</><secondary>IPC configuration</></>

0 commit comments

Comments
 (0)
0