Skip site navigation (1) Skip section navigation (2)

Re: Monitoring buffercache...

From: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info>, Kevin Kempter <kevin(at)consistentstate(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Monitoring buffercache...
Date: 2008-11-25 19:37:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Scott Marlowe wrote:
> On Mon, Nov 24, 2008 at 12:52 PM, Brad Nicholson
> <bnichols(at)ca(dot)afilias(dot)info> wrote:
>>> I just ran it in a loop over and over on my 8 core opteron server and
>>> it ran the load factor up by almost exactly 1.0.  Under our normal
>>> daily load, it sits at 1.9 to 2.5, and it climbed to 2.9 under the new
>>> load of running that query over and over.  So, it doesn't seem to be
>>> blocking or anything.
>> The internal docs for pg_buffercache_pages.c state:
>> "To get a consistent picture of the buffer state, we must lock all
>> partitions of the buffer map.  Needless to say, this is horrible
>> for concurrency.  Must grab locks in increasing order to avoid
>> possible deadlocks."
> Well, the pg hackers tend to take a parnoid view (it's a good thing
> TM) on things like this.  My guess is that the period of time for
> which pg_buffercache takes locks on the buffer map are short enough
> that it isn't a real big deal on a fast enough server.  On mine, it
> certainly had no real negative effects for the 5 minutes or so it was
> running in a loop.  None I could see, and we run hundreds of queries
> per second on our system.
> Of course, for certain other types of loads it could be a much bigger
> issue.  But for our load, on our machine, it was virtually
> unnoticeable.
Yeah, I wouldn't worry about accessing it every 15 minutes! I put the 
comment there to make it clear that (like pg_locks) selecting from it 
*very frequently* could effect performance.



In response to

pgsql-performance by date

Next:From: Greg JamanDate: 2008-11-26 04:07:46
Subject: Partition table query performance
Previous:From: Tom LaneDate: 2008-11-25 13:36:46
Subject: Re: Deteriorating performance when loading large objects

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group