Re: Postgresql - Pgbouncer Connection and Query Performance Problem - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Postgresql - Pgbouncer Connection and Query Performance Problem
Date
Msg-id bf84d8ea3086056bcd19aa6fa04d9d894c7f8102.camel@cybertec.at
Whole thread Raw
In response to Re: Postgresql - Pgbouncer Connection and Query Performance Problem  (Abdullah Ergin <abdullaherginwork@gmail.com>)
Responses Re: Postgresql - Pgbouncer Connection and Query Performance Problem  (Samed YILDIRIM <samed@reddoc.net>)
List pgsql-admin
On Tue, 2024-04-02 at 17:04 +0300, Abdullah Ergin wrote:
> [large connection pool size]
> Thank you for the information. What would you recommend as the value
> for this parameter? Would 100 be too large of a number? Or maybe 50?

That depends entirely on your hardware and the database workload.
Perhaps reading this article can help you:
https://www.cybertec-postgresql.com/en/estimating-connection-pool-size-with-postgresql-database-statistics/

> Additionally, before lowering these parameters, I had a lot of "LWLocks"
> in my database. Normally, I know that these lightweight locks don't cause
> significant issues, but during the slowdown, I was consistently seeing
> 70-80 LWLocks. After lowering the parameters and restarting pooling,
> these locks disappeared. Is there any correlation?

Very likely yes.
If you see many LWLocks, that will cause a significant performance issue.
Essentially, it is contention inside the database.

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: Dan Smith
Date:
Subject: Re: Deadlock
Next
From: jaya kumar
Date:
Subject: [MASSMAIL]About Autovacuum Query