|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.160 2007/12/11 20:07:31 alvherre Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.161 2008/01/21 03:28:42 tgl Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter Id="runtime-config">
|
4 | 4 | <title>Server Configuration</title>
|
@@ -1192,17 +1192,16 @@ SET ENABLE_SEQSCAN TO OFF;
|
1192 | 1192 | <title>Background Writer</title>
|
1193 | 1193 |
|
1194 | 1194 | <para>
|
1195 |
| - Beginning in <productname>PostgreSQL</> 8.0, there is a separate server |
| 1195 | + There is a separate server |
1196 | 1196 | process called the <firstterm>background writer</>, whose function
|
1197 | 1197 | is to issue writes of <quote>dirty</> shared buffers. The intent is
|
1198 | 1198 | that server processes handling user queries should seldom or never have
|
1199 | 1199 | to wait for a write to occur, because the background writer will do it.
|
1200 | 1200 | However there is a net overall
|
1201 |
| - increase in I/O load, because where a repeatedly-dirtied page might |
1202 |
| - before have been written only once per checkpoint interval, the |
| 1201 | + increase in I/O load, because a repeatedly-dirtied page might |
| 1202 | + otherwise be written only once per checkpoint interval, but the |
1203 | 1203 | background writer might write it several times in the same interval.
|
1204 |
| - In most situations a continuous low load is preferable to periodic |
1205 |
| - spikes, but the parameters discussed in this subsection can be used to |
| 1204 | + The parameters discussed in this subsection can be used to |
1206 | 1205 | tune the behavior for local needs.
|
1207 | 1206 | </para>
|
1208 | 1207 |
|
@@ -1253,12 +1252,14 @@ SET ENABLE_SEQSCAN TO OFF;
|
1253 | 1252 | </indexterm>
|
1254 | 1253 | <listitem>
|
1255 | 1254 | <para>
|
1256 |
| - Unless limited by <varname>bgwriter_lru_maxpages</>, the number |
1257 |
| - of dirty buffers written in each round is determined by reference |
1258 |
| - to the number of new buffers that have been needed by server |
1259 |
| - processes during recent rounds. This number is multiplied by |
1260 |
| - <varname>bgwriter_lru_multiplier</> to arrive at the estimate |
1261 |
| - of the number of buffers that will be needed during the next round. |
| 1255 | + The number of dirty buffers written in each round is based on the |
| 1256 | + number of new buffers that have been needed by server processes |
| 1257 | + during recent rounds. The average recent need is multiplied by |
| 1258 | + <varname>bgwriter_lru_multiplier</> to arrive at an estimate of the |
| 1259 | + number of buffers that will be needed during the next round. Dirty |
| 1260 | + buffers are written until there are that many clean, reusable buffers |
| 1261 | + available. (However, no more than <varname>bgwriter_lru_maxpages</> |
| 1262 | + buffers will be written per round.) |
1262 | 1263 | Thus, a setting of 1.0 represents a <quote>just in time</> policy
|
1263 | 1264 | of writing exactly the number of buffers predicted to be needed.
|
1264 | 1265 | Larger values provide some cushion against spikes in demand,
|
|
0 commit comments