Updated on 2024-09-19 GMT+08:00

Changing a DB Instance Class

Scenarios

You can change the instance class (vCPU or memory) of a DB instance as required. If the status of a DB instance changes from Changing instance class to Available, the change is successful.

Constraints

  • You can change the DB instance class only when your account balance is greater than or equal to $0 USD.
  • An instance cannot be deleted while its instance class is being changed.
  • The following operations cannot be performed on an instance whose instance class is being changed: rebooting the instance, scaling up storage space, modifying the parameter template, creating a manual backup, creating a database account, and creating a database.
  • You can scale up or down your RDS for MySQL instance specifications.
  • When the instance class of a read replica is being changed, binlog clearing of the primary instance is disabled.
  • Changing the instance class will temporarily occupy IP addresses, and the IP addresses will not be released until 12 hours later by default. Before changing an instance class, ensure that there are available floating IP addresses (two for a primary/standby instance and one for a single instance or read replica) in the subnet. Otherwise, the change will fail.
  • If there are any large transactions being processed during an instance class change, the change may fail.
  • If the primary/standby replication delay of a DB instance is longer than 5 minutes, the instance class change will fail.
  • Changing an instance class will interrupt services. Ensure that your applications support automatic reconnection. Perform this operation during off-peak hours because changing an instance class during peak hours takes much more time.
  • The time required for changing an instance class (during off-peak hours) is as follows:
    • For an instance using a cloud disk, the process takes 5 to 15 minutes.
    • If the change takes an extended period of time, contact customer service.
  • If you choose to change an instance class during the maintenance window, after the request is submitted, you can locate the scheduled task and click Execute Now in the Operation column. (If this option is not displayed on the console, contact customer service.) The time required for changing an instance class can be a little bit long during peak hours due to high replication delay.

Instance Class or Storage Type Change

  • You can change a general-purpose instance to a dedicated instance, and vice versa. However, changing a dedicated instance to a general-purpose instance may compromise database performance. Exercise caution when performing this operation.
  • You can change the storage type of a primary/standby DB instance from cloud SSD to extreme SSD. To apply for required permissions, contact customer service.

Billing

Table 1 Billing

Billing Mode

Operation

Impact on Fees

Yearly/Monthly

Instance class upgrade

After an instance class is upgraded, the new instance class takes effect in the original usage period.

You need to pay for the difference in price based on the remaining period.

The following prices are for reference only. The actual prices are subject to the price displayed on the console.

Suppose you purchased a one-month RDS for MySQL 5.7 single DB instance (instance class: general-purpose, 2 vCPUs | 8 GB; storage: cloud SSD, 40 GB) in CN-Hong Kong on June 1, 2023. The instance price was $59.56 USD per month.

On June 15, 2023, you changed the instance class to 4 vCPUs | 8 GB. The instance price became $121.56 USD per month.

Price difference of upgrade = Price for the new instance class × Remaining period - Price for the original instance class × Remaining period

The remaining period is the remaining days of each calendar month divided by the maximum number of days in each calendar month.

In this example, the remaining period and price difference are calculated as follows:

Remaining period = 15 (Remaining days in June)/30 (Maximum number of days in June) = 0.5

Price difference of the upgrade = $121.56 USD x 0.5 - $59.56 USD x 0.5 = $31 USD

Instance class downgrade

After an instance class is downgraded, the new instance class takes effect in the original usage period.

RDS refunds the difference in price based on the remaining period.

The following prices are for reference only. The actual prices are subject to the price displayed on the console.

Suppose you purchased a one-month RDS for MySQL 5.7 single DB instance (instance class: general-purpose, 2 vCPUs | 8 GB; storage: cloud SSD, 40 GB) in CN-Hong Kong on June 1, 2023. The instance price was $59.56 USD per month.

On June 15, 2023, you changed the instance class to 2 vCPUs | 4 GB. The instance price became $50.56 USD per month.

