Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
d46b1f90
Commit
d46b1f90
authored
21 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Minor editorializing on cost-based vacuum description.
parent
ee33fe88
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/runtime.sgml
+39
-30
39 additions, 30 deletions
doc/src/sgml/runtime.sgml
with
39 additions
and
30 deletions
doc/src/sgml/runtime.sgml
+
39
−
30
View file @
d46b1f90
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.24
0
2004/02/17 0
6:28:05 neilc
Exp $
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.24
1
2004/02/17 0
7:36:47 tgl
Exp $
-->
-->
<Chapter Id="runtime">
<Chapter Id="runtime">
...
@@ -995,24 +995,24 @@ SET ENABLE_SEQSCAN TO OFF;
...
@@ -995,24 +995,24 @@ SET ENABLE_SEQSCAN TO OFF;
<title>Cost-Based Vacuum Delay</title>
<title>Cost-Based Vacuum Delay</title>
<para>
<para>
During the execution of <command>VACUUM</command>
,
During the execution of <command>VACUUM</command>
<command>VACUUM FULL</command>
and <command>ANALYZE</command>,
and <command>ANALYZE</command>
commands
,
the system mantains an internal counter that keeps track of the
the system ma
i
ntains an internal counter that keeps track of the
cost of the various I/O operations that are performed.
When the
estimated
cost of the various I/O operations that are performed.
accumulated cost reaches a limit
When the
accumulated cost reaches a limit
(specified by <varname>vacuum_cost_limit</varname>), the
backend performing
(specified by <varname>vacuum_cost_limit</varname>), the
process
the operation will sleep for a while (specified by
performing
the operation will sleep for a while (specified by
<varname>vacuum_cost_naptime</varname>). Then it will reset the
<varname>vacuum_cost_naptime</varname>). Then it will reset the
counter and continue execution.
counter and continue execution.
</para>
</para>
<para>
<para>
The intent of this feature is to allow administrators t
he
reduce
The intent of this feature is to allow administrators t
o
reduce
the I/O impact of these commands on concurrent database
the I/O impact of these commands on concurrent database
activity. There are some situations in which it is not very
activity. There are some situations in which it is not very
important that maint
aine
nce commands like
important that maint
ena
nce commands like
<command>VACUUM</command> and <command>ANALYZE</command> finish
<command>VACUUM</command> and <command>ANALYZE</command> finish
quickly; however, it is usually very important th
ese
these
quickly; however, it is usually very important th
at
these
commands do not significantly interfere with the ability of the
commands do not significantly interfere with the ability of the
system to perform other database operations. Cost-based vacuum
system to perform other database operations. Cost-based vacuum
delay provides a way for administrators to achieve this.
delay provides a way for administrators to achieve this.
...
@@ -1020,7 +1020,7 @@ SET ENABLE_SEQSCAN TO OFF;
...
@@ -1020,7 +1020,7 @@ SET ENABLE_SEQSCAN TO OFF;
<para>
<para>
This feature is disabled by default. To enable it, set the
This feature is disabled by default. To enable it, set the
<varname>vacuum_cost_naptime</varname> variable to a
reasonable
<varname>vacuum_cost_naptime</varname> variable to a
nonzero
value.
value.
</para>
</para>
...
@@ -1029,7 +1029,7 @@ SET ENABLE_SEQSCAN TO OFF;
...
@@ -1029,7 +1029,7 @@ SET ENABLE_SEQSCAN TO OFF;
<term><varname>vacuum_cost_page_hit</varname> (<type>integer</type>)</term>
<term><varname>vacuum_cost_page_hit</varname> (<type>integer</type>)</term>
<listitem>
<listitem>
<para>
<para>
The cost for vacuuming a buffer found in the shared buffer
The
estimated
cost for vacuuming a buffer found in the shared buffer
cache. It represents the cost to lock the buffer pool, lookup
cache. It represents the cost to lock the buffer pool, lookup
the shared hash table and scan the content of the page. The
the shared hash table and scan the content of the page. The
default value is 1.
default value is 1.
...
@@ -1041,7 +1041,7 @@ SET ENABLE_SEQSCAN TO OFF;
...
@@ -1041,7 +1041,7 @@ SET ENABLE_SEQSCAN TO OFF;
<term><varname>vacuum_cost_page_miss</varname> (<type>integer</type>)</term>
<term><varname>vacuum_cost_page_miss</varname> (<type>integer</type>)</term>
<listitem>
<listitem>
<para>
<para>
The cost for vacuuming a buffer that has to be read from
The
estimated
cost for vacuuming a buffer that has to be read from
disk. This represents the effort to lock the buffer pool,
disk. This represents the effort to lock the buffer pool,
lookup the shared hash table, read the desired block in from
lookup the shared hash table, read the desired block in from
the disk and scan its content. The default value is 10.
the disk and scan its content. The default value is 10.
...
@@ -1053,7 +1053,7 @@ SET ENABLE_SEQSCAN TO OFF;
...
@@ -1053,7 +1053,7 @@ SET ENABLE_SEQSCAN TO OFF;
<term><varname>vacuum_cost_page_dirty</varname> (<type>integer</type>)</term>
<term><varname>vacuum_cost_page_dirty</varname> (<type>integer</type>)</term>
<listitem>
<listitem>
<para>
<para>
The e
xtra
cost
add
ed when vacuum modifies a block that was
The e
stimated
cost
charg
ed when vacuum modifies a block that was
previously clean. It represents the extra I/O required to
previously clean. It represents the extra I/O required to
flush the dirty block out to disk again. The default value is
flush the dirty block out to disk again. The default value is
20.
20.
...
@@ -1065,7 +1065,7 @@ SET ENABLE_SEQSCAN TO OFF;
...
@@ -1065,7 +1065,7 @@ SET ENABLE_SEQSCAN TO OFF;
<term><varname>vacuum_cost_limit</varname> (<type>integer</type>)</term>
<term><varname>vacuum_cost_limit</varname> (<type>integer</type>)</term>
<listitem>
<listitem>
<para>
<para>
The accumulated cost that will cause the
b
ac
kend
to briefly
The accumulated cost that will cause the
v
ac
uuming process
to briefly
nap. The default value is 200.
nap. The default value is 200.
</para>
</para>
</listitem>
</listitem>
...
@@ -1075,25 +1075,34 @@ SET ENABLE_SEQSCAN TO OFF;
...
@@ -1075,25 +1075,34 @@ SET ENABLE_SEQSCAN TO OFF;
<term><varname>vacuum_cost_naptime</varname> (<type>integer</type>)</term>
<term><varname>vacuum_cost_naptime</varname> (<type>integer</type>)</term>
<listitem>
<listitem>
<para>
<para>
The length of time in milliseconds that a backend will nap
The length of time, in milliseconds, that the process will nap
when the cost limit has been exceeded. There are certain bulk
when the cost limit has been exceeded.
operations that hold critical locks and should therefore
complete as quickly as possible. Because of that it is
possible that the cost actually accumulates far higher than
this limit. To compensate for this, the final naptime is
calculated as <varname>vacuum_cost_naptime</varname> *
<varname>accumulated_balance</varname> /
<varname>vacuum_cost_limit</varname> with a maximum of
<varname>vacuum_cost_naptime</varname> * 4.
</para>
<para>
The default value is 0, which disables the cost-based vacuum
The default value is 0, which disables the cost-based vacuum
delay feature.
delay feature. Positive values enable cost-based vacuuming.
Note however that on many systems, the effective resolution
of sleep delays is 10 milliseconds; setting
<varname>vacuum_cost_naptime</varname> to a value that is
not a multiple of 10 may have the same results as setting it
to the next higher multiple of 10.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</variablelist>
<note>
<para>
There are certain bulk operations that hold critical locks and should
therefore complete as quickly as possible. Cost-based vacuum
delays do not occur during such operations. Therefore it is
possible that the cost accumulates far higher than the specified
limit. To avoid uselessly long delays in such cases, the actual
naptime is calculated as <varname>vacuum_cost_naptime</varname> *
<varname>accumulated_balance</varname> /
<varname>vacuum_cost_limit</varname> with a maximum of
<varname>vacuum_cost_naptime</varname> * 4.
</para>
</note>
</sect3>
</sect3>
</sect2>
</sect2>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment