Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1veKVk-00BxbS-0t for pgsql-performance@arkaria.postgresql.org; Fri, 09 Jan 2026 21:59:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1veKVi-008nWm-1O for pgsql-performance@arkaria.postgresql.org; Fri, 09 Jan 2026 21:59:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1veKVi-008nWe-0F for pgsql-performance@lists.postgresql.org; Fri, 09 Jan 2026 21:59:10 +0000 Received: from mail-yx1-xb12a.google.com ([2607:f8b0:4864:20::b12a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1veKVh-0058XL-1I for pgsql-performance@lists.postgresql.org; Fri, 09 Jan 2026 21:59:09 +0000 Received: by mail-yx1-xb12a.google.com with SMTP id 956f58d0204a3-6467b7c3853so3486129d50.0 for ; Fri, 09 Jan 2026 13:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767995948; x=1768600748; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PgZRaylB8uAIL5EsHsXMLngLXCyeQtYhX2LUgzYJlyg=; b=NuhX9bP8wOe81FYdddIWAhhEYJiLpg2Xp05+fspdeSTC6Ysmq+VnMAy8ZlNm+swwYp 5rG4YpTxkn5qvDanv0Vr1UsqxfNEO3viqOIeqBxcSUFR5CqicINWDNWKl+9eJC8vHCQd fHBh9wkuEEpDaW6djVaEwnL52KO0IoAdi+zRHYbGpCnKtrrn8106CRBldcmaez3606AJ dmcmqYDPEgxUJJeQcwXOI2Qs7jokoYOL8R+T4i3qwo46aceeRE2r6aZ6M8daYzscK8HM /50QxZyXz2QUrqiRGfAMBMIkEPz9gove3RgoOV54JZdhDgFaXy6MNxbAD7o9MC5O2Rcc uuXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767995948; x=1768600748; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=PgZRaylB8uAIL5EsHsXMLngLXCyeQtYhX2LUgzYJlyg=; b=O+D/+Qj7UOxw0UM+Eb/AfjoM+thwPDS6mBOhN/JuxVq1V+TFEDyzzLhsOXXHL28eQ0 MMW8yfs6zR/Lu1DhUvNaUVWbpB2ynZr6R51x2jkKLQ+wFzM11nQCfyu61s80HB42MXTS WYQXN1WRHMuubCAf5ajguHmGTm4vMPmZLfpTRdaTCijLBtGMQ7ZXBAVAH50A725L0e4o JgHvYEfOFosGfDz4HsSjUcZtbrjzxMLHLVBHak+nSV+o1B8cMeyrI5rE5D5kybBu1qPs Kf1eS/7T+0NH3nMHVV7p3mjog32kVxB7ZXhlTGXfPv55fYO8vEwqrAekgOk3uW0PkWCT T66A== X-Gm-Message-State: AOJu0YyeeybwG09oeP0aT0hCyC+sAifdDVcrXf20C5CiuRSal+7hMOCf j3AU9mne0hXGh8E/16OHB51Goo5AZiHEnHLxz2CKpGOtPXSrHEfJuuYMNY0va7OuLLfwHcU0CFm /1IB2XvPkdgL/OpEJDsqHRTp6PRqNUQ4= X-Gm-Gg: AY/fxX6roFhPCfkRoGFqUhk9HbXKVX8MhdNgUjYj0ZEb/IKFS75JO8ksas8Rn7Q7VdG y0fnGztep+nPCsi6zjVoOh7gttgjQkcCNEJ8J/JV4mPlPT1cTkM61Qu+8m+9S+7alUzCl4KXjg6 uyJZOia9HzR9W7SvoxGLmTkReTfAJYmk+JZka41MuQuoDYDA14JNbZbIx0sS//uY8CGEop8hEPL QrPgaQ+ISnxt4YasfTEEvp1NPMCB4SddPDW8klpQ4Ryb4df62kG5WoI+HM/r5/KK82v8MMrpC9V IhN8PQFStj+nZ8M4f3M/hZbYvHybmw== X-Google-Smtp-Source: AGHT+IH1OBlCNDi+fF7JQzxmv2zq8TFD+afHIlNhgxeqehfYYRzxU2cFCgH1n9nkBW4bsKa37My6PTCxkVYTar3T/g4= X-Received: by 2002:a05:690e:168c:b0:63f:ad6d:cbd5 with SMTP id 956f58d0204a3-64716c44c6emr8552523d50.60.1767995948242; Fri, 09 Jan 2026 13:59:08 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Joshua Banton Date: Fri, 9 Jan 2026 16:58:57 -0500 X-Gm-Features: AQt7F2qwUL6eA3zzs_ZgGoikDNQNQ22wi6aJqTOO0O6Je8NBr_iH-5PhAFiNSw8 Message-ID: Subject: Re: Troubleshooting a brief spike in active sessions To: "Dirschel, Steve-CW" Cc: "pgsql-performance@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000759cad0647fba20b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000759cad0647fba20b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jan 9, 2026 at 4:41=E2=80=AFPM 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 fin= e > and at any given time there are between 0 - 10 active sessions running th= e > queries. The 3 queries are tuned- doing 3-7 logical reads per execute a= nd > 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 a= re > 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 --000000000000759cad0647fba20b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Jan 9, = 2026 at 4:41=E2=80=AFPM Dirschel, Steve-CW <Steve.Dirschel@bestbuy.com> wrote:
Aurora Postgres version 17.4

This application mainly runs 3 queries very frequently- =C2=A0around 12000 = executions per second across the 3.=C2=A0 Normally the server handles this = fine and at any given time there are between 0 - 10 active sessions running= the queries.=C2=A0 The 3 queries are tuned- =C2=A0doing 3-7 logical reads per execute and run in < .1 millisecond.

Periodically there will be a huge spike in active sessions up to 400+ sessi= ons all on CPU (it can be higher depending on how many app servers are in t= he mix at the time).=C2=A0 This spike will last 2-5 seconds but it causes a= n increase in app response time which is a problem.=C2=A0=C2=A0
=C2=A0
I'm not super familiar with Aurora, but I've seen this ca= used by a few different things in vanilla Postgres. I don't think Auror= a has checkpoints, so it's probably not that. I have seen where a vacuu= m can cause various Postgres buffers to have a lot of churn, which can caus= e higher query latency for a period of time. I have also seen temporary inc= reased disk latency to cause higher query latency.

Josh B
--000000000000759cad0647fba20b--