Re: Lockless StrategyGetBuffer() clock sweep

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Lockless StrategyGetBuffer() clock sweep
Date: 2014-10-30 11:31:04
Message-ID: 20141030113104.GA8151@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-10-30 10:23:56 +0530, Amit Kapila wrote:
> I have a feeling that this might also have some regression at higher
> loads (like scale_factor = 5000, shared_buffers = 8GB,
> client_count = 128, 256) for the similar reasons as bgreclaimer patch,
> means although both reduces contention around spin lock, however
> it moves contention somewhere else. I have yet to take data before
> concluding anything (I am just waiting for your other patch (wait free
> LW_SHARED) to be committed).

I have a hard time to see how this could be. In the uncontended case the
number of cachelines touched and the number of atomic operations is
exactly the same. In the contended case the new implementation does far
fewer atomic ops - and doesn't do spinning.

What's your theory?

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ronan Dunklau 2014-10-30 11:40:47 Re: foreign data wrapper option manipulation during Create foreign table time?
Previous Message Etsuro Fujita 2014-10-30 10:30:52 Re: PENDING_LIST_CLEANUP_SIZE - maximum size of GIN pending list Re: HEAD seems to generate larger WAL regarding GIN index