Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf553395

Browse files
committed
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
1 parent0fc4ecf commitf553395

File tree

1 file changed

+19
-27
lines changed

1 file changed

+19
-27
lines changed

‎doc/src/sgml/runtime.sgml

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.304 2005/02/10 05:14:58 neilc Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.305 2005/02/26 23:19:05 momjian Exp $
33
-->
44

55
<chapter Id="runtime">
@@ -4458,37 +4458,29 @@ option SEMMAP=256
44584458
<indexterm><primary>Linux</><secondary>IPC configuration</></>
44594459
<listitem>
44604460
<para>
4461-
The default shared memory limit (both
4462-
<varname>SHMMAX</varname> and <varname>SHMALL</varname>) is 32
4463-
MB in 2.2 kernels, but it can be changed in the
4464-
<filename>proc</filename> file system (without reboot). For
4465-
example, to allow 128 MB:
4461+
The default settings are only suitable for small installations
4462+
(the default max segment size is 32 MB). However the remaining
4463+
defaults are quite generously sized, and usually do not require
4464+
changes. The max segment size can be changed via the
4465+
<command>sysctl</command> interface. For example, to allow 128 MB,
4466+
and explicitly set the maximum total shared memory size to 2097152
4467+
pages (the default):
44664468
<screen>
4467-
<prompt>$</prompt> <userinput>echo 134217728 &gt;/proc/sys/kernel/shmall</userinput>
4468-
<prompt>$</prompt> <userinput>echo 134217728 &gt;/proc/sys/kernel/shmmax</userinput>
4469+
<prompt>$</prompt> <userinput>systcl -wkernel.shmmax=134217728</userinput>
4470+
<prompt>$</prompt> <userinput>systcl -wkernel.shmall=2097152</userinput>
44694471
</screen>
4470-
You could put these commands into a script run at boot-time.
4472+
In addition these settings can be saved between reboots in
4473+
<filename>/etc/sysctl.conf.
44714474
</para>
44724475

44734476
<para>
4474-
Alternatively, you can use <command>sysctl</command>, if
4475-
available, to control these parameters. Look for a file
4476-
called <filename>/etc/sysctl.conf</filename> and add lines
4477-
like the following to it:
4478-
<programlisting>
4479-
kernel.shmall = 134217728
4480-
kernel.shmmax = 134217728
4481-
</programlisting>
4482-
This file is usually processed at boot time, but
4483-
<command>sysctl</command> can also be called
4484-
explicitly later.
4485-
</para>
4486-
4487-
<para>
4488-
Other parameters are sufficiently sized for any application. If
4489-
you want to see for yourself look in
4490-
<filename>/usr/src/linux/include/asm-<replaceable>xxx</>/shmparam.h</>
4491-
and <filename>/usr/src/linux/include/linux/sem.h</>.
4477+
Older distributions may not have the <command>sysctl</command> program,
4478+
but equivalent changes can be made by manipulating the
4479+
<filename>/proc</filename> filesystem:
4480+
<screen>
4481+
<prompt>$</prompt> <userinput>echo 134217728 &gt;/proc/sys/kernel/shmmax</userinput>
4482+
<prompt>$</prompt> <userinput>echo 2097152 &gt;/proc/sys/kernel/shmall</userinput>
4483+
</screen>
44924484
</para>
44934485
</listitem>
44944486
</varlistentry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp