All Products
Search
Document Center

ApsaraDB for MyBase:Configure an auto scaling policy for CPU resources

Last Updated:Jul 14, 2023

This topic describes how to configure an auto scaling policy for CPU resources in an ApsaraDB for MyBase dedicated cluster. This helps you utilize idle resources on your hosts to improve instance performance.

Scenarios

For example, if eight instances with specifications of 4 cores and 8 GB memory each are deployed on a host with specifications of 16 cores and 128 GB memory, the total CPU resources of the instances are twice the total CPU resources of the host. In this case, the CPU overcommit ratio of the host is 200%. When traffic spikes or flash sales occur, a maximum of 4 cores can be used for each instance due to the instance specification limits. This may cause serious resource issues. In this case, your business requirements cannot be met due to insufficient resources.

You can configure static policies to temporarily increase CPU resources and the upper limit of instance specifications. For more information, see Upgrade the specifications of an instance for short-term use. This method is suitable only for scenarios in which you can forecast traffic spikes and manually increase the CPU resources in advance. If you use this method, resource scaling cannot be triggered in real time. To ensure performance during unexpected traffic spikes, we recommend that you configure an auto scaling policy for CPU resources in your dedicated cluster. This way, the system automatically increases CPU resources based on the resource usage and available host resources. This reduces O&M costs.

Usage notes

  • An auto scaling policy for CPU resources can be configured only for a dedicated cluster that runs MySQL or PostgreSQL.

  • If auto scaling policies for CPU resources are configured for ApsaraDB MyBase for MySQL dedicated clusters, the policies take effect only on the corresponding ApsaraDB MyBase for MySQL instances of the High-availability Edition.

  • After you modify an auto scaling policy for CPU resources for an ApsaraDB for MyBase dedicated cluster, wait about 3 minutes for the new configuration to take effect.

  • After an auto scaling policy for CPU resources takes effect on an ApsaraDB for MyBase dedicated cluster, auto scaling of CPU resources is triggered for an instance in the dedicated cluster when 80% of the CPU resources of the instance are utilized. The CPU resources are scaled based on the auto scaling policy.

Procedure

  1. Log on to the ApsaraDB for MyBase console.

  2. In the upper-left corner of the page, select a region.

  3. In the left-side navigation pane, click Dedicated Clusters. On the page that appears, find the dedicated cluster that you want to manage and click Details in the Actions column.

  4. On the Dedicated Cluster Information page, click the Elasticity Policy tab.

  5. Click Edit next to Elasticity Policy and modify the scale-up ratio of CPU resources.

  6. Click Save.

    Note

    By default, the scale-up ratio of CPU resources is 50%.