Re: Troubleshooting a brief spike in active sessions - Mailing list pgsql-performance

From Joshua Banton
Subject Re: Troubleshooting a brief spike in active sessions
Date
Msg-id CAHkYM9bP5izAeh_JF1PqM6v4HVfQOgeEmCQF0i63oJFFwnUsdA@mail.gmail.com
Whole thread Raw
In response to Troubleshooting a brief spike in active sessions  ("Dirschel, Steve-CW" <Steve.Dirschel@bestbuy.com>)
List pgsql-performance


On Fri, Jan 9, 2026 at 4:41 PM Dirschel, Steve-CW <Steve.Dirschel@bestbuy.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

pgsql-performance by date:

Previous
From: "Dirschel, Steve-CW"
Date:
Subject: Troubleshooting a brief spike in active sessions
Next
From: Nikolay Samokhvalov
Date:
Subject: Re: Troubleshooting a brief spike in active sessions