From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Greg Smith <greg@2ndquadrant.com>
Cc: alvherre@commandprompt.com
Cc: aidan@highrise.ca
Cc: jesper@krogh.cc
Cc: hannu@krosing.net
Cc: pgsql-performance@postgresql.org
Subject: Re: moving pg_xlog -- yeah, it's worth it!
Date: Tue, 23 Feb 2010 15:23:54 -0600
Message-ID: <4B83F30A020000250002F56B@gw.wicourts.gov> (raw)
In-Reply-To: <4B7646D2.3010508@2ndquadrant.com>
References: <4B750193020000250002F22D@gw.wicourts.gov>
<4B7646D2.3010508@2ndquadrant.com>
Greg Smith <greg@2ndquadrant.com> wrote:
> You can easily quantify if the BGW is aggressive enough. Buffers
> leave the cache three ways, and they each show up as separate
> counts in pg_stat_bgwriter: buffers_checkpoint, buffers_clean
> (the BGW), and buffers_backend (the queries). Cranking it up
> further tends to shift writes out of buffers_backend, which are
> the ones you want to avoid, toward buffers_clean instead. If
> buffers_backend is already low on a percentage basis compared to
> the other two, there's little benefit in trying to make the BGW do
> more.
Here are the values from our two largest and busiest systems (where
we found the pg_xlog placement to matter so much). It looks to me
like a more aggressive bgwriter would help, yes?
cir=> select * from pg_stat_bgwriter ;
-[ RECORD 1 ]------+------------
checkpoints_timed | 125996
checkpoints_req | 16932
buffers_checkpoint | 342972024
buffers_clean | 343634920
maxwritten_clean | 9928
buffers_backend | 575589056
buffers_alloc | 52397855471
cir=> select * from pg_stat_bgwriter ;
-[ RECORD 1 ]------+------------
checkpoints_timed | 125992
checkpoints_req | 16840
buffers_checkpoint | 260358442
buffers_clean | 474768152
maxwritten_clean | 9778
buffers_backend | 565837397
buffers_alloc | 71463873477
Current settings:
bgwriter_delay = '200ms'
bgwriter_lru_maxpages = 1000
bgwriter_lru_multiplier = 4
Any suggestions on how far to push it?
-Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, greg@2ndquadrant.com, alvherre@commandprompt.com, aidan@highrise.ca, jesper@krogh.cc, hannu@krosing.net
Subject: Re: moving pg_xlog -- yeah, it's worth it!
In-Reply-To: <4B83F30A020000250002F56B@gw.wicourts.gov>
References: <4B750193020000250002F22D@gw.wicourts.gov> <4B7646D2.3010508@2ndquadrant.com> <4B83F30A020000250002F56B@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox