All Products
Search
Document Center

Database Autonomy Service:Automatic scaling for local resources

Last Updated:Mar 28, 2026

Database Autonomy Service (DAS) can automatically scale up the CPU cores of a PolarDB for MySQL instance when average CPU utilization crosses a threshold. Instead of changing the instance specification, DAS removes cgroup limits on the local host to release idle CPU capacity — the scale-up completes within seconds and causes no connection interruptions.

This feature is in the trial period and is free of charge.

When to use this feature

Automatic scaling for local resourcesAutomatic performance scaling
Best forShort-term CPU spikes on instances with idle host capacitySustained high load requiring more memory or connections in addition to CPU
Scalable resourcesCPU cores and IOPSCPU cores, IOPS, memory, and connections
Scale-up speedSeconds (minimum observation window: 30 seconds)Minutes (minimum observation window: 5 minutes)
Connection interruptionNone — no specification change occursBrief transient connections — specification change is required

If your instance sees intermittent, unpredictable CPU peaks and you want the fastest possible response with zero downtime, use automatic scaling for local resources. For sustained growth that also requires more memory or connections, use automatic performance scaling instead.

Important

After enabling automatic scaling for local resources, we recommend that you disable automatic performance scaling for the same instance because the two features conflict with each other. If automatic performance scaling triggers after automatic scaling for local resources, automatic scaling for local resources is invalidated. To disable automatic performance scaling, go to the instance details page, click Autonomy Service Settings > Autonomous Function Settings tab, and turn off Auto Storage Expansion.

Prerequisites

Before you begin, ensure that you have:

  • A PolarDB for MySQL Cluster Edition (general-purpose specification) or Multi-master Cluster (Database/Table) Edition (general-purpose specification) instance

    PolarDB for MySQL 8.0.2 does not support automatic scaling for local resources.
  • The AliyunServiceRoleForDAS role created for DAS

Usage notes

  • If the host does not have enough idle CPU resources, the scale-up does not occur.

  • After a scale-up, the instance may experience extreme scenarios such as failover, host resource exhaustion, or resource deallocation due to conflicts with existing control processes. Use this feature to measure peak CPU utilization in the short term, then upgrade the instance specification based on the measured peak for long-term stability.

Create a scaling policy

Choose one of the following methods.

Method 1: Auto Scaling Settings page

  1. Log on to the DAS console.

  2. In the left-side navigation pane, choose Resources > Auto Scaling Settings.

  3. In the Auto Scaling Policies section, click Add Policy.

  4. In the Add Policy panel, configure the parameters described in the following table, then click Next Step.

    ParameterDescription
    Policy NameA name for the policy.
    ModeSelect Automatic Scaling for Local Resources.
    Engine typeOnly PolarDB for MySQL is supported.
    SpecificationsThe specifications of the selected engine.
    Average CPU utilizationThe CPU utilization threshold (%) that triggers a scale-up. When the average CPU utilization of a node in the cluster reaches this value during the observation window, DAS scales up that node.
    Scale-up observation windowThe duration DAS monitors CPU utilization before triggering a scale-up. DAS samples CPU utilization at specific intervals. When the CPU utilization reaches the threshold, scale-up is triggered. Minimum: 30 seconds.
    CPU scale-up step sizeThe number of CPU cores added per scale-up. Must be an integer from 1 to 31. For example, a 4-core instance with a step size of 2 scales up to 6 cores. If utilization still meets the threshold after the first scale-up, DAS continues scaling up until the maximum is reached. Maximum cores = 4 x original core count, up to 32. For example, a 4-core instance can scale up to 16 cores at most.
    Scale-down observation windowThe duration DAS monitors CPU utilization before triggering a scale-down. If CPU utilization stays below 30% for 99% of the window, DAS decrements the core count by the CPU scale-up step size until the instance returns to its original specification.
  5. In the Apply Policies dialog box, select the target instances, click the xy icon, and then click Confirm. To apply the same policy to additional instances later, find the policy in the Auto Scaling Policies section and click Apply in the Actions column.

Method 2: Instance details page

  1. Log on to the DAS console.

  2. In the left-side navigation pane, choose Intelligent O&M Center > Instance Monitoring.

  3. Find the instance and click its ID to open the instance details page.

  4. In the upper-right corner, click Autonomy Service Settings.

  5. On the Autonomous Function Settings tab of the Autonomous Function Management panel, click the Auto Scaling tab.

  6. In the Applied Policies section, click Add Policy and configure the parameters. For parameter descriptions, see Method 1.

  7. In the Recommended Policies section, find the policy you created and click Apply in the Actions column.

  8. Click OK.

  9. In the Select Alert Template step, configure an alert template to receive notifications when scaling events occur.

    • If you already have an alert template for this instance, add alert rules for the required autonomy events as prompted.

    • If you do not have an alert template, follow the instructions in Configure alert templates and Configure alert rules.

  10. In the Select Alert Contact Group step, select an alert contact group. For more information, see Manage alert contacts.

    • Click Add Contact to add an alert contact.

    • Click Create Contact Group to create a new alert contact group.

    • Click Edit or Remove in the Actions column to update or delete an existing contact.

  11. Click Submit Configuration and confirm in the dialog box that appears.

To modify a policy, click Modify in the Actions column. To stop applying a policy to the instance, click Applied Policies in the Actions column of the Applied Policies section.

View scaling events

  1. Log on to the DAS console.

  2. In the left-side navigation pane, choose Intelligent O&M Center > Instance Monitoring.

  3. Find the instance and click its ID to open the instance details page.

  4. In the left-side pane, click Autonomy Center.

  5. On the Autonomy Center page, set Type to Auto-Scaling Events and select a time range.

  6. Click Details in the Auto-Scaling Events section to view event details.

p2022021701

What's next