Help interpreting pg_stat_bgwriter output

From: sam mulube <sam(dot)mulube(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Help interpreting pg_stat_bgwriter output
Date: 2009-08-11 23:28:48
Message-ID: fd2e14540908111628o7a06c7b6h34367cc6be7feda8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

I wonder if I could have some help interpreting the output of
pg_stat_bgwriter. Here's my output:

checkpoints_timed | checkpoints_req | buffers_checkpoint | buffers_clean |
maxwritten_clean | buffers_backend | buffers_alloc
-------------------+-----------------+--------------------+---------------+------------------+-----------------+---------------
333 | 0 | 617784 | 0
| 0 | 740 | 19163
(1 row)

In case that gets garbled in email transmission, it transcribes to:

checkpoints_timed = 333
checkpoints_req = 0
buffers_checkpoint = 617784
buffers_clean = 0
maxwritten_clean = 0
buffers_backend = 740
buffers_alloc = 19163

So I've had a look at the docs, but I'm still not entirely clear what all
those values mean.

I think what I'm concerned about is the fact that buffers_clean = 0. I've
read Greg Smith's introduction to the bgwriter (
http://www.westnet.com/~gsmith/content/postgresql/chkp-bgw-83.htm) and if I
understand it correctly does the fact that buffers_clean = 0 imply that the
bgwriter is actually not writing *any* buffers?

So my questions are:
* is my interpreting of buffers_clean = 0 correct?
* If so, why would the bgwriter not be writing out any buffers?

My bgwriter config settings are:

bgwriter_delay = 200ms
bgwriter_lru_maxpages = 800
bgwriter_lru_multiplier = 8.0

Checkpoint settings are default except for:

checkpoint_timeout = 30min
checkpoint_segments = 10
checkpoint_completion_target = 0.9

Not sure what other config settings are pertinent here, but I can supply
them if required.

I am using postgresql 8.3.7-0ubuntu8.04.1, running on an OpenVZ VPS.

Thanks for any pointers.

Sam Mulube

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Ruth 2009-08-12 00:34:32 Windows 7 and SSPI
Previous Message Peter Headland 2009-08-11 20:13:05 Re: Race hazard deleting using CTID?