Databases 8 min read

Why Average Active Sessions (AAS) Outperforms CPU Utilization in AWS RDS Monitoring

The article explains the Average Active Sessions (AAS) metric in AWS Performance Insights, using a supermarket checkout analogy to show how AAS reveals true database load, its relationship to Max vCPU, and why it provides clearer bottleneck insight than simple CPU utilization.

Ops Development & AI Practice
Ops Development & AI Practice
Ops Development & AI Practice
Why Average Active Sessions (AAS) Outperforms CPU Utilization in AWS RDS Monitoring

In a previous post we explored how AWS Performance Insights can identify the users consuming the most CPU. Readers often ask what the "Average Active Sessions (AAS)" chart actually represents and why it matters more than traditional CPU utilization or IOPS metrics.

Supermarket checkout analogy

Imagine a supermarket where the database is the checkout area and each vCPU core corresponds to an open checkout lane. If the store has 4 vCPUs, it has 4 checkout lanes.

Database connections (Connections) : All customers entering the store. Some are merely browsing ( Sleep state), others are queuing to pay.

Active sessions (Active Sessions) : Customers who have moved from browsing to the checkout queue or are currently paying. Once a customer reaches the checkout area, they become an "active session".

Average Active Sessions (AAS) : The average number of customers in the checkout queue or paying over a time window (e.g., one minute). If the average queue length is 10, AAS equals 10.

When the manager sees an AAS of 10 but only 4 checkout lanes, it clearly indicates a severe bottleneck: the queue length far exceeds service capacity.

Technical definition of AAS

AAS (Average Active Sessions) is the average number of database sessions (connections) that are in an "active" state during a specified time range.

A session is considered active if it is not idle ( IDLE) or sleeping ( Sleep). Active sessions may be:

Using CPU : Performing calculations, sorting, or processing data. In Performance Insights this appears as the green portion of the chart.

Waiting for resources : The session wants to work but is blocked, such as:

Waiting for I/O : Awaiting disk reads/writes (blue portion).

Waiting for locks : Waiting for other sessions to release table or row locks (red/pink portion).

Waiting for other internal resources.

In the Performance Insights graph, the curve labeled "Database Load (DB Load)" represents the AAS value.

AAS vs. Max vCPU line

Performance Insights also shows a dashed line called "Max vCPU", which indicates the total number of CPU cores allocated to the database instance – the "compute ceiling" analogous to the number of checkout lanes.

If the DB Load (AAS) curve stays well below the Max vCPU line, the database is healthy, similar to a store with only a few customers and plenty of checkout lanes.

If the DB Load (AAS) curve consistently exceeds the Max vCPU line, an alert signals a performance bottleneck: more sessions are waiting for CPU than the CPUs can handle.

Concrete examples

Assume an RDS instance db.m5.xlarge with 4 vCPUs, so the Max vCPU line sits at y=4.

AAS = 2, mostly green (CPU). About two sessions are consuming CPU, roughly 50% CPU utilization – healthy.

AAS spikes to 10, with 80% green. Eight sessions are competing for four CPUs, driving CPU to 100% and causing query latency.

AAS = 10 but dominated by blue (I/O wait). CPU isn’t the bottleneck; the workload is stalled on disk I/O, so optimization should target storage rather than CPU.

Why AAS is a better indicator than CPU utilization

Traditional CPU utilization is a result metric: it tells you the CPU is busy but not why or how severe the contention is.

AAS is a demand metric: it quantifies the load (height of the curve) and, through color‑coded wait events, reveals the composition of that load (why it’s slow). By comparing demand (AAS) with supply (Max vCPU), you can instantly spot whether the bottleneck is CPU, I/O, locks, or other resources.

Key takeaways

AAS = Database load : Measures how many sessions are queuing or working.

AAS vs. Max vCPU : Directly compares demand to available CPU cores, the simplest way to detect CPU bottlenecks.

Color breakdown = bottleneck cause : The proportion of green, blue, red, etc., tells you whether the issue is CPU, I/O, locks, or other waits, guiding effective optimization.

Next time your database feels sluggish, don’t just stare at CPU utilization. Open Performance Insights, examine the AAS curve, and gain a deeper, more actionable understanding of the problem.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

AWScloudRDSDatabase MonitoringAASPerformance Insights
Ops Development & AI Practice
Written by

Ops Development & AI Practice

DevSecOps engineer sharing experiences and insights on AI, Web3, and Claude code development. Aims to help solve technical challenges, improve development efficiency, and grow through community interaction. Feel free to comment and discuss.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.