Re: Separating Buffer LWlocks - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Separating Buffer LWlocks
Date
Msg-id 20150906132840.GC19425@alap3.anarazel.de
Whole thread Raw
In response to Separating Buffer LWlocks  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Separating Buffer LWlocks  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi,

On 2015-09-06 14:10:24 +0100, Simon Riggs wrote:
> It separates the Buffer LWLocks from the main LW locks, allowing them to
> have different padding.
> 
> Tests showed noticeable/significant performance gain due to reduced false
> sharing on main LWlocks, though without wasting memory on the buffer
> LWlocks.

Hm. I found that the buffer content lwlocks can actually also be a
significant source of contention - I'm not sure reducing padding for
those is going to be particularly nice. I think we should rather move
the *content* lock inline into the buffer descriptor. The io lock
doesn't matter and can be as small as possible.

Additionally I think we should increase the lwlock padding to 64byte
(i.e. the by far most command cacheline size). In the past I've seen
that to be rather beneficial.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: replication slot restart_lsn initialization
Next
From: Julien Rouhaud
Date:
Subject: Re: Allow a per-tablespace effective_io_concurrency setting