Re: Commit Latency

From: ravi k <ravisql09(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Ramakrishna m <ram(dot)pgdb(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Commit Latency
Date: 2025-02-07 13:00:10
Message-ID: CAFL4M8FrJqr_VZ4pMu-xNTYA_sg8W=vvrq_d-45zd9nWH7wX1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks for the suggestions!

It looks the issue is happening at the time of wal creation, does
wal_init_zero off is good option?

Best

On Wed, 5 Feb, 2025, 9:07 pm Álvaro Herrera, <alvherre(at)alvh(dot)no-ip(dot)org>
wrote:

> Hello
>
> On 2025-Feb-05, Ramakrishna m wrote:
>
> > I have a system handling *300 TPS*, with resource usage *below 10%*.
> > However, I’m noticing *commit latency of around 200ms* for *1% of
> > transactions*, occasionally spiking to *1 second*. Since there is no
> > significant *I/O pressure*, I’m trying to identify what else might be
> > causing this in *PostgreSQL 16*.
>
> max_connections=8000 doesn't sound great -- how many of those are
> active, typically, and how many are idle-in-transaction? And you have
> autovacuum_naptime=5s ... which sounds rather dubious. Either somebody
> with great expertise configured this very carefully, or the settings are
> somewhat randomly chosen with little or no expert oversight. Do you
> have monitoring on the amount of bloat on these database? Maybe you
> should consider connection pooling and limit the number that are active,
> for starters.
>
> Maybe have a look at whether pg_wait_sampling can give you more clues.
> Some basic bloat monitoring is a prerequisite to any further performance
> tweaking anyhow.
>
> --
> Álvaro Herrera Breisgau, Deutschland —
> https://www.EnterpriseDB.com/
> Maybe there's lots of data loss but the records of data loss are also lost.
> (Lincoln Yeoh)
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Verite 2025-02-07 13:29:05 Re: libc to libicu via pg_dump/pg_restore?
Previous Message Thiemo Kellner 2025-02-07 11:07:56 Re: Lookup tables