public inbox for [email protected]  
help / color / mirror / Atom feed
From: Álvaro Herrera <[email protected]>
To: Ramakrishna m <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: Commit Latency
Date: Wed, 5 Feb 2025 16:37:50 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAG-eXHLT2Fgw_szi3KUd8a2AE7cgzBsdi3MaUaGb=TQ+w7oV4w@mail.gmail.com>

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)






view thread (7+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Commit Latency
  In-Reply-To: <[email protected]>

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

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