This topic provides answers to frequently asked questions about the storage capacity of ApsaraDB RDS instances.
Can I expand storage without migrating data?
It depends on the host. If the current host has enough storage resources, the expansion happens in place with no data migration. If not, the system creates a new RDS instance on a different host and migrates your data automatically.
Transient connections may occur during expansion. For engine-specific details, see:
How does storage expansion affect billing?
Your instance fee changes after expansion. For details, see Billing details about configuration change.
Why did my storage usage spike?
Check the Monitoring and Alerts page for a breakdown by data type and usage trends:
-
Log on to the ApsaraDB RDS console and go to the Instances page. Select the region of your RDS instance and click the instance ID.
-
In the left-side navigation pane, click Monitoring and Alerts. View the storage usage of different data types and trends.
How do I free up storage by deleting files?
For ApsaraDB RDS for MySQL, storage exhaustion typically falls into one of four categories. See the relevant troubleshooting guide:
Why does an empty database still use storage?
During initialization, the system creates tables to store account and permission information. Database system logs such as redo logs and undo logs also occupy storage.
Why does MySQL use more storage after importing data from a different database engine?
Different storage engines process data differently. Compression features and indexes on certain fields affect storage usage, so the same dataset may occupy more space depending on the engine.
Does the Storage Capacity value include backup storage?
No. The Storage Capacity parameter reflects only instance storage, not backup storage. To find this value, go to the Basic Information page of your RDS instance in the ApsaraDB RDS console and check the Usage Statistics section.
See also: View and manage the size of backup files
What happens when storage is exhausted? How do I unlock my instance?
The RDS instance is automatically locked and enters the Locking state. Due to the inspection mechanism, there may be a brief delay before the lock takes effect. Once locked, you cannot write data to the RDS instance.
Prevent locking before it happens:
-
Configure alerting to get notified before storage runs out.
-
Enable automatic storage expansion so the system scales up when usage reaches a threshold:
-
For RDS for MySQL instances, enable automatic fragment reclamation to reclaim fragments and free up storage space.
If your instance is already locked, see What do I do if my ApsaraDB RDS instance is in the Locking state?
Why isn't disk space reclaimed after deleting data on SQL Server?
Three factors prevent immediate reclamation:
-
Transaction logs:
DELETEoperations are logged for data consistency and recoverability. These logs continue to occupy disk space even after the data is removed. -
Unreleased data pages: SQL Server marks deleted data pages as reusable rather than reclaiming them immediately. This improves insert performance by avoiding frequent physical disk operations.
-
Table and index fragmentation: Deleting data leaves holes in tables and indexes. The database system still considers this fragmented storage as allocated.
To reclaim disk space:
-
Shrink databases or file groups. Run
DBCC SHRINKDATABASEorDBCC SHRINKFILEto reclaim unused disk space.ImportantShrinking is time-consuming. Frequent shrinking degrades performance. See Solve SQL Server instance locking when storage is full or Troubleshoot insufficient storage on SQL Server.
-
Recreate indexes. After large deletions, indexes become fragmented. Recreating them reorganizes data pages, reclaims disk space, and improves query performance.
-
Back up transaction logs. For databases using the full recovery model, back up transaction logs regularly to truncate them and free up log space. See Manage logs.
-
Use
TRUNCATE TABLEinstead ofDELETE.TRUNCATE TABLEreleases data pages immediately without generating extensive logs.ImportantTRUNCATE TABLEis irreversible and does not support theWHEREclause.
Combine these methods based on your workload to optimize disk space efficiently.
Does expanding storage increase the free backup storage quota?
Yes. The free backup storage quota scales with your instance storage capacity:
| Storage type | Free backup quota |
|---|---|
| Cloud disks | 200% of storage capacity |
| Premium Local SSDs | 50% of storage capacity |
The quota is measured in GB and rounded up to the next integer. For example, if your cloud disk instance has 150 GB of storage capacity, the free backup quota is 300 GB.