This topic describes how to configure an auto scaling policy for CPU resources for an ApsaraDB for MyBase dedicated cluster. This policy efficiently uses idle host resources to improve instance performance.
Use cases
For example, consider a host with 16 cores and 128 GB of memory. If you deploy eight instances on this host, each with 4 cores and 8 GB of memory, the CPU overcommit ratio is 200%. This means the total CPU resources allocated to the instances are double the physical resources of the host. If one instance experiences a workload spike, such as during a flash sale, its CPU usage is capped at 4 cores due to its specification limits. This can create a significant resource bottleneck.
You could manually perform a temporary upgrade to increase the instance's CPU resources, which raises its resource limits. For more information, see elastic configuration (temporary upgrade). However, this manual method is effective only when you can predict peak traffic and upgrade beforehand. It is not suitable for handling sudden, unpredictable traffic spikes. Therefore, we recommend configuring an auto scaling policy for CPU resources for your dedicated cluster. The system then automatically scales up CPU resources based on utilization and available host resources, reducing your operational overhead.
Usage notes
- The auto scaling policy for CPU resources supports only the MySQL and PostgreSQL database engines.
- For ApsaraDB MyBase for MySQL, the auto scaling policy for CPU resources takes effect only on instances of the ApsaraDB MyBase for MySQL High-availability Edition.
- After you modify the auto scaling policy for CPU resources for an ApsaraDB for MyBase dedicated cluster, the new configuration takes effect in about three minutes.
- Once the auto scaling policy for CPU resources takes effect for an ApsaraDB for MyBase dedicated cluster, a scale-up event is automatically triggered for an instance when its CPU utilization reaches 80% of its specification limit. The system then increases the CPU resources based on the scale-up ratio defined in the cluster's elasticity policy.
Procedure
- Log on to the ApsaraDB for MyBase console.
- In the upper-left corner of the page, select the target region.
- In the left-side navigation pane, click cluster list. Find the target dedicated cluster and click Details in the Actions column.
- On the Dedicated Cluster Information page, click the elasticity policy tab.
- Next to Elasticity Policy, click Modify and set the CPU scale-up ratio.
- Click Save.
On the elasticity policy tab, under Resource Elasticity Policy, set the Scale-up Ratio for CPU to a target value, such as
70%.Note The default CPU scale-up ratio for the dedicated cluster is 50%.