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

Commite19594c

Browse files
Reduce the default value of vacuum_cost_page_miss.
When commitf425b60 introduced cost based vacuum delays back in 2004,the defaults reflected then-current trends in hardware, as well ascertain historical limitations in PostgreSQL. There have been enormousimprovements in both areas since that time. The cost limit GUC defaultsfinally became much more representative of current trends followingcommitcbccac3, which decreased autovacuum_vacuum_cost_delay's defaultby 10x for PostgreSQL 12 (it went from 20ms to only 2ms).The relative costs have shifted too. This should also be accounted forby the defaults. More specifically, the relative importance of avoidingdirtying pages within VACUUM has greatly increased, primarily due tomain memory capacity scaling and trends in flash storage. WithinPostgres itself, improvements like sequential access during indexvacuuming (at least in nbtree and GiST indexes) have also beencontributing factors.To reflect all this, decrease the default of vacuum_cost_page_miss to 2.Since the default of vacuum_cost_page_dirty remains 20, dirtying a pageis now considered 10x "costlier" than a page miss by default.Author: Peter Geoghegan <pg@bowt.ie>Discussion:https://postgr.es/m/CAH2-WzmLPFnkWT8xMjmcsm7YS3+_Qi3iRWAb2+_Bc8UhVyHfuA@mail.gmail.com
1 parent69059d3 commite19594c

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
@@ -2116,7 +2116,7 @@ include_dir 'conf.d'
21162116
The estimated cost for vacuuming a buffer that has to be read from
21172117
disk. This represents the effort to lock the buffer pool,
21182118
lookup the shared hash table, read the desired block in from
2119-
the disk and scan its content. The default value is10.
2119+
the disk and scan its content. The default value is2.
21202120
</para>
21212121
</listitem>
21222122
</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 @@ intmax_parallel_workers = 8;
137137
intMaxBackends=0;
138138

139139
intVacuumCostPageHit=1;/* GUC parameters for vacuum */
140-
intVacuumCostPageMiss=10;
140+
intVacuumCostPageMiss=2;
141141
intVacuumCostPageDirty=20;
142142
intVacuumCostLimit=200;
143143
doubleVacuumCostDelay=0;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2413,7 +2413,7 @@ static struct config_int ConfigureNamesInt[] =
24132413
NULL
24142414
},
24152415
&VacuumCostPageMiss,
2416-
10,0,10000,
2416+
2,0,10000,
24172417
NULL,NULL,NULL
24182418
},
24192419

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164

165165
#vacuum_cost_delay = 0# 0-100 milliseconds (0 disables)
166166
#vacuum_cost_page_hit = 1# 0-10000 credits
167-
#vacuum_cost_page_miss =10# 0-10000 credits
167+
#vacuum_cost_page_miss =2# 0-10000 credits
168168
#vacuum_cost_page_dirty = 20# 0-10000 credits
169169
#vacuum_cost_limit = 200# 1-10000 credits
170170

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp