Re: AWS RDS "sessions" and pg_stat_activity

From: kyle Hailey <kylelf(at)gmail(dot)com>
To: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: AWS RDS "sessions" and pg_stat_activity
Date: 2023-06-21 20:22:43
Message-ID: CADsdiQj7_7t0OP_9Ye3kj0BNw0ahfGtskzs=5gf==n9yF4_BLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Didn't click your link so missed you were talking about my blog post.

I appreciate your interest in my blog post about Active Sessions, a topic
I've devoted two decades to exploring. I rarely document my thoughts, but I
recently put together the following post in a single evening. I acknowledge
it could benefit from further refinement, so your feedback would be
invaluable. If there are any aspects you believe need more elaboration or
clarity, please don't hesitate to let me know.

A Comprehensive Guide to Understanding the AAS Metric in Databases

https://www.kylehailey.com/post/setting-the-record-straight-a-comprehensive-guide-to-understanding-the-aas-metric-in-databases

<https://www.kylehailey.com/post/setting-the-record-straight-a-comprehensive-guide-to-understanding-the-aas-metric-in-databases>

*AAS is defined as the average number of concurrent active sessions in an
> database. To picture this, imagine each 'session' as an individual user
> process performing a specific task or executing a SQL query. The word
> 'active' is key here as it specifically refers to sessions that are doing
> something, not just connected to the database. When we say AAS, we are
> referring to the average number of these active sessions in a given time
> window.*

<https://www.kylehailey.com/post/setting-the-record-straight-a-comprehensive-guide-to-understanding-the-aas-metric-in-databases>

On Wed, Jun 21, 2023 at 1:14 PM kyle Hailey <kylelf(at)gmail(dot)com> wrote:

>
> session - connection to database
> active session - session that has an SQL currently running
>
> On Wed, Jun 21, 2023 at 9:33 AM Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
> wrote:
>
>> Their use of "sessions" is everywhere. AAS (average active session count)
>> and all over the insights, including the activity bar. I'm just trying to
>> map those back to exact things I can query myself from pg_stat_activity.
>>
>> Little bit on it here
>> https://aws.amazon.com/blogs/database/analyzing-amazon-rds-database-workload-with-performance-insights/
>>
>> On Wed, Jun 21, 2023 at 9:29 AM Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
>>
>>> On Wed, Jun 21, 2023 at 12:06 PM Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
>>> wrote:
>>>
>>>> Just trying to get my head firmly around the RDS session number and
>>>> associated performance/saturation. It says a session is any request waiting
>>>> on a response from the server, so I am wondering if that's equivalent to
>>>> selecting all from pg_stat_activity where state is active, and this would
>>>> include all concurrent parallel workers, maintenance stuff, etc.
>>>>
>>>
>>> If you are referring to something in the RDS documentation or
>>> monitoring, could you provide a link to it, or an excerpt of it?
>>>
>>> Cheers,
>>>
>>> Jeff
>>>
>>>>
>>
>> --
>> Wells Oliver
>> wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>
>>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff Janes 2023-06-21 20:54:51 Re: Poor performance due to parallel seq scan on indexed date field
Previous Message kyle Hailey 2023-06-21 20:14:41 Re: AWS RDS "sessions" and pg_stat_activity