Re: Scaling shared buffer eviction

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Scaling shared buffer eviction
Date: 2014-10-28 04:14:52
Message-ID: CAA4eK1L5GbqbYS82EUi_+bBzxFZgKfEFtf=UoTgLLYKH8WRdcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 14, 2014 at 3:24 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
wrote:
> On Thu, Oct 9, 2014 at 6:17 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
wrote:
> > On Fri, Sep 26, 2014 at 7:04 PM, Robert Haas <robertmhaas(at)gmail(dot)com>
wrote:
> > >
> > > On another point, I think it would be a good idea to rebase the
> > > bgreclaimer patch over what I committed, so that we have a
> > > clean patch against master to test with.
> >
> > Please find the rebased patch attached with this mail. I have taken
> > some performance data as well and done some analysis based on
> > the same.
> >
> >
> >
>
> To reduce above contention, I tried to write a patch to replace spin lock
> used in dynahash to manage free list by atomic operations. Still there
> is work pending for this patch with respect to ensuring whether the
> approach used in patch is completely sane, however I am posting the
> patch so that others can have a look at it and give me feedback about
> the approach.

After further working on this patch (replacement of spinlock in dynahash),
I found that I need to solve A-B-A problem for lockless structure as
described in section 5.1 of paper [1]. I could have further pursued to
solve
it by using some additional variables as described in section 5 of paper
[1],
but it seems to me that Robert has already solved it by using some other
technique as proposed by him in patch [2], so it would be waste of effort
for me to pursue on this problem. So I am not planning to continue on this
patch and marking it as Rejected in CF app.

[1]
http://www.liblfds.org/mediawiki/images/1/1d/Valois_-_Lock-Free_Linked_Lists_Using_Compare-and-Swap.pdf
[2] https://commitfest.postgresql.org/action/patch_view?id=1613

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2014-10-28 04:46:26 Re: TAP test breakage on MacOS X
Previous Message Dilip kumar 2014-10-28 03:57:44 Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]