Re: tuning bgwriter in 8.4.2

From: Ben Chobot <bench(at)silentmedia(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: tuning bgwriter in 8.4.2
Date: 2010-02-14 18:48:37
Message-ID: 08043919-7C7C-408E-A65E-C3F6647C2219@silentmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Feb 14, 2010, at 10:25 AM, Ben Chobot wrote:

> We recently upgraded to 8.4.2 and I'm trying to make sure our bgwriter is working as well as it can. Based on:
>
> # select * from pg_stat_bgwriter ;
> checkpoints_timed | checkpoints_req | buffers_checkpoint | buffers_clean | maxwritten_clean | buffers_backend | buffers_alloc
> -------------------+-----------------+--------------------+---------------+------------------+-----------------+---------------
> 804 | 2 | 39171885 | 22562 | 211 | 24759656 | 4488627
> (1 row)
>
> ...I'm not sure that it is, because as I understand things, assuming I don't keep updating the same pages then buffers_backend should be a small percentage of buffers_alloc, and buffers_clean should be larger than it is compared to buffers_checkpoint. Is my understanding correct?
>
> My checkpoints are spread exactly 5 minutes apart, and a typical checkpoint log entry looks like:
>
> checkpoint complete: wrote 48289 buffers (3.7%); 0 transaction log file(s) added, 0 removed, 14 recycled; write=149.872 s, sync=0.378 s, total=150.256 s
>
> The only bgwriter tunable we've adjusted so far is bgwriter_lru_maxpages = 500, though we've also set checkpoint_segments = 768 (not that we need it that high, but we have the space on the wal volume.)

I should have added that those 211 maxwritten_clean entries came about before we set bgwriter_lru_maxpages to 500. And the 2 requested checkpoints came with the initial slony load.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2010-02-14 18:51:20 Re: The easiest and robust way of configuring password pass through mechanism..
Previous Message Davor J. 2010-02-14 18:35:24 Re: Function that creates a custom (temporary) table AND returns a pointer to it = impossible in pg?