|
1 | | -<!-- $PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.378 2007/02/16 16:37:29 tgl Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.379 2007/03/06 09:54:23 petere Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter Id="runtime"> |
4 | 4 | <title>Operating System Environment</title> |
@@ -1201,15 +1201,21 @@ Out of Memory: Killed process 12345 (postgres). |
1201 | 1201 |
|
1202 | 1202 | <para> |
1203 | 1203 | One way to avoid this problem is to run |
1204 | | - <productname>PostgreSQL</productname> |
1205 | | - on a machine where you can be sure that other processes will not |
1206 | | - run the machine out of memory. |
| 1204 | + <productname>PostgreSQL</productname> on a machine where you can |
| 1205 | + be sure that other processes will not run the machine out of |
| 1206 | + memory. If memory is tight, increasing the swap space of the |
| 1207 | + operating system can help avoiding the problem, because the |
| 1208 | + out-of-memory (OOM) killer is invoked whenever physical memory and |
| 1209 | + swap space are exhausted. |
1207 | 1210 | </para> |
1208 | 1211 |
|
1209 | 1212 | <para> |
1210 | | - On Linux 2.6 and later, a better solution is to modify the kernel's |
1211 | | - behavior so that it will not <quote>overcommit</> memory. This is |
1212 | | - done by selecting strict overcommit mode via <command>sysctl</command>: |
| 1213 | + On Linux 2.6 and later, an additional measure is to modify the |
| 1214 | + kernel's behavior so that it will not <quote>overcommit</> memory. |
| 1215 | + Although this setting will not prevent the OOM killer from |
| 1216 | + invoking altogether, it will lower the chances significantly and |
| 1217 | + will therefore lead to more robust system behavior. This is done |
| 1218 | + by selecting strict overcommit mode via <command>sysctl</command>: |
1213 | 1219 | <programlisting> |
1214 | 1220 | sysctl -w vm.overcommit_memory=2 |
1215 | 1221 | </programlisting> |
|
0 commit comments