Enabling and disabling Performance Insights - Amazon Relational Database Service

Enabling and disabling Performance Insights

To use Performance Insights, enable it on your DB instance. If needed, you can disable it later. Enabling and disabling Performance Insights doesn't cause downtime, a reboot, or a failover.

The Performance Insights agent consumes limited CPU and memory on the DB host. When the DB load is high, the agent limits the performance impact by collecting data less frequently.

In the console, you can enable or disable Performance Insights when you create or modify a new DB instance.

Enabling or disabling Performance Insights when creating an instance

When you create a new DB instance, enable Performance Insights by choosing Enable Performance Insights in the Performance Insights section. Or choose Disable Performance Insights.

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

The following screenshot shows the Performance Insights section.


							Enable Performance Insights during DB instance creation with
								console

If you choose Enable Performance Insights, you have the following options:

  • 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) customer master key (CMK). Performance Insights encrypts all potentially sensitive data using your AWS KMS CMK. Data is encrypted in flight and at rest. For more information, see Encrypting Amazon RDS resources.

Enabling or disabling Performance Insights when modifying an instance

In the console, you can modify a DB instance to enable or disable Performance Insights using the console.

To enable or disable 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 a DB instance, and choose Modify.

  4. In the Performance Insights section, choose either Enable Performance Insights or Disable Performance Insights.

    If you choose Enable Performance Insights, you have the following options:

    • 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) customer master key (CMK). Performance Insights encrypts all potentially sensitive data using your AWS KMS CMK. 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.

When you use the create-db-instance AWS CLI command, enable Performance Insights by specifying --enable-performance-insights. Or disable Performance Insights by specifying --no-enable-performance-insights.

You can also specify these values using the following AWS CLI commands:

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

To enable or disable 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 to enable or --no-enable-performance-insights to disable

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

    For Linux, macOS, 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, macOS, 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

When you create a new DB instance using the CreateDBInstance operation Amazon RDS API operation, enable Performance Insights by setting EnablePerformanceInsights to True. To disable Performance Insights, set EnablePerformanceInsights to False.

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

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 the Performance Schema for Performance Insights on Amazon RDS for MariaDB or MySQL

When the Performance Schema feature is enabled for Amazon RDS for MariaDB or MySQL, Performance Insights provides more detailed information. For example, Performance Insights displays DB load categorized by detailed wait events. Without the Performance Schema enabled, Performance Insights displays DB load categorized by the list state of the MySQL process.

Performance Schema is enabled automatically when you create an Amazon RDS for MariaDB or MySQL DB instance with Performance Insights enabled. In this case, Performance Insights automatically manages the parameters in the following table.

Parameter Name

Parameter Value

performance_schema 1 (the source parameter is set to engine-default)
performance-schema-consumer-events-waits-current ON
performance-schema-instrument wait/%=ON
performance-schema-consumer-global-instrumentation ON
performance-schema-consumer-thread-instrumentation ON
Important

When Performance Schema is enabled automatically, Performance Insights changes schema-related parameters on the DB instance. These changes aren't visible in the parameter group associated with the DB instance.

For more information, see Performance Schema Command Options and Performance Schema Option and Variable Reference in the MySQL documentation.

Enabling the Performance Schema manually

Performance Schema is not enabled when both the following conditions are true:

  • The performance_schema parameter is set to 0 or 1.

  • The performance_schema parameter source is set to user.

To enable the Performance Schema manually

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

  2. Choose Parameter groups.

  3. Select the parameter group for your DB instance.

  4. Select the performance_schema parameter.

  5. Select Edit parameters.

  6. Select Reset.

  7. Select Reset parameters.

  8. Restart the DB instance.

For more information about modifying instance parameters, see Modifying parameters in a DB parameter group. For more information about the dashboard, see Monitoring with the Performance Insights dashboard. For more information about the MySQL performance schema, see MySQL 8.0 Reference Manual.