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

Commitbd09503

Browse files
committed
Increase the default vacuum_cost_limit from 200 to 2000
The original 200 default value was set back inf425b60 when the costdelay settings were first added. Hardware has improved quite a bit sincethen and we've also made improvements such as sorting buffers duringcheckpoints (9cd00c4) which should result in less random writes.This low default value was reportedly causing problems with badlyconfigured servers and in the absence of a native method to removeexcessive bloat from tables without incurring an AccessExclusiveLock, thisoften made cleaning up the damage caused by badly configured auto-vacuumsdifficult.It seems more likely that someone will notice that auto-vacuum is runningtoo quickly than too slowly, so let's go all out and multiple the defaultvalue for the setting by 10. With the default vacuum_cost_page_dirty andautovacuum_vacuum_cost_delay (assuming a page size of 8192 bytes), thisallows autovacuum a theoretical maximum dirty write rate of around 39MB/sinstead of just 3.9MB/s.Author: David RowleyDiscussion:https://postgr.es/m/CAKJS1f_YbXC2qTMPyCbmsPiKvZYwpuQNQMohiRXLj1r=8_rYvw@mail.gmail.com
1 parentff9bff0 commitbd09503

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ include_dir 'conf.d'
19291929
<listitem>
19301930
<para>
19311931
The accumulated cost that will cause the vacuuming process to sleep.
1932-
The default value is200.
1932+
The default value is2000.
19331933
</para>
19341934
</listitem>
19351935
</varlistentry>

‎src/backend/utils/init/globals.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ intMaxBackends = 0;
137137
intVacuumCostPageHit=1;/* GUC parameters for vacuum */
138138
intVacuumCostPageMiss=10;
139139
intVacuumCostPageDirty=20;
140-
intVacuumCostLimit=200;
140+
intVacuumCostLimit=2000;
141141
intVacuumCostDelay=0;
142142

143143
intVacuumPageHit=0;

‎src/backend/utils/misc/guc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,7 @@ static struct config_int ConfigureNamesInt[] =
22682268
NULL
22692269
},
22702270
&VacuumCostLimit,
2271-
200,1,10000,
2271+
2000,1,10000,
22722272
NULL,NULL,NULL
22732273
},
22742274

‎src/backend/utils/misc/postgresql.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
#vacuum_cost_page_hit = 1# 0-10000 credits
160160
#vacuum_cost_page_miss = 10# 0-10000 credits
161161
#vacuum_cost_page_dirty = 20# 0-10000 credits
162-
#vacuum_cost_limit =200# 1-10000 credits
162+
#vacuum_cost_limit =2000# 1-10000 credits
163163

164164
# - Background Writer -
165165

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp