Re: buffercache/bgwriter - Mailing list pgsql-performance

From Nicholson, Brad (Toronto, ON, CA)
Subject Re: buffercache/bgwriter
Date
Msg-id 2626AEE4839D064CB0472A3814DC403F46D211C07C@GVW1092EXB.americas.hpqcorp.net
Whole thread Raw
In response to Re: buffercache/bgwriter  (tv@fuzzy.cz)
Responses Re: buffercache/bgwriter  (Uwe Bartels <uwe.bartels@gmail.com>)
List pgsql-performance

> -----Original Message-----
> From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-
> owner@postgresql.org] On Behalf Of tv@fuzzy.cz
> Sent: Wednesday, March 23, 2011 10:42 AM
> To: Uwe Bartels
> Cc: pgsql-performance@postgresql.org
> Subject: Re: [PERFORM] buffercache/bgwriter
> 
> > Hi,
> >
> > I have very bad bgwriter statistics on a server which runs since many
> > weeks
> > and it is still the same after a recent restart.
> > There are roughly 50% of buffers written by the backend processes and
> the
> > rest by checkpoints.
> > The statistics below are from a server with 140GB RAM, 32GB
> shared_buffers
> > and a runtime of one hour.
> >
> > As you can see in the pg_buffercache view that there are most buffers
> > without usagecount - so they are as free or even virgen as they can
> be.
> > At the same time I have 53% percent of the dirty buffers written by
> the
> > backend process.
> 
> There are some nice old threads dealing with this - see for example
> 
> http://postgresql.1045698.n5.nabble.com/Bgwriter-and-pg-stat-bgwriter-
> buffers-clean-aspects-td2071472.html
> 
> http://postgresql.1045698.n5.nabble.com/tuning-bgwriter-in-8-4-2-
> td1926854.html
> 
> and there even some nice external links to more detailed explanation
> 
> http://www.westnet.com/~gsmith/content/postgresql/chkp-bgw-83.htm

The interesting question here is - with 3 million unallocated buffers, why is the DB evicting buffers (buffers_backend
column)instead of allocating the unallocated buffers?
 

Brad.

pgsql-performance by date:

Previous
From: Uwe Bartels
Date:
Subject: Re: buffercache/bgwriter
Next
From: Uwe Bartels
Date:
Subject: Re: buffercache/bgwriter