Skip to content

How can I view CPU and memory usage for my Aurora MySQL-Compatible DB cluster?

4 minute read
0

I want to view the CPU and memory usage for my Amazon Aurora MySQL-Compatible Edition DB cluster.

Resolution

Use CloudWatch Database Insights

Important: Performance Insights will reach its end of life on June 30, 2026. You can upgrade to the Advanced mode of Database insights before June 30, 2026. If you don't upgrade, then DB clusters that use Performance Insights will default to the Standard mode of Database Insights. Only the Advanced mode of Database Insights will support execution plans and on-demand analysis. If your clusters default to the Standard mode, then you might not be able to use these features on the console. To turn on the Advanced mode, see Turning on the Advanced mode of Database Insights for Amazon RDS and Turning on the Advanced mode of Database Insights for Amazon Aurora.

Amazon CloudWatch Database Insights provides built-in metrics and counters to monitor CPU and memory usage for your Aurora MySQL DB cluster. You can access these metrics in Database Insights Standard mode.

To view these metrics, complete the following steps:

  1. Open the Amazon CloudWatch console.
  2. In the navigation pane, choose Database Insights.
  3. Choose the Database Instance database view, and then choose your DB Instance.
  4. Under the Database Telemetry section, choose Metrics.

By default, Database Insights provides predefined widgets based on common objectives, such as I/O operations or network throughput.

You can also create your own custom widgets to view CloudWatch metrics related to CPU and memory usage, including the following examples:

  • Use CPUUtilization for reports on the percentage of CPU utilization.
  • Use FreeableMemory for the amount of available RAM in bytes.

Note: For Aurora Serverless v2, the calculation logic for CPUUtilization and FreeableMemory differs from provisioned instance classes. For more information, see Important Amazon CloudWatch metrics for Aurora Serverless v2.

You can add Performance Insights counter metrics to your custom widgets. You can also navigate to the OS Process tab to view the CPU and memory usage at the individual process level. For more information, see Viewing OS metrics in the RDS console.

To view these metrics, turn on Enhanced Monitoring for your DB cluster. For more information, see Setting up and turning on Enhanced Monitoring.

Use Performance Schema

If you turned on Performance Schema for your Aurora MySQL DB cluster, then you can query memory summary tables to check what MySQL component consumes your memory.

Example components:

  • Use memory_summary_global_by_event_name for memory usage by event type.
  • Use memory_summary_by_account_by_event_name for memory usage per user and event type.
  • Use memory_summary_by_host_by_event_name for memory usage per host and event type.
  • Use memory_summary_by_thread_by_event_name for memory usage per thread and event type.
  • Use memory_summary_by_user_by_event_name for memory usage per user and event type.

To activate memory instrumentation, set the ENABLED column of the instrument to YES in the setup_instruments table:

UPDATE performance_schema.setup_instruments SET ENABLED = 'YES' WHERE NAME LIKE 'memory/';

To monitor the allocated memory by the MySQL each thread, run following query to check:

mysql > SELECT * FROM sys.memory_by_thread_by_current_bytes;

These tables are helpful to troubleshoot when your Aurora MySQL DB Instance shows low FreeableMemory.

Note: Performance Insights provides additional counters that the database engine generates. To turn on Performance Insights, see Turning Performance Insights on and off for Aurora.

Related information

Monitoring metrics in an Amazon Aurora cluster

Viewing the Database Instance Dashboard for CloudWatch Database Insights

Increase Visibility of performance and events on Amazon RDS and Amazon Aurora

Monitor real-time Amazon RDS OS metrics with flexible granularity using Enhanced Monitoring

Setting up and turning on Enhanced MonitoringJune 30, 2026

AWS OFFICIALUpdated 5 months ago