Re: Troubleshooting a brief spike in active sessions

From: Joshua Banton <bantonj(at)gmail(dot)com>
To: "Dirschel, Steve-CW" <Steve(dot)Dirschel(at)bestbuy(dot)com>
Cc: "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: Troubleshooting a brief spike in active sessions
Date: 2026-01-09 21:58:57
Message-ID: CAHkYM9bP5izAeh_JF1PqM6v4HVfQOgeEmCQF0i63oJFFwnUsdA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Jan 9, 2026 at 4:41 PM Dirschel, Steve-CW <
Steve(dot)Dirschel(at)bestbuy(dot)com> wrote:

> Aurora Postgres version 17.4
>
> This application mainly runs 3 queries very frequently- around 12000
> executions per second across the 3. Normally the server handles this fine
> and at any given time there are between 0 - 10 active sessions running the
> queries. The 3 queries are tuned- doing 3-7 logical reads per execute and
> run in < .1 millisecond.
>
> Periodically there will be a huge spike in active sessions up to 400+
> sessions all on CPU (it can be higher depending on how many app servers are
> in the mix at the time). This spike will last 2-5 seconds but it causes an
> increase in app response time which is a problem.
>

I'm not super familiar with Aurora, but I've seen this caused by a few
different things in vanilla Postgres. I don't think Aurora has checkpoints,
so it's probably not that. I have seen where a vacuum can cause various
Postgres buffers to have a lot of churn, which can cause higher query
latency for a period of time. I have also seen temporary increased disk
latency to cause higher query latency.

Josh B

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Nikolay Samokhvalov 2026-01-09 22:27:17 Re: Troubleshooting a brief spike in active sessions
Previous Message Dirschel, Steve-CW 2026-01-09 21:41:33 Troubleshooting a brief spike in active sessions