Re: How to interpret view pg_stat_bgwriter

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Huang, Suya" <Suya(dot)Huang(at)au(dot)experian(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: How to interpret view pg_stat_bgwriter
Date: 2014-09-17 20:40:44
Message-ID: 5419F1CC.8060309@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 9/16/14 2:42 AM, Huang, Suya wrote:
> # checkpoints_req is much bigger than checkpoints_timed, suggest that I
> may increase checkpoint_segments in our system

That's not strictly necessary, but personally I think both of those
settings are too low for you.

> #maxwritten_clean is high, suggests increase bgwriter_lru_maxpages

Yes.

> # buffers_backend is much smaller than buffers_alloc, suggests
> increasing bgwriter_lru_maxpages, bgwriter_lru_multiplier, and
> decreasing bgwriter_delay.

You should rather compare buffers_backend against buffers_checkpoint.

Also consider graphing these quantities over time so you can see how
different workloads affects the results and what the effects of your
tuning are.

Also turn on log_checkpoints and look at the sync times. In my
experience that dominates all the bgwriter tuning.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rajiv Kasera 2014-09-18 04:01:51 Archiving & Reporting Support in PG9.3
Previous Message gabrielle 2014-09-17 04:11:37 Re: log message from autovac doesn't include db name