Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Enabling Performance Insights

To use Performance Insights, you must enable it on your DB instance.

AWS Management Console

You can use the console to enable Performance Insights when you create a new DB instance. You can also modify a DB instance to enable Performance Insights.

Enabling Performance Insights with the Console When Creating a DB Instance

When you create a new DB instance, Performance Insights is enabled when you choose Enable Performance Insights in the Performance Insights section.

To create a DB instance, follow the instructions for your DB engine in Creating an Amazon RDS DB Instance.

The following image shows the Performance Insights section.


							Enable Performance Insights during DB instance creation with console

You have the following options when you choose Enable Performance Insights:

  • Retention – The amount of time to retain Performance Insights data. Choose either 7 days (the default) or 2 years.

  • Master key – Specify your AWS Key Management Service (AWS KMS) key. Performance Insights encrypts all potentially sensitive data using your AWS KMS key. Data is encrypted in flight and at rest. For more information, see Encrypting Amazon RDS Resources.

Enabling Performance Insights with the Console When Modifying a DB Instance

You can modify a DB instance to enable Performance Insights using the console.

To enable Performance Insights for a DB instance using the console

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. Choose Databases.

  3. Choose the DB instance that you want to modify, and choose Modify.

  4. In the Performance Insights section, choose Enable Performance Insights.

    You have the following options when you choose Enable Performance Insights:

    • Retention – The amount of time to retain Performance Insights data. Choose either 7 days (the default) or 2 years.

    • Master key – Specify your AWS Key Management Service (AWS KMS) key. Performance Insights encrypts all potentially sensitive data using your AWS KMS key. Data is encrypted in flight and at rest. For more information, see Encrypting Amazon RDS Resources.

  5. Choose Continue.

  6. For Scheduling of Modifications, choose one of the following:

    • Apply during the next scheduled maintenance window – Wait to apply the Performance Insights modification until the next maintenance window.

    • Apply immediately – Apply the Performance Insights modification as soon as possible.

  7. Choose Modify instance.

CLI

When you create a new DB instance using the create-db-instance AWS CLI command, Performance Insights is enabled when you specify --enable-performance-insights.

You can also specify the --enable-performance-insights value using the following AWS CLI commands:

The following procedure describes how to enable Performance Insights for a DB instance using the AWS CLI.

To enable Performance Insights for a DB instance using the AWS CLI

  • Call the modify-db-instance AWS CLI command and supply the following values:

    • --db-instance-identifier – The name of the DB instance.

    • --enable-performance-insights

    The following example enables Performance Insights for sample-db-instance.

    For Linux, OS X, or Unix:

    aws rds modify-db-instance \ --db-instance-identifier sample-db-instance \ --enable-performance-insights

    For Windows:

    aws rds modify-db-instance ^ --db-instance-identifier sample-db-instance ^ --enable-performance-insights

When you enable Performance Insights, you can optionally specify the amount of time, in days, to retain Performance Insights data with the --performance-insights-retention-period option. Valid values are 7 (the default) or 731 (2 years).

The following example enables Performance Insights for sample-db-instance and specifies that Performance Insights data is retained for two years.

For Linux, OS X, or Unix:

aws rds modify-db-instance \ --db-instance-identifier sample-db-instance \ --enable-performance-insights \ --performance-insights-retention-period 731

For Windows:

aws rds modify-db-instance ^ --db-instance-identifier sample-db-instance ^ --enable-performance-insights ^ --performance-insights-retention-period 731
API

When you create a new DB instance using the CreateDBInstance action Amazon RDS API action, the Performance Schema is enabled when you set EnablePerformanceInsights to True.

You can also specify the EnablePerformanceInsights value using the following API actions:

When you enable Performance Insights, you can optionally specify the amount of time, in days, to retain Performance Insights data with the PerformanceInsightsRetentionPeriod parameter. Valid values are 7 (the default) or 731 (2 years).

Enabling Performance Insights for Amazon RDS MySQL

For Amazon RDS MySQL, Performance Insights provides more detailed information when the Performance Schema feature of MySQL is enabled. The Performance Schema is enabled automatically when you create an Amazon RDS MySQL DB instance with Performance Insights enabled. When you create the DB instance with Performance Insights enabled, the following subset of Performance Schema parameters is set to the specified values automatically:

  • performance_schema=1

  • performance-schema-consumer-events-waits-current=ON

  • performance-schema-instrument='wait/%=ON'

  • performance-schema-consumer-global-instrumentation=ON

  • performance-schema-consumer-thread-instrumentation=ON

Performance Schema is enabled automatically only if your parameter group doesn't have an explicitly set value for the performance_schema parameter. You can examine the performance_schema parameter, and if the value of source is user, then you set a value. If you want the Performance Schema parameters to be set automatically, then unset the value for the performance_schema parameter. You can view the source of a parameter value by viewing the parameter in the AWS Management Console or by running the AWS CLI describe-db-parameters command.

When you change the value of the performance_schema parameter, a DB instance reboot is required. If you're creating a new DB instance with Performance Insights enabled, the performance_schema parameter is set to 1 (enabled) by default.

Without the Performance Schema enabled, Performance Insights displays database load broken down by the list state of the MySQL process. With Performance Schema enabled, Performance Insights displays database load broken down by detailed wait events.

For more information, see Using the Performance Insights Dashboard.