pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Stark <stark@mit.edu>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: Jim Nasby <jim@nasby.net>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Ants Aasma <ants@cybertec.at>
Cc: Atri Sharma <atri.jiit@gmail.com>
Cc: Amit Kapila <amit.kapila@huawei.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Page replacement algorithm in buffer cache
Date: Wed, 03 Apr 2013 20:41:39 -0400
Message-ID: <29209.1365036099@sss.pgh.pa.us> (raw)
In-Reply-To: <CAM-w4HMbRyoDJfB1WB7ZT91HtD6ku8CYb8QN97QsUTEdG7ky9A@mail.gmail.com>
References: <3949.1364921816@sss.pgh.pa.us>
	<20130402172041.GH2415@alap2.anarazel.de>
	<CA+TgmoaP1PtRSkU0=ioi4hRxqCBzrNP9JV1L0YdkBp42PESSzw@mail.gmail.com>
	<CAM-w4HMbRyoDJfB1WB7ZT91HtD6ku8CYb8QN97QsUTEdG7ky9A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Greg Stark <stark@mit.edu> writes:
> I'm still skeptical about the idea of a "freelist". That just seems like a
> terrible point of contention. However perhaps that's because I'm picturing
> an LRU linked list. Perhaps the right thing is to maintain a pool of
> buffers in some less contention-prone data structure which lets each
> backend pick buffers out more or less independently of the others.

I think the original vision of the clock sweep algorithm included the
idea that different backends could be running the sweep over different
parts of the buffer ring concurrently.  If we could get rid of the need
to serialize that activity, it'd pretty much eliminate the bottleneck
I should think.  The problem is how to manage it to ensure that (a)
backends aren't actually contending on the same buffers as they do this,
and (b) there's a reasonably fair rate of usage_count decrements for
each buffer, rather than possibly everybody ganging up on the same area
sometimes.  Thoughts?

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (82+ messages)  latest in thread

Message-ID: <29209.1365036099@sss.pgh.pa.us>
Permalink:  ../29209.1365036099@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29209.1365036099@sss.pgh.pa.us

 · 

reply

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, stark@mit.edu, robertmhaas@gmail.com, andres@2ndquadrant.com, mmoncure@gmail.com, jim@nasby.net, jeff.janes@gmail.com, ants@cybertec.at, atri.jiit@gmail.com, amit.kapila@huawei.com
  Subject: Re: Page replacement algorithm in buffer cache
  In-Reply-To: <29209.1365036099@sss.pgh.pa.us>

* 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