Changing a DB Instance Class
Scenarios
You can change the instance class (vCPUs and memory) of a DB instance as required.
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.
- Changing an instance class takes 5 to 15 minutes.
- Log in to the management console.
- 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.
- 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.
- 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. After a few minutes, view the DB instance class on the Overview page to check that the change is successful.
After the instance class is changed, the values of the following parameters will be changed accordingly: back_log, innodb_buffer_pool_size, innodb_log_buffer_size, innodb_log_files_in_group, max_connections, innodb_page_cleaners, innodb_buffer_pool_instances, threadpool_size, and slave_parallel_workers.
- Log in to the management console.
- 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.
- 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.
- 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. After a few minutes, view the instance class of the read replica on the Overview page to check that the change is successful.
After the instance class is changed, the values of the following parameters will be changed accordingly: back_log, innodb_buffer_pool_size, innodb_log_buffer_size, innodb_log_files_in_group, max_connections, innodb_page_cleaners, innodb_buffer_pool_instances, threadpool_size, and slave_parallel_workers.
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.