Changing a DB Instance Class
Scenarios
You can change the instance class (vCPUs and memory) of a DB instance as required.
RDS for MySQL supports both an increase and a decrease in the instance class.
Video Tutorial
Constraints
Phase |
Constraints |
---|---|
Before the change |
|
During the change |
|
After the change |
|
Change Duration and Impact on Workloads
- Changing an instance class will interrupt services for about 10 to 120 seconds. 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, submit a service ticket.) The time required for changing an instance class can be a little bit long during peak hours due to high replication delay.
Instance Class 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. For details about instance classes, see x86-based Instance Classes (Cloud Disk Storage).
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 displayed on the console. Suppose you purchased a one-month RDS for MySQL 5.7 single-node 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 displayed on the console. Suppose you purchased a one-month RDS for MySQL 5.7 single-node 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
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.
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
- Click
in the upper left corner and select a region.
- Click
in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, locate the target DB instance and choose More > Change Instance Class in the Operation column.
Alternatively, click the target instance name to go to the Overview page. Under Instance Class, click Configure.
- On the displayed page, specify a 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 classDB 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 this option, you are advised to set the maintenance window to off-peak hours.
- 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
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 instance class, click Pay Now. The scale-up starts only after the payment is successful.
- If you intend to scale down the DB instance class, click Submit.
- 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 Overview 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.
- Click
in the upper left corner and select a region.
- Click
in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, locate the target read replica and choose More > Change Instance Class in the Operation column.
Alternatively, click the read replica name to go to the Overview page. Under Instance Class, click Configure.
- On the displayed page, specify a new instance class and click Next.
For RDS for MySQL read replicas billed on the pay-per-use basis, choose a new instance class and a scheduled time, and click Next.
Read replicas 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 this option, you are advised to set the maintenance window to off-peak hours.
- Confirm the settings.
- If you need to modify your settings, click Previous.
- For pay-per-use read replicas, click Submit.
To view the cost incurred by the instance class change, choose
in the upper right corner. - For yearly/monthly read replicas:
- If you intend to scale down the 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 instance class, click Pay Now. The scale-up starts only after the payment is successful.
- If you intend to scale down the instance class, click Submit.
- Check the change result.
Return to the Instances page and view the read replica status. During the change period, its 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 instance class of the read replica on the Overview page to check that the change is successful.
For read replicas using cloud disks, if you have selected Maintenance Window for Scheduled Time, the read replica status on the Instances page is Changing instance class in the maintenance window.
FAQ
Can I Change the Instance Class of a Primary DB Instance and Its Read Replicas at the Same Time?
No.
To prevent long delay and high load of a read replica, its instance class should be greater than or equal to that of its primary DB instance.
Follow-up Operations
- If you have selected Upon submission for Scheduled Time:
On the Instant Tasks page, search for "Changing a MySQL DB instance class" and check the execution progress. Instant tasks cannot be canceled.
- If you have selected Maintenance Window for Scheduled Time:
On the Scheduled Tasks page, search for the instance ID and check the execution status of the change task.
If the task is in the To be executed state, you can click Cancel to cancel the task.
For details, see Viewing a Task.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot