Skip to main content

Use Case for AWS RDS DB CPU Utilization

  1. Configure AWS RDS DB CPU Utilization
  2. Use Case for AWS RDS DB CPU Utilization
  3. Triage Guides by Violation Type
    1. Triage AWS RDS DB CPU Utilization HIGH_CPU_UTILIZATION
    2. Triage AWS RDS DB CPU Utilization LOW_CPU_UTILIZATION

AWS RDS DB CPU Utilization Policy

Why Use this Policy?

This policy helps you monitor the CPU utilization of your AWS RDS DB instances. By identifying instances with low or high CPU usage, you can optimize resource allocation, reduce costs, and maintain system reliability.

Pros and Cons

Pros:

  • Identifies under-utilized databases that may be over-provisioned and costing more than necessary.
  • Highlights over-utilized databases that may require resizing to improve performance.
  • Supports cost optimization and reliability improvements.

Cons:

  • Requires manual intervention to resize or reconfigure databases based on the observations.
  • Not suitable for applications with highly variable CPU usage patterns that might not fit well within static thresholds.

How the Policy Works

The policy observes the average CPU utilization of a specified RDS DB instance over the past 30 days. It collects data from AWS CloudWatch and calculates the average maximum CPU utilization over this period.

Variables:

  • rds_db_instance_avg_cpu_utilization_high: The average CPU utilization required for DB instances to be considered frequently used. Default is 50.
  • rds_db_instance_avg_cpu_utilization_low: The average CPU utilization required for DB instances to be considered infrequently used. Default is 25.

Violation Types

  • HIGH_CPU_UTILIZATION: When the observed average CPU utilization exceeds the high threshold.
  • LOW_CPU_UTILIZATION: When the observed average CPU utilization falls below the low threshold.

Implementation

The policy consists of two parts:

  1. Policy Function: Gathers data from AWS CloudWatch, calculates the needed metrics, and formats the observance.
  2. Policy Expression: Evaluates the observance against the provided thresholds, and generates the appropriate violations.