|
1 | 1 | <!-- |
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 $ |
3 | 3 | --> |
4 | 4 |
|
5 | 5 | <chapter Id="runtime"> |
@@ -4458,37 +4458,29 @@ option SEMMAP=256 |
4458 | 4458 | <indexterm><primary>Linux</><secondary>IPC configuration</></> |
4459 | 4459 | <listitem> |
4460 | 4460 | <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): |
4466 | 4468 | <screen> |
4467 | | -<prompt>$</prompt> <userinput>echo 134217728 >/proc/sys/kernel/shmall</userinput> |
4468 | | -<prompt>$</prompt> <userinput>echo 134217728 >/proc/sys/kernel/shmmax</userinput> |
| 4469 | +<prompt>$</prompt> <userinput>systcl -wkernel.shmmax=134217728</userinput> |
| 4470 | +<prompt>$</prompt> <userinput>systcl -wkernel.shmall=2097152</userinput> |
4469 | 4471 | </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. |
4471 | 4474 | </para> |
4472 | 4475 |
|
4473 | 4476 | <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 >/proc/sys/kernel/shmmax</userinput> |
| 4482 | +<prompt>$</prompt> <userinput>echo 2097152 >/proc/sys/kernel/shmall</userinput> |
| 4483 | +</screen> |
4492 | 4484 | </para> |
4493 | 4485 | </listitem> |
4494 | 4486 | </varlistentry> |
|