Re: [HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

2017-06-08 Thread Jim Van Fleet
pgsql-hackers-ow...@postgresql.org wrote on 06/07/2017 04:06:57 PM: ... > > > > Did you intend to attach a patch? > Yes I do -- tomorrow or Thursday -- needs a little cleaning up ... meant Friday > > > > Sokolov Yura has a patch which, to me, looks good for pgbench rw > > > performance. Does

Re: [HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

2017-06-07 Thread Sokolov Yura
Good day Robert, Jim, and everyone. On 2017-06-08 00:06, Jim Van Fleet wrote: Robert Haas wrote on 06/07/2017 12:12:02 PM: > OK -- would love the feedback and any suggestions on how to mitigate the low > end problems. Did you intend to attach a patch? Yes I do --

Re: [HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

2017-06-07 Thread Jim Van Fleet
Robert Haas wrote on 06/07/2017 12:12:02 PM: > > OK -- would love the feedback and any suggestions on how to mitigate the low > > end problems. > > Did you intend to attach a patch? Yes I do -- tomorrow or Thursday -- needs a little cleaning up ... > > Sokolov Yura has

Re: [HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

2017-06-07 Thread Robert Haas
On Wed, Jun 7, 2017 at 12:29 PM, Jim Van Fleet wrote: >> The basic idea is clear from your description, but it will be better >> if you share the patch as well. It will not only help people to >> review and provide you feedback but also allow them to test and see if >> they

Re: [HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

2017-06-07 Thread Jim Van Fleet
Amit Kapila wrote on 06/07/2017 07:34:06 AM: ... > > The down side is that on smaller configurations (single socket) where there > > is less "lock thrashing" in the storage subsystem and there are multiple > > Lwlocks to take for an exclusive acquire, there is a

Re: [HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

2017-06-07 Thread Amit Kapila
On Tue, Jun 6, 2017 at 1:00 AM, Jim Van Fleet wrote: > Hi, > > I have been experimenting with splitting the ProcArrayLock into parts. > That is, to Acquire the ProcArrayLock in shared mode, it is only necessary > to acquire one of the parts in shared mode; to acquire the

Re: [HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

2017-06-06 Thread Jim Van Fleet
pro.ru> To: Jim Van Fleet <vanfl...@us.ibm.com> Cc: pgsql-hackers@postgresql.org Date: 06/05/2017 03:28 PM Subject: Re: [HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts Sent by:pgsql-hackers-ow...@postgresql.org Excuse me, Jim. I was tir

Re: [HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

2017-06-05 Thread Jim Van Fleet
NP, Sokolov -- pgsql-hackers-ow...@postgresql.org wrote on 06/05/2017 03:26:46 PM: > From: Sokolov Yura <y.soko...@postgrespro.ru> > To: Jim Van Fleet <vanfl...@us.ibm.com> > Cc: pgsql-hackers@postgresql.org > Date: 06/05/2017 03:28 PM > Subject: Re: [HACKE

Re: [HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

2017-06-05 Thread Sokolov Yura
Excuse me, Jim.I was tired and misunderstand proposal: I thought of ProcArray sharding, but proposal is about ProcArrayLock sharding.BTW, I just posted improvement to LWLock:https://www.postgresql.org/message-id/2968c0be065baab8865c4c95de3f435c%40postgrespro.ruWould you mind to test against that

Re: [HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

2017-06-05 Thread Sokolov Yura
Hi, Jim.How do you ensure of transaction order?Example:- you lock shard A and gather info. You find transaction T1 in-progress.- Then you unlock shard A.- T1 completes. T2, that depends on T1, also completes. But T2 was on shard B.- you lock shard B, and gather info from.- You didn't saw T2 as in

[HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

2017-06-05 Thread Jim Van Fleet
Hi, I have been experimenting with splitting the ProcArrayLock into parts. That is, to Acquire the ProcArrayLock in shared mode, it is only necessary to acquire one of the parts in shared mode; to acquire the lock in exclusive mode, all of the parts must be acquired in exclusive mode. For