pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Ashkil Dighin <ashkildighin76@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Lock contention high
Date: Wed, 13 Oct 2021 11:48:05 -0500
Message-ID: <20211013164805.GC27491@telsasoft.com> (raw)
In-Reply-To: <CAH6zzqCNtbCDSSFweuZp93R7TOxfEB8f75iosExb6sutyAa-Uw@mail.gmail.com>
References: <CAH6zzqCNtbCDSSFweuZp93R7TOxfEB8f75iosExb6sutyAa-Uw@mail.gmail.com>

On Tue, Oct 12, 2021 at 01:05:12PM +0530, Ashkil Dighin wrote:
> Hi,
> Lock contention observed high in PostgreSQLv13.3
> The source code compiled with GNC(GCCv11.x)
> PostgreSQL version: 13.3
> Operating system:   RHEL8.3
> Kernel name:4.18.0-305.10.2.el8_4.x86_64
> RAM Size:512GB
> SSD: 1TB
> The environment used IBM metal and test benchmark environment HammerDbv4.2
> Test case :TPC-C
> 
> Perf data for 24vu(TPC-C)
> --------------------------------
> 
>       18.99%  postgres  postgres            [.] LWLockAcquire
>      7.09%  postgres  postgres            [.] _bt_compare
>      8.66%  postgres  postgres            [.] LWLockRelease
...
> 1.Is there a way to tune the lock contention ?
> 2.Is any recommendations to tune/reduce the lock contention via postgres.conf

I think you'd want to find *which* LW locks are being waited on, to see if it's
something that can be easily tuned.

You can check pg_stat_activity, or maybe create a cronjob to record its content
for later analysis.

-- 
Justin





view thread (26+ messages)  latest in thread

Message-ID: <20211013164805.GC27491@telsasoft.com>
Permalink:  ../20211013164805.GC27491@telsasoft.com/
Also on:    postgresql.org/message-id/20211013164805.GC27491@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pryzby@telsasoft.com, ashkildighin76@gmail.com, pgsql-performance@lists.postgresql.org
  Subject: Re: Lock contention high
  In-Reply-To: <20211013164805.GC27491@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox