Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Changing a DB Instance Class

Updated on 2025-01-02 GMT+08:00

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.

You can upgrade or downgrade RDS for MySQL instance specifications.

Constraints

Table 1 Constraints

Phase

Constraints

Before the change

  • You can change the DB instance class only when your account balance is greater than or equal to $0 USD.
  • 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.
  • An instance class can fail to be changed when:
    • The instance status is Abnormal, Creation failed, Storage full, or Creating.
    • The replication delay between the primary instance and standby instance is greater than 300 seconds, or the replication relationship is abnormal.
    • The standby instance is being rebuilt.
    • The database proxy is abnormal or being changed.
    • The instance has a scheduled instance class change task.

During the change

  • If there are any large transactions being processed during an instance class change, the change may fail.
  • Any session that holds a global read lock can cause a change failure.
  • 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.
  • If you change the instance class of a read replica, binlog clearing will be disabled for the primary DB instance. Pay attention to the storage space usage.

After the change

  • After an instance class is changed, some parameters are automatically changed to the default values defined in the new instance class. For details, see Parameter Changes.

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, 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 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.

Billing

Table 2 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 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 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 3 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 4 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.
  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 instance name to go to the Overview page. Under Instance Class, click Configure.

  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 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.

Follow-up Operations

Return to the instance list. In the navigation pane on the left, choose Task Center and check the progress of the change task.
  • 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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback