Adjust OS-specific kernel settings to mention old and new BSD methods of

adjusting values:

> But to be on the safe side, it would make sense to do something similar
> to the BSD section, and comment about older distributions maybe needing
> to manipulate /proc/kernel/* directly.

Mark Kirkwood
This commit is contained in:
Bruce Momjian 2005-02-26 23:19:05 +00:00
parent 0fc4ecf935
commit f55339577b

View File

@ -1,5 +1,5 @@
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.304 2005/02/10 05:14:58 neilc Exp $ $PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.305 2005/02/26 23:19:05 momjian Exp $
--> -->
<chapter Id="runtime"> <chapter Id="runtime">
@ -4458,37 +4458,29 @@ option SEMMAP=256
<indexterm><primary>Linux</><secondary>IPC configuration</></> <indexterm><primary>Linux</><secondary>IPC configuration</></>
<listitem> <listitem>
<para> <para>
The default shared memory limit (both The default settings are only suitable for small installations
<varname>SHMMAX</varname> and <varname>SHMALL</varname>) is 32 (the default max segment size is 32 MB). However the remaining
MB in 2.2 kernels, but it can be changed in the defaults are quite generously sized, and usually do not require
<filename>proc</filename> file system (without reboot). For changes. The max segment size can be changed via the
example, to allow 128 MB: <command>sysctl</command> interface. For example, to allow 128 MB,
and explicitly set the maximum total shared memory size to 2097152
pages (the default):
<screen> <screen>
<prompt>$</prompt> <userinput>echo 134217728 &gt;/proc/sys/kernel/shmall</userinput> <prompt>$</prompt> <userinput>systcl -w kernel.shmmax=134217728</userinput>
<prompt>$</prompt> <userinput>echo 134217728 &gt;/proc/sys/kernel/shmmax</userinput> <prompt>$</prompt> <userinput>systcl -w kernel.shmall=2097152</userinput>
</screen> </screen>
You could put these commands into a script run at boot-time. In addition these settings can be saved between reboots in
<filename>/etc/sysctl.conf.
</para> </para>
<para> <para>
Alternatively, you can use <command>sysctl</command>, if Older distributions may not have the <command>sysctl</command> program,
available, to control these parameters. Look for a file but equivalent changes can be made by manipulating the
called <filename>/etc/sysctl.conf</filename> and add lines <filename>/proc</filename> filesystem:
like the following to it: <screen>
<programlisting> <prompt>$</prompt> <userinput>echo 134217728 &gt;/proc/sys/kernel/shmmax</userinput>
kernel.shmall = 134217728 <prompt>$</prompt> <userinput>echo 2097152 &gt;/proc/sys/kernel/shmall</userinput>
kernel.shmmax = 134217728 </screen>
</programlisting>
This file is usually processed at boot time, but
<command>sysctl</command> can also be called
explicitly later.
</para>
<para>
Other parameters are sufficiently sized for any application. If
you want to see for yourself look in
<filename>/usr/src/linux/include/asm-<replaceable>xxx</>/shmparam.h</>
and <filename>/usr/src/linux/include/linux/sem.h</>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>