Re: our buffer replacement strategy is kind of lame

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: our buffer replacement strategy is kind of lame
Date: 2011-08-14 13:05:29
Message-ID: 20110814130529.GA22796@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 13, 2011 at 09:40:15PM +0100, Greg Stark wrote:
> On Sat, Aug 13, 2011 at 8:52 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> > and possibly we ought to put them all in a
> > linked list so that the next guy who needs a buffer can just pop one
>
> The whole point of the clock sweep algorithm is to approximate an LRU
> without needing to maintain a linked list. The problem with a linked
> list is that you need to serialize access to it so every time you
> reference a buffer you need to wait on a lock for the list so you can
> move that buffer around in the list.

Well, there are such things as lock-free linked lists. Whether they'd
help here is the question though.

http://www.cse.yorku.ca/~ruppert/papers/lfll.pdf

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> He who writes carelessly confesses thereby at the very outset that he does
> not attach much importance to his own thoughts.
-- Arthur Schopenhauer

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-08-14 14:35:49 Re: our buffer replacement strategy is kind of lame
Previous Message Robert Haas 2011-08-14 12:44:05 Re: our buffer replacement strategy is kind of lame