All Products
Search
Document Center

ApsaraDB RDS:How do I reduce the storage capacity of an ApsaraDB RDS for MySQL instance that uses cloud disks?

Last Updated:Feb 05, 2024

This topic describes how to manually reduce the storage capacity of an ApsaraDB RDS for MySQL instance that uses cloud disks. When the storage capacity of your RDS instance that uses cloud disks exceeds your actual needs, you can reduce the storage capacity to avoid resource waste and lower costs. When you reduce the storage capacity of an RDS instance that uses enhanced SSDs (ESSDs), you can lower the performance level (PL) of ESSDs and downgrade the instance type of the RDS instance.

Prerequisites

  • Your RDS instance meets the following requirements:

    • The RDS instance runs MySQL 5.7 or MySQL 8.0.

    • The RDS instance runs a minor engine version of 20210430 or later.

    • The RDS instance runs RDS Basic Edition, RDS High-availability Edition, or RDS Cluster Edition. If the RDS instance runs RDS Cluster Edition, the instance must reside in the Singapore region.

    • The RDS instance uses the ESSD storage type.

    • The log backup feature is enabled. For more information, see Use the log backup feature.

    Note
    • You can go to the Basic Information page of the RDS instance to view the preceding information.

    • You cannot reduce the storage capacity of a serverless RDS instance that uses cloud disks.

    • For more information about how to reduce the storage capacity of an RDS instance that uses local disks, see Change the specifications of an ApsaraDB RDS for MySQL instance.

  • Your Alibaba Cloud account does not have unpaid renewal orders.

    Note

    If an unpaid renewal order exists, you must complete the payment or cancel the order. To complete the payment or cancel the order, perform the following operations: Log on the ApsaraDB RDS console. In the top navigation bar, choose Expenses > Orders. On the Orders page, complete the payment or cancel the order.

  • The RDS instance is in the Running state.

  • When you reduce the storage capacity of a read-only RDS instance that uses cloud disks, the primary RDS instance of the read-only RDS instance is in the Running state.

Limits

  • You can manually reduce the storage capacity of an RDS instance that uses cloud disks up to twice a day. This prevents your services from being negatively affected.

  • If your RDS instance runs RDS Basic Edition or RDS High-availability Edition and uses cloud disks, you can reduce the storage capacity without the need to change the RDS edition or architecture of the RDS instance. The minimum storage capacity after the storage capacity reduction must be greater than or equal to the minimum storage capacity that is supported by the instance type of the RDS instance. You can use the following formula to calculate the minimum storage capacity to which you can reduce your RDS instance: min{Used storage × 1.3, Used storage + 400 GB}. You can reduce the storage capacity at a step size of 5 GB.

    Note
    • The following list describes the minimum storage capacity that is allowed for each PL ESSD:

      PL1 ESSD: 20 GB

      PL2 ESSD: 500 GB

      PL3 ESSD: 1,500 GB

    • The following information provides examples:

      Your RDS instance provides 2,000 GB of storage capacity and uses the PL1 ESSD storage type. The following list describes the minimum storage capacity to which you can reduce your RDS instance varies based on the storage usage:

      • If 10 GB of storage is used, the value obtained by using the preceding formula is 13 GB. In this case, the minimum storage capacity to which you can reduce your RDS instance is 20 GB.

      • If 500 GB of storage is used, the value obtained by using the preceding formula is 650 GB. In this case, the minimum storage capacity to which you can reduce your RDS instance is 650 GB.

      • If 1,500 GB of storage is used, the value obtained by using the preceding formula is 1,900 GB. In this case, the minimum storage capacity to which you can reduce your RDS instance is 1,900 GB.

  • The storage capacity of a read-only RDS instance must be greater than or equal to the storage capacity of its primary RDS instance. We recommend that you reduce the storage capacity of the primary RDS instance and then the storage capacity of its read-only RDS instances.

Impacts

When you reduce the storage capacity of your RDS instance that uses cloud disks, a 30-second transient connection occurs. During the transient connection, you cannot perform most of the operations that are related to databases, accounts, and network settings. We recommend that you reduce the storage capacity of your RDS instance that uses cloud disks during off-peak hours. Make sure that your application is configured to automatically reconnect to your RDS instance.

Billing rules

For more information about billing rules, see Specification changes.

Procedure

  1. Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the Configuration Information section of the page that appears, click Change Specifications.

  3. In the dialog box that appears, click Downgrade and click Next. This step is required only when the RDS instance uses the subscription billing method.

  4. Configure the following parameters.

    Parameter

    Description

    Storage Type

    Optional. Configure this parameter based on your business requirements.

    Instance Type

    Optional. Configure this parameter based on your business requirements.

    Capacity

    Drag the slider or click the minus icon to specify the new storage capacity for your RDS instance.

    Note

    The minimum storage capacity to which you can reduce your RDS instance is calculated by using the following formula: min{Used storage × 1.3, Used storage + 400 GB}. The minimum storage capacity after the storage capacity reduction must be greater than or equal to the minimum storage capacity that is supported by the instance type of the RDS instance. You can reduce the storage capacity at a step size of 5 GB.

    Switching Time

    Select Switch Immediately After Data Migration or Switch Within Maintenance Window.

    Note
    • Switch Immediately After Data Migration: The data is immediately migrated, which does not affect workloads on the RDS instance during the migration. After the data is migrated, the system immediately switches over your workloads. A transient connection occurs during the switchover.

    • Switch Within Maintenance Window: Your data is immediately migrated, which does not affect workloads on the RDS instance. After the data is migrated, the system switches your workloads within the maintenance window. A transient connection occurs during the switchover. For more information, see Configure a maintenance window.

  5. Read and select Terms of Service and click Pay Now. In the dialog box that appears, confirm the instance information before and after the specification change and click Continue to complete the payment.

FAQ

  • When I reduce the storage capacity of my RDS instance that uses cloud disks, how long does a transient connection last?

    The transient connection lasts for approximately 30 seconds. During the transient connection, you cannot perform most of the operations that are related to databases, accounts, and network settings. We recommend that you reduce the storage capacity of your RDS instance that uses cloud disks during off-peak hours. Make sure that your application is configured to automatically reconnect to your RDS instance.

  • How do I reduce the storage capacity of my RDS instance that uses standard SSDs?

    Standard SSDs are no longer available for purchase. If you want to reduce the storage capacity of your RDS instance that uses standard SSDs, you can upgrade the storage type from standard SSD to ESSD and then reduce the storage capacity. For more information, see [EOS/Discontinuation] End of sale for the standard SSD storage type for specific database engines in ApsaraDB RDS from July 01, 2022.

Related operations

Operation

Description

ModifyDBInstanceSpec

Reduces the storage capacity of an instance. When you call the ModifyDBInstanceSpec operation to reduce the storage capacity of an instance that uses cloud disks, you must change the value of the DBInstanceStorage parameter to the new storage capacity. You can configure other parameters based on your business requirements.

References

For more information about how to change other specifications of an RDS instance, see Change instance specifications.