Re: Reducing ClogControlLock contention - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Reducing ClogControlLock contention
Date
Msg-id CAA4eK1+fD8v9YvqZnMkEvWggdRceRVdDyERN0GQ7Y==928pA-w@mail.gmail.com
Whole thread Raw
In response to Re: Reducing ClogControlLock contention  (Jesper Pedersen <jesper.pedersen@redhat.com>)
List pgsql-hackers
On Fri, Sep 18, 2015 at 11:31 PM, Jesper Pedersen <jesper.pedersen@redhat.com> wrote:
On 08/31/2015 07:34 AM, Amit Kapila wrote:
I have updated the patch (attached with mail) to show
you what I have in mind.


I havn't been able to get a successful run with _v5 using pgbench.


This patch is still not ready for performance test, as you might
have seen in comments that we are still discussing locking
issues.
 
TransactionIdSetStatusBit assumes an exclusive lock on CLogControlLock when called, but that part is removed from TransactionIdSetPageStatus now.

It doesn't seem to be a necessary condition, thats why in this patch
a smaller granularity lock is introduced.


I tried an

  if (!LWLockHeldByMe(CLogControlLock))
  {
      LWLockAcquire(CLogControlLock, LW_EXCLUSIVE);
      mode = LW_EXCLUSIVE;
  }

approach, but didn't get further.

I suspect the problem is something else.
 
Plus that probably isn't the best way, since we will traverse all LWLock's,

Yes, but it does in such a way that probably the caller will find it in
very few initial entries in the array.
 

Thank you very much for doing valuable performance tests with the
CLog patches.

With Regards,
Amit Kapila.

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Speed up Clog Access by increasing CLOG buffers
Next
From: Pavel Stehule
Date:
Subject: Re: [patch] Proposal for \rotate in psql