diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-04 20:21:07 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-04 20:21:07 +0000 |
| commit | 5d5087363d7cdbd00fc432a1216e83a00f7139bd (patch) | |
| tree | 56492be3beb9be188f37bfa68c9bfc0e35b0961c /src/backend/utils/misc/guc.c | |
| parent | 5592a6cf46d60187b6f4895d2144e67d4f54fa25 (diff) | |
| download | postgresql-5d5087363d7cdbd00fc432a1216e83a00f7139bd.tar.gz | |
Replace the BufMgrLock with separate locks on the lookup hashtable and
the freelist, plus per-buffer spinlocks that protect access to individual
shared buffer headers. This requires abandoning a global freelist (since
the freelist is a global contention point), which shoots down ARC and 2Q
as well as plain LRU management. Adopt a clock sweep algorithm instead.
Preliminary results show substantial improvement in multi-backend situations.
Diffstat (limited to 'src/backend/utils/misc/guc.c')
| -rw-r--r-- | src/backend/utils/misc/guc.c | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index e2ce29ed9a..b9486e8663 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.253 2005/03/01 20:23:34 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.254 2005/03/04 20:21:06 tgl Exp $ * *-------------------------------------------------------------------- */ @@ -77,7 +77,6 @@ extern bool Log_disconnections; extern DLLIMPORT bool check_function_bodies; extern int CommitDelay; extern int CommitSiblings; -extern int DebugSharedBuffers; extern char *default_tablespace; static const char *assign_log_destination(const char *value, @@ -1231,15 +1230,6 @@ static struct config_int ConfigureNamesInt[] = }, { - {"debug_shared_buffers", PGC_POSTMASTER, STATS_MONITORING, - gettext_noop("Interval to report shared buffer status in seconds"), - NULL - }, - &DebugSharedBuffers, - 0, 0, 600, NULL, NULL - }, - - { {"bgwriter_delay", PGC_SIGHUP, RESOURCES, gettext_noop("Background writer sleep time between rounds in milliseconds"), NULL @@ -1249,21 +1239,21 @@ static struct config_int ConfigureNamesInt[] = }, { - {"bgwriter_percent", PGC_SIGHUP, RESOURCES, - gettext_noop("Background writer percentage of dirty buffers to flush per round"), + {"bgwriter_lru_maxpages", PGC_SIGHUP, RESOURCES, + gettext_noop("Background writer maximum number of all pages to flush per round"), NULL }, - &BgWriterPercent, - 1, 0, 100, NULL, NULL + &bgwriter_lru_maxpages, + 5, 0, 1000, NULL, NULL }, { - {"bgwriter_maxpages", PGC_SIGHUP, RESOURCES, - gettext_noop("Background writer maximum number of pages to flush per round"), + {"bgwriter_all_maxpages", PGC_SIGHUP, RESOURCES, + gettext_noop("Background writer maximum number of LRU pages to flush per round"), NULL }, - &BgWriterMaxPages, - 100, 0, 1000, NULL, NULL + &bgwriter_all_maxpages, + 5, 0, 1000, NULL, NULL }, { @@ -1395,6 +1385,24 @@ static struct config_real ConfigureNamesReal[] = }, { + {"bgwriter_lru_percent", PGC_SIGHUP, RESOURCES, + gettext_noop("Background writer percentage of LRU buffers to flush per round"), + NULL + }, + &bgwriter_lru_percent, + 1.0, 0.0, 100.0, NULL, NULL + }, + + { + {"bgwriter_all_percent", PGC_SIGHUP, RESOURCES, + gettext_noop("Background writer percentage of all buffers to flush per round"), + NULL + }, + &bgwriter_all_percent, + 0.333, 0.0, 100.0, NULL, NULL + }, + + { {"seed", PGC_USERSET, UNGROUPED, gettext_noop("Sets the seed for random-number generation."), NULL, |
