Re: Monitoring autovacuum induced contention

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Joseph Hammerman <joe(dot)hammerman(at)datadoghq(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Monitoring autovacuum induced contention
Date: 2023-12-07 03:16:40
Message-ID: 1797104bd3deefa7385f70aea665ac5c0a54e8ea.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, 2023-12-06 at 13:35 -0800, Joseph Hammerman wrote:
> We are working on tuning autovacuum correctly. While the biggest problem we have
> and most other OLTP deployments I have seen have is autovacuum resource starvation,
> I'd like to be able to reliably determine when we have turned autovacuum capacity
> dials too far.
>
> Is there any way to track autovacuum induced query waits?

Autovacuum won't directly block you, so you will never see a process waiting for
autovacuum. The exception to this rule is that statements that take high locks,
like CREATE INDEX or TRUNCATE, may be seen waiting for autovacuum to complete
occasionally. But that is probably not your problem.

Autovacuum will compete for system resources with your normal workload.
So you should monitor operating system resources like CPU or disk I/O, and if
any of these is at capacity while autovacuum is processing a table, you will
feel the impact.

Yours,
Laurenz Albe

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message arun chirappurath 2023-12-07 03:45:06 Fwd: Disable autocommit inside dbeaver
Previous Message Joseph Hammerman 2023-12-06 21:35:05 Monitoring autovacuum induced contention