Refunded fees = Price for the original instance class × Remaining period - Price for the new instance class × Remaining period

The remaining period is the remaining days of each calendar month divided by the maximum number of days in each calendar month.

In this example, the remaining period and refunded fees are calculated as follows:

Remaining period = 15 (Remaining days in June)/30 (Maximum number of days in June) = 0.5

Refunded fees = $59.56 USD x 0.5 - $50.56 USD x 0.5 = $4.5 USD

Pay-per-use

Instance class upgrade

After an instance class is changed, the new instance class is billed by hour. For details, see Product Pricing Details.

Instance class downgrade

Parameter Changes

vCPU-related parameters, such as threadpool_size and slave_parallel_workers, will be reset according to the following rules during an instance class change.
Table 2 Parameter value changes with vCPU changes

Scenario

Rule for a vCPU Parameter with No Changes Made to Its Value

Rule for a vCPU Parameter Changed to a Custom Value

vCPU increase

The parameter will be reset to the default value of the new instance class.

The larger one between the custom value and the default value of the new instance class will be used.

vCPU decrease

The parameter will be reset to the default value of the new instance class.

The smaller one between the custom value and the default value of the new instance class will be used.

Memory-related parameters, such as innodb_buffer_pool_size, innodb_log_buffer_size, innodb_log_files_in_group, max_connections, innodb_page_cleaners, innodb_buffer_pool_instances, and back_log, will be reset according to the following rules during an instance class change.

Table 3 Parameter value changes with memory changes

Scenario

Rule for a Memory Parameter with No Changes Made to Its Value

Rule for a Memory Parameter Changed to a Custom Value

Memory increase

The parameter will be reset to the default value of the new instance class.

The larger one between the custom value and the default value of the new instance class will be used.

Memory decrease

The parameter will be reset to the default value of the new instance class.

The smaller one between the custom value and the default value of the new instance class will be used.

However, values of innodb_io_capacity and innodb_io_capacity_max will be reset to the default values of the new instance class if no custom values have been specified for them or they will remain unchanged if you have specified custom values for them.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, locate the target DB instance and choose More > Change Instance Class in the Operation column.

    Alternatively, click the target DB instance to go to the Basic Information page. In the DB Information area, click Change next to the Instance Class field.

  5. On the displayed page, specify the new instance class and click Next.

    For RDS for MySQL DB instances billed on the pay-per-use basis, choose a new instance class and a scheduled time, and click Next.

    Figure 1 Changing a DB instance class

    DB instances in a DCC only support the general-enhanced instance class.

    • Upon submission: An instance class change is applied immediately after the request is submitted.
    • Maintenance Window: If you select Maintenance Window for Scheduled Time, after the request is submitted, you can locate the scheduled task and click Execute Now in the Operation column as required. (If this option is not displayed on the console, contact customer service to obtain required permissions.) For details about how to view a task, see Viewing a Task. Services are temporarily interrupted during an instance class change. You are advised to set the maintenance window to off-peak hours.

  6. Confirm the specifications.

    • If you need to modify your settings, click Previous.
    • For pay-per-use DB instances, click Submit.

      To view the cost incurred by the DB instance class change, choose Billing & Costs > Bills in the upper right corner.

    • For yearly/monthly DB instances:
      • If you intend to scale down the DB instance class, click Submit.

        The refund is automatically returned to your account. You can click Billing in the upper right corner and then choose Orders > My Orders in the navigation pane on the left to view the details.

      • If you intend to scale up the DB instance class, click Pay Now. The scaling starts only after the payment is successful.

  7. Check the change result.

    Return to the Instances page and view the instance status. During the change period, the instance status is Changing instance class. You can view the execution progress of Changing a MySQL DB instance class on the Task Center page. After a few minutes, view the DB instance class on the Basic Information page to check that the change is successful.

    For DB instances using cloud disks, if you have selected Maintenance Window for Scheduled Time, the status of the DB instance on the Instances page is Changing instance class in the maintenance window.