From: Scott Marlowe <scott.marlowe@gmail.com>
To: Brad Nicholson <bnichols@ca.afilias.info>
Cc: Kevin Kempter <kevin@consistentstate.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Monitoring buffercache...
Date: Mon, 24 Nov 2008 14:24:47 -0700
Message-ID: <dcc563d10811241324t116f6e71j4863632b2c0c09a5@mail.gmail.com> (raw)
In-Reply-To: <1227556326.18990.98.camel@bnicholson-desktop>
References: <200811241143.57182.kevin@kevinkempterllc.com>
<dcc563d10811241146l95302b1wd0e88756883e4401@mail.gmail.com>
<1227556326.18990.98.camel@bnicholson-desktop>
On Mon, Nov 24, 2008 at 12:52 PM, Brad Nicholson
<bnichols@ca.afilias.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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: scott.marlowe@gmail.com, bnichols@ca.afilias.info, kevin@consistentstate.com
Subject: Re: Monitoring buffercache...
In-Reply-To: <dcc563d10811241324t116f6e71j4863632b2c0c09a5@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox