The diagnostics feature of ApsaraDB PolarDB MySQL-compatible edition integrates with Database Autonomy Service (DAS). On the Autonomy Center tab, you can enable the autonomy service. Then, if an exception occurs in a database, DAS automatically performs root cause analysis, gives suggestions, and then performs optimizations and fixes issues. Optimizations are allowed based on your authorization.


The service edition of your ApsaraDB PolarDB MySQL-compatible edition clusters is Cluster Edition or Archive Database. This feature is unavailable for Single Node. For more information about service editions, see Product editions.


Only the ApsaraDB PolarDB MySQL-compatible edition clusters whose product type is pay-as-you-go support automatic scale-out and automatic scale-in. Subscription clusters do not support automatic scale-out or automatic scale-in. For more information, see Purchase a pay-as-you-go cluster.


  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region where the cluster is deployed.
  3. On the Clusters page, find the cluster for which you want to enable the autonomy service, and click the cluster ID.
  4. In the left-side navigation pane, choose Diagnostics and Optimization > Diagnosis.
  5. On the page that appears, click the Autonomy Center tab.
    Autonomy Center
  6. In the upper-right corner, click Autonomy Service Settings.
    Autonomy Service Settings
  7. In the Set dialog box, click the Autonomy Service Settings tab and turn on Enable Autonomy.
    Note After you enable the autonomy service, capacity evaluation, session analytics, throttling SQL analytics, and snapshots upon exceptions are automatically performed. These features do not cause extra loads to the database.
    Enable Autonomy
  8. Specify the following parameters: Automatic Index Creation and Deletion, Automatic Throttling, Automatic Scale-up/out, and Automatic Scale-down/in.
    • Automatic Index Creation and Deletion: After you turn on Enable Autonomy, the SQL Diagnostics feature is automatically enabled. You can click Enable Automatic Index Creation to automatically create indexes and click Enable Automatic Index Deletion to automatically delete indexes.
    • Automatic Throttling: You can specify conditions to trigger automatic SQL throttling. If the specified conditions are met, automatic SQL throttling is triggered.
      Note For example, automatic throttling is triggered if the following conditions are met during the time period specified by the Current limiting period parameter (default value: 00:00 to 23:59): The CPU usage is greater than 70%, the number of active sessions is greater than 16, and the duration is at least 2 minutes. In this case, the system automatically starts to check whether the conditions are met again when the automatic throttling is triggered. If the issue is not fixed, the system automatically rolls back the throttling operation. After automatic throttling is triggered, the duration of the throttling operation does not exceed the time specified by the Maximum current limiting time parameter. For more information, see Automatic SQL throttling.
    • Automatic Scale-up/out and Automatic Scale-down/in: you can enable these features and customize conditions. Scale-in and scale-out are automatically triggered when the specified conditions are met.
      Parameter Description
      Auto Scaling-out Specify whether to enable the automatic scale-out feature.
      Observation Period During the observation period, if the CPU utilization is greater than or equal to the specified value, PolarDB automatically adds nodes or upgrades the specifications of your cluster. This ensures that the cluster can handle the read and write requests that the cluster received.
      CPU Usage The threshold based on which automatic scale-out is triggered. If the CPU Usage is greater than or equal to the specified value, automatic scale-out is triggered.
      Maximum Specification The upper limit of the specifications based on which you can upgrade your clusters. After automatic scale-out is triggered, the system gradually upgrades the specifications of your PolarDB cluster to the upper limit. For example, the specifications are upgraded from 4 cores to 8 cores and then to 16 cores.
      Maximum Number of Read-only Nodes The maximum number of read-only nodes that can be automatically added to the cluster. After automatic scale-out is triggered, the read-only nodes of the PolarDB cluster are added one by one until the upper limit is reached.
      Note The nodes that are automatically added are associated with the default endpoint of your cluster. If you use a custom endpoint, you must specify whether these nodes are automatically associated with the endpoint by using the Automatically Associate New Nodes parameter. For more information about Automatically Associate New Nodes, see Manage a cluster endpoint.
      Auto Scaling-in Specify whether to enable the automatic scale-in feature.
      Note After you turn on Auto Scale In, if the CPU usage is less than 30% for more than 99% of the observation period, automatic scale-in is triggered. The specifications of the PolarDB cluster are gradually scaled in to the original specifications.
      Quiescent Period The minimum interval between two automatic scale-in operations or two scale-out operations. During a quiescent period, PolarDB continuously tracks whether the conditions based on which automatic scale-out or scale-in are triggered are met. However, automatic scale-out or scale-in is not triggered. If a quiescent period and an observation period expire at the same time and the CPU utilization reaches the threshold within the observation period, PolarDB automatically triggers automatic scale-out when the two periods expire.
  9. Click OK.