Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-04-21 Thread Robert Haas
On Mon, Apr 11, 2016 at 7:31 AM, Andres Freund wrote: > In the patch attached to > http://www.postgresql.org/message-id/20160411051004.yvniqb2pkc7re...@alap3.anarazel.de > I did this instead by fixing up the actual shared memory allocation, > which seems a tiny bit cleaner.

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-04-11 Thread Andres Freund
Hi, On 2016-04-11 07:09:18 -0400, Robert Haas wrote: > Attached patch does that. Thanks. > > Additionally, doesn't this obsolete > > > > /* > > * Preferred alignment for disk I/O buffers. On some CPUs, copies between > > * user space and kernel space are significantly faster if the user

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-04-11 Thread Robert Haas
On Mon, Apr 11, 2016 at 12:01 AM, Andres Freund wrote: >> InitBufferPool() manually fixes up alignment; that should probably be >> removed now. Attached patch does that. >> I also wonder if it doesn't make sense to fix PG_CACHE_LINE_SIZE to >> 64byte on x86. I personally

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-04-10 Thread Andres Freund
On 2016-04-10 16:08:56 -0700, Andres Freund wrote: > On 2016-04-05 15:48:22 -0400, Robert Haas wrote: > > On Fri, Mar 25, 2016 at 12:47 PM, Tom Lane wrote: > > > Robert Haas writes: > > >> On Fri, Mar 25, 2016 at 9:48 AM, Tom Lane

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-04-10 Thread Andres Freund
On 2016-04-05 15:48:22 -0400, Robert Haas wrote: > On Fri, Mar 25, 2016 at 12:47 PM, Tom Lane wrote: > > Robert Haas writes: > >> On Fri, Mar 25, 2016 at 9:48 AM, Tom Lane wrote: > >>> Robert Haas writes: >

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-04-05 Thread Robert Haas
On Fri, Mar 25, 2016 at 12:47 PM, Tom Lane wrote: > Robert Haas writes: >> On Fri, Mar 25, 2016 at 9:48 AM, Tom Lane wrote: >>> Robert Haas writes: It's stupid that we keep spending time and energy

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-03-25 Thread Tom Lane
Robert Haas writes: > On Fri, Mar 25, 2016 at 9:48 AM, Tom Lane wrote: >> Robert Haas writes: >>> It's stupid that we keep spending time and energy figuring out which >>> shared memory data structures require alignment and which

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-03-25 Thread Robert Haas
On Fri, Mar 25, 2016 at 9:48 AM, Tom Lane wrote: > Robert Haas writes: >> It's stupid that we keep spending time and energy figuring out which >> shared memory data structures require alignment and which ones don't. >> Let's just align them *all* and be

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-03-25 Thread Andres Freund
On March 25, 2016 2:48:00 PM GMT+01:00, Robert Haas wrote: >On Fri, Mar 25, 2016 at 9:11 AM, Andres Freund >wrote: >> On March 25, 2016 1:04:13 PM GMT+01:00, Robert Haas > wrote: >>>On Fri, Mar 25, 2016 at 3:05 AM, Andres

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-03-25 Thread Tom Lane
Robert Haas writes: > It's stupid that we keep spending time and energy figuring out which > shared memory data structures require alignment and which ones don't. > Let's just align them *all* and be done with it. The memory cost > shouldn't be more than a few kB. I think

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-03-25 Thread Robert Haas
On Fri, Mar 25, 2016 at 9:11 AM, Andres Freund wrote: > On March 25, 2016 1:04:13 PM GMT+01:00, Robert Haas > wrote: >>On Fri, Mar 25, 2016 at 3:05 AM, Andres Freund >>wrote: >>> On 2015-11-12 19:59:54 +, Robert Haas wrote:

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-03-25 Thread Andres Freund
On March 25, 2016 1:04:13 PM GMT+01:00, Robert Haas wrote: >On Fri, Mar 25, 2016 at 3:05 AM, Andres Freund >wrote: >> On 2015-11-12 19:59:54 +, Robert Haas wrote: >>> Move each SLRU's lwlocks to a separate tranche. >>> >>> This makes it

Re: [HACKERS] [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.

2016-03-25 Thread Robert Haas
On Fri, Mar 25, 2016 at 3:05 AM, Andres Freund wrote: > On 2015-11-12 19:59:54 +, Robert Haas wrote: >> Move each SLRU's lwlocks to a separate tranche. >> >> This makes it significantly easier to identify these lwlocks in >> LWLOCK_STATS or Trace_lwlocks output. It's also