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

Commitd46b1f9

Browse files
committed
Minor editorializing on cost-based vacuum description.
1 parentee33fe8 commitd46b1f9

File tree

1 file changed

+39
-30
lines changed

1 file changed

+39
-30
lines changed

‎doc/src/sgml/runtime.sgml

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.240 2004/02/1706:28:05 neilc Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.241 2004/02/1707:36:47 tgl Exp $
33
-->
44

55
<Chapter Id="runtime">
@@ -995,32 +995,32 @@ SET ENABLE_SEQSCAN TO OFF;
995995
<title>Cost-Based Vacuum Delay</title>
996996

997997
<para>
998-
During the execution of <command>VACUUM</command>,
999-
<command>VACUUM FULL</command>and <command>ANALYZE</command>,
1000-
the systemmantains an internal counter that keeps track of the
1001-
cost of the various I/O operations that are performed. When the
1002-
accumulated cost reaches a limit
1003-
(specified by <varname>vacuum_cost_limit</varname>), thebackend performing
1004-
the operation will sleep for a while (specified by
998+
During the execution of <command>VACUUM</command>
999+
and <command>ANALYZE</command> commands,
1000+
the systemmaintains an internal counter that keeps track of the
1001+
estimatedcost of the various I/O operations that are performed.
1002+
When theaccumulated cost reaches a limit
1003+
(specified by <varname>vacuum_cost_limit</varname>), theprocess
1004+
performingthe operation will sleep for a while (specified by
10051005
<varname>vacuum_cost_naptime</varname>). Then it will reset the
10061006
counter and continue execution.
10071007
</para>
10081008

10091009
<para>
1010-
The intent of this feature is to allow administratorsthe reduce
1010+
The intent of this feature is to allow administratorsto reduce
10111011
the I/O impact of these commands on concurrent database
10121012
activity. There are some situations in which it is not very
1013-
important thatmaintainence commands like
1013+
important thatmaintenance commands like
10141014
<command>VACUUM</command> and <command>ANALYZE</command> finish
1015-
quickly; however, it is usually very importantthese these
1015+
quickly; however, it is usually very importantthat these
10161016
commands do not significantly interfere with the ability of the
10171017
system to perform other database operations. Cost-based vacuum
10181018
delay provides a way for administrators to achieve this.
10191019
</para>
10201020

10211021
<para>
10221022
This feature is disabled by default. To enable it, set the
1023-
<varname>vacuum_cost_naptime</varname> variable to areasonable
1023+
<varname>vacuum_cost_naptime</varname> variable to anonzero
10241024
value.
10251025
</para>
10261026

@@ -1029,7 +1029,7 @@ SET ENABLE_SEQSCAN TO OFF;
10291029
<term><varname>vacuum_cost_page_hit</varname> (<type>integer</type>)</term>
10301030
<listitem>
10311031
<para>
1032-
The cost for vacuuming a buffer found in the shared buffer
1032+
Theestimatedcost for vacuuming a buffer found in the shared buffer
10331033
cache. It represents the cost to lock the buffer pool, lookup
10341034
the shared hash table and scan the content of the page. The
10351035
default value is 1.
@@ -1041,7 +1041,7 @@ SET ENABLE_SEQSCAN TO OFF;
10411041
<term><varname>vacuum_cost_page_miss</varname> (<type>integer</type>)</term>
10421042
<listitem>
10431043
<para>
1044-
The cost for vacuuming a buffer that has to be read from
1044+
Theestimatedcost for vacuuming a buffer that has to be read from
10451045
disk. This represents the effort to lock the buffer pool,
10461046
lookup the shared hash table, read the desired block in from
10471047
the disk and scan its content. The default value is 10.
@@ -1053,7 +1053,7 @@ SET ENABLE_SEQSCAN TO OFF;
10531053
<term><varname>vacuum_cost_page_dirty</varname> (<type>integer</type>)</term>
10541054
<listitem>
10551055
<para>
1056-
Theextra costadded when vacuum modifies a block that was
1056+
Theestimated costcharged when vacuum modifies a block that was
10571057
previously clean. It represents the extra I/O required to
10581058
flush the dirty block out to disk again. The default value is
10591059
20.
@@ -1065,7 +1065,7 @@ SET ENABLE_SEQSCAN TO OFF;
10651065
<term><varname>vacuum_cost_limit</varname> (<type>integer</type>)</term>
10661066
<listitem>
10671067
<para>
1068-
The accumulated cost that will cause thebackend to briefly
1068+
The accumulated cost that will cause thevacuuming process to briefly
10691069
nap. The default value is 200.
10701070
</para>
10711071
</listitem>
@@ -1075,25 +1075,34 @@ SET ENABLE_SEQSCAN TO OFF;
10751075
<term><varname>vacuum_cost_naptime</varname> (<type>integer</type>)</term>
10761076
<listitem>
10771077
<para>
1078-
The length of time in milliseconds that a backend will nap
1079-
when the cost limit has been exceeded. There are certain bulk
1080-
operations that hold critical locks and should therefore
1081-
complete as quickly as possible. Because of that it is
1082-
possible that the cost actually accumulates far higher than
1083-
this limit. To compensate for this, the final naptime is
1084-
calculated as <varname>vacuum_cost_naptime</varname> *
1085-
<varname>accumulated_balance</varname> /
1086-
<varname>vacuum_cost_limit</varname> with a maximum of
1087-
<varname>vacuum_cost_naptime</varname> * 4.
1088-
</para>
1089-
1090-
<para>
1078+
The length of time, in milliseconds, that the process will nap
1079+
when the cost limit has been exceeded.
10911080
The default value is 0, which disables the cost-based vacuum
1092-
delay feature.
1081+
delay feature. Positive values enable cost-based vacuuming.
1082+
Note however that on many systems, the effective resolution
1083+
of sleep delays is 10 milliseconds; setting
1084+
<varname>vacuum_cost_naptime</varname> to a value that is
1085+
not a multiple of 10 may have the same results as setting it
1086+
to the next higher multiple of 10.
10931087
</para>
10941088
</listitem>
10951089
</varlistentry>
10961090
</variablelist>
1091+
1092+
<note>
1093+
<para>
1094+
There are certain bulk operations that hold critical locks and should
1095+
therefore complete as quickly as possible. Cost-based vacuum
1096+
delays do not occur during such operations. Therefore it is
1097+
possible that the cost accumulates far higher than the specified
1098+
limit. To avoid uselessly long delays in such cases, the actual
1099+
naptime is calculated as <varname>vacuum_cost_naptime</varname> *
1100+
<varname>accumulated_balance</varname> /
1101+
<varname>vacuum_cost_limit</varname> with a maximum of
1102+
<varname>vacuum_cost_naptime</varname> * 4.
1103+
</para>
1104+
</note>
1105+
10971106
</sect3>
10981107
</sect2>
10991108

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp