diff options
author | Alvaro Herrera | 2007-07-24 01:53:56 +0000 |
---|---|---|
committer | Alvaro Herrera | 2007-07-24 01:53:56 +0000 |
commit | 53d2951be7687089885865f31949eda87439a80b (patch) | |
tree | ce5cfa88e8702a50de1238eb4c8455ef38c6a7e5 /src | |
parent | ab7d2b6a7376a7a3542201899aff9e953414ca81 (diff) |
Set a default autovacuum vacuum_cost_delay value of 20ms, to avoid excessive
I/O utilization, per discussion.
While at it, lower the autovacuum vacuum and analyze threshold values to 50
tuples. It is a bit higher (i.e. more conservative) than what I originally
proposed but much better than the old values for small tables.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/misc/guc.c | 8 | ||||
-rw-r--r-- | src/backend/utils/misc/postgresql.conf.sample | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index feb5354940d..06915017e6e 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut <peter_e@gmx.net>. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.405 2007/07/10 13:14:21 mha Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.406 2007/07/24 01:53:56 alvherre Exp $ * *-------------------------------------------------------------------- */ @@ -1348,7 +1348,7 @@ static struct config_int ConfigureNamesInt[] = GUC_UNIT_MS }, &autovacuum_vac_cost_delay, - -1, -1, 1000, NULL, NULL + 20, -1, 1000, NULL, NULL }, { @@ -1656,7 +1656,7 @@ static struct config_int ConfigureNamesInt[] = NULL }, &autovacuum_vac_thresh, - 500, 0, INT_MAX, NULL, NULL + 50, 0, INT_MAX, NULL, NULL }, { {"autovacuum_analyze_threshold", PGC_SIGHUP, AUTOVACUUM, @@ -1664,7 +1664,7 @@ static struct config_int ConfigureNamesInt[] = NULL }, &autovacuum_anl_thresh, - 250, 0, INT_MAX, NULL, NULL + 50, 0, INT_MAX, NULL, NULL }, { /* see varsup.c for why this is PGC_POSTMASTER not PGC_SIGHUP */ diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 738eb9a5f76..51c83ade0af 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -381,9 +381,9 @@ #log_autovacuum = -1 # -1 is disabled, 0 logs all actions # and their durations, > 0 logs only # actions running at least N msec. -#autovacuum_vacuum_threshold = 500 # min # of tuple updates before +#autovacuum_vacuum_threshold = 50 # min # of tuple updates before # vacuum -#autovacuum_analyze_threshold = 250 # min # of tuple updates before +#autovacuum_analyze_threshold = 50 # min # of tuple updates before # analyze #autovacuum_vacuum_scale_factor = 0.2 # fraction of rel size before # vacuum @@ -391,7 +391,7 @@ # analyze #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum # (change requires restart) -#autovacuum_vacuum_cost_delay = -1 # default vacuum cost delay for +#autovacuum_vacuum_cost_delay = 20 # default vacuum cost delay for # autovacuum, -1 means use # vacuum_cost_delay #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for |