Database Autonomy Service (DAS) allows you to specify a storage space threshold for a database instance. When the storage space reaches the specified threshold, the storage space of the database instance is insufficient. In this case, automatic space expansion is implemented to ensure that data can be written to the database as expected. This prevents data loss and the impact on business caused due to database instance breakdown. During the expansion, you do not need to restart the database instance, and your services are not affected.
Prerequisites
The database instance for which you want to enable automatic space expansion is of one of the following types:
Database instance
Region
ApsaraDB RDS for MySQL Basic Edition, High-availability Edition, or Cluster Edition instance that uses standard SSDs or Enterprise SSDs (ESSDs)
PolarDB for MySQL Standard Edition instance
The automatic space expansion feature depends on the anomaly detection feature. You can enable automatic space expansion only for database instances in regions that support the anomaly detection feature. The anomaly detection feature is supported in the following regions:
China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Nanjing - Local Region), China (Fuzhou - Local Region), China (Chengdu), China (Zhengzhou - Local Region), China (Hong Kong), Japan (Tokyo), South Korea (Seoul), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), Thailand (Bangkok), UAE (Dubai), SAU (Riyadh - Partner Region), Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UK (London)
ApsaraDB RDS for SQL Server High-availability Edition or Cluster Edition instance that uses standard SSDs or ESSDs
NoteRead-only instances of ApsaraDB RDS for SQL Server do not support the automatic space expansion feature.
China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Chengdu), China (Hong Kong), Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), UAE (Dubai), Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UK (London)
The balance of your Alibaba Cloud account is sufficient to pay for the resources that are required to expand storage space.
The service-linked role for DAS is created. For more information, see AliyunServiceRoleForDAS role.
NoteIf the service-linked role for DAS is not created, the system automatically creates the role before the system expands storage space.
Background information
For more information, see Auto Scaling.
Usage notes
If your database instances include read-only instances, DAS automatically checks the storage space of each read-only instance when automatic space expansion is triggered for the primary instance. If the storage space of a read-only instance is smaller than that of the primary instance after storage space expansion, DAS first expands the storage space of the read-only instance. When the storage space of all read-only instances meets the requirement, DAS automatically expands the storage space of the primary instance.
The automatic space expansion feature cannot be used for specific ApsaraDB RDS for SQL Server instances due to the limits of Windows drivers. In this case, we recommend that you update the minor engine version of these database instances. For more information, see Update the minor engine version of an ApsaraDB RDS for SQL Server instance.
Billing
The billing rules for automatic space expansion are the same as those for manual space expansion of ApsaraDB RDS instances. For more information, see Specification changes.
Procedure
Log on to the DAS console.
In the left-side navigation pane, click Instance Monitoring.
On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.
In the left-side navigation pane, click Autonomy Center.
In the upper-right corner of the Autonomy Center page, click Autonomy Service Settings.
On the Autonomous Function Settings tab of the panel, turn on the switch to enable the autonomy service.
On the Optimization and Throttling tab, select Automatic Space Expansion and configure the parameters that are described in the following table.
Parameter
Description
Available Storage Space ≤
The storage space threshold for triggering automatic storage expansion.
If the available storage space of your database instance is less than or equal to the specified storage space threshold, the system automatically expands the storage space by increasing the following size of space, whichever is larger:
5 GB
NoteIf the total storage space of the database instance is less than 50 GB and the available storage space is less than 10% of the total storage space, the step size for storage space expansion is adjusted to 10 GB.
15% of the total storage space of the database instance. The result is the nearest integer that is a multiple of 5.
For example, if the total storage space of a database instance is 100 GB, the storage space is increased by 15 GB when the storage space threshold is reached. After the expansion, the total storage space of the database instance is 115 GB.
NotePolarDB for MySQL Standard Edition database instances use the default storage space thresholds. For more information about the storage space thresholds, see the Storage space thresholds of PolarDB for MySQL Standard Edition section of this topic.
Maximum Storage of Automatic Expansion
The maximum storage space of the database instance after storage space expansion. The value of this parameter must be greater than or equal to the total storage space of the database instance.
ImportantThe step size for storage space expansion must be an integral multiple of 10 for PolarDB for MySQL Standard Edition database instances. We recommend that you set the Maximum Storage of Automatic Expansion parameter to an integer that is a multiple of 10. Otherwise, storage space expansion may fail or the storage space may fail to reach the value specified by the Maximum Storage of Automatic Expansion parameter.
NoteThe interval between two storage expansion operations is at least 10 minutes.
Click OK.
In the Alert Configuration section, configure an alert template and subscribe to alert notifications. This helps you understand the status of an automatic space expansion task at the earliest opportunity.
The system recommends an alert template and adds alert rules for the required autonomy events in the alert template. You can configure the alert template as prompted.
NoteIf you have configured an alert template for your database instance, you must add alert rules for the required autonomy event to the alert template as prompted.
If you need to configure an alert template and alert rules for your database instance, follow the instructions in Configure alert templates and Configure alert rules.
In the Select Contact Group section, select an alert contact group.
Click Add Contact to add an alert contact.
Click Create Contact Group to create an alert contact group.
Find the alert contact that you want to manage and click Edit or Remove in the Actions column to modify or delete information about the alert contact.
For more information, see Manage alert contacts.
Click Submit Configuration. In the dialog box that appears, confirm the configuration.
View the results of automatic space expansion
Log on to the DAS console.
In the left-side navigation pane, click Instance Monitoring.
On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.
In the left-side navigation pane, click Autonomy Center.
On the Autonomy Center page, select a time range to view the Auto-Scaling Events that occurred within the selected time range.
Click Details to view the details of automatic space expansion.
Storage space thresholds of PolarDB for MySQL Standard Edition
The following table describes the relationships between the storage space threshold and the total storage space of PolarDB for MySQL Standard Edition database instances.
Total storage space | Storage space threshold |
Total storage space < 120 GB | Available storage space < 50% of the total storage space |
120 GB ≥ Total storage space < 1 TB | Available storage space < 30% of the total storage space |
1 TB ≥ Total storage space < 10 TB | Available storage space < 20% of the total storage space |
10 TB ≥ Total storage space | Available storage space < 10% of the total storage space |
References
After the storage space of your database instance is expanded, the storage space cannot be automatically reduced. However, you can manually reduce the storage space by changing the instance specifications. For more information, see Change instance specifications.
NoteManual reduction is not supported for ApsaraDB RDS for SQL Server database instances and PolarDB for MySQL Standard Edition database instances.
You can enable the automatic fragment recycling feature to clear tablespace fragments and reduce storage space wastes. For more information, see Automatic tablespace fragment recycling.
You can use the storage analysis and capacity assessment features to view and analyze the storage usage of a database instance.
For more information about how to expand the storage space of an ApsaraDB RDS for PostgreSQL instance, see Automatic storage expansion.