Re: Move unused buffers to freelist

From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Simon Riggs'" <simon(at)2ndQuadrant(dot)com>
Cc: "'Robert Haas'" <robertmhaas(at)gmail(dot)com>, "'Andres Freund'" <andres(at)2ndquadrant(dot)com>, "'Greg Smith'" <greg(at)2ndquadrant(dot)com>, "'PostgreSQL-development'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Move unused buffers to freelist
Date: 2013-07-03 13:11:28
Message-ID: 004501ce77ee$d4e7dcd0$7eb79670$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, July 03, 2013 6:10 PM Simon Riggs wrote:
On 3 July 2013 12:56, Amit Kapila <amit(dot)kapila(at)huawei(dot)com> wrote:
 
>>>My perspectives here would be

>>> * BufFreelistLock is a huge issue. Finding a next victim block needs to
be
an O(1) operation, yet it is currently much worse than that. Measuring
>>> contention on that lock hides that problem, since having shared buffers
lock up for 100ms or more but only occasionally is a huge problem, even if
it
>>> doesn't occur frequently enough for the averaged contention to show as
an
issue.
 >> To optimize finding next victim buffer, I am planning to run the clock
>> sweep in background. Apart from that do you have any idea to make it
closer
>> to O(1)?

> Yes, I already posted patches to attentuate the search time. Please check
back last few CFs of 9.3

Okay, I got it. I think you mean 9.2.

Patch: Reduce locking on StrategySyncStart()
https://commitfest.postgresql.org/action/patch_view?id=743

Patch: Reduce freelist locking during DROP TABLE/DROP DATABASE
https://commitfest.postgresql.org/action/patch_view?id=744

I shall pay attention to patches and the discussion during my work on
enhancement of this patch.

With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2013-07-03 13:21:33 Re: [9.4 CF 1] The Commitfest Slacker List
Previous Message Robert Haas 2013-07-03 13:10:17 Re: Review: Patch to compute Max LSN of Data Pages