tencent cloud

TencentDB for MySQL

Release Notes and Announcements
Release Notes
Product Announcements
User Tutorial
Product Introduction
Overview
Strengths
Use Cases
Database Architecture
Resource Isolation Policy
Economical Instance
Feature List
Database Instance
High Availability (Multi-AZ)
Regions and AZs
Service Regions and Service Providers
Kernel Features
Overview
Kernel Version Release Notes
Functionality Features
Performance Features
Security Features
Stability Features
TXRocks Engine
LibraDB Engine
Checking and Fixing Kernel Issues
Purchase Guide
Billing Overview
Selection Guide
Purchase Methods
Renewal
Payment Overdue
Refund
Pay-as-You-Go to Monthly Subscription
Instance Adjustment Fee
Backup Space Billing
Database Audit Billing Overview
Commercial Billing and Activity Description for Database Proxy
Description of the Database Proxy Billing Cycle
Viewing Bills
Getting Started
Overview
Creating MySQL Instance
Connecting to MySQL Instance
SQL Insight (Database Audit)
Overview
Viewing Audit Instance List
Enabling Audit Service
Viewing Audit Log
Log Shipping
Configuring Post-Event Alarms
Modifying Audit Rule
Modifying Audit Services
Disabling Audit Service
Audit Rule Template
SQL Audit Rule (Legacy)
Viewing Audit Task
Authorizing Sub-User to Use Database Audit
MySQL Cluster Edition
Introduction to TencentDB for MySQL Cluster Edition
Creating TencentDB for MySQL Cluster Edition Instance
Maintenance Management Instance
Viewing Instance Monitoring
Adjusting Instance Configuration
Operations for Other Features
Migrate or upgrade to TencentDB for MySQL Cluster Edition
Operation Guide
Use Limits
Operation Overview
Instance Management and Maintenance
Instance Upgrade
CPU Elastic Expansion
Read-Only/Disaster Recovery Instances
Database Proxy
Database Management Center (DMC)
Account Management
Parameter Configuration
Backup and Rollback
Data Migration
Network and Security
Monitoring and Alarms
Log Center
Read-Only Analysis Engine
Tag
Practical Tutorial
Using TencentDB for MySQL to Upgrade MySQL 5.7 to MySQL 8.0
Methods and Instructions for Upgrading from MySQL 5.6 to MySQL 5.7
Cybersecurity Classified Protection Practice for Database Audit of TencentDB for MySQL
Building All-Scenario High-Availability Architecture
Usage Specifications of TencentDB for MySQL
Configuring Automatic Application Reconnection
Impact of Modifying MySQL Source Instance Parameters
Limits on Automatic Conversion from MyISAM to InnoDB
Creating VPCs for TencentDB for MySQL
Enhancing Business Load Capacity with TencentDB for MySQL
Setting up 2-Region-3-DC Disaster Recovery Architecture
Improving TencentDB for MySQL Performance with Read/Write Separation
Migrating Data from InnoDB to RocksDB with DTS
Building LAMP Stack for Web Application
Building Drupal Website
Calling MySQL APIs in Python
The primary and secondary instances have inconsistent query data
White Paper
Performance White Paper
Security White Paper
Troubleshooting
Connections
Performance
Instance Data Sync Delay
Failure to Enable Case Insensitivity
Failure to Obtain slow_query_log_file via a Command
API Documentation
History
Introduction
API Category
Instance APIs
Making API Requests
Data Import APIs
Database Proxy APIs
Database Audit APIs
Security APIs
Task APIs
Backup APIs
Account APIs
Rollback APIs
Parameter APIs
Database APIs
Monitoring APIs
Log-related API
Data Types
Error Codes
FAQs
Related to Selection
Billing
Backup
Rollback
Connection and Login
Parameter Modifications
Instance Upgrade
Account Permissions
Performance and Memory
Ops
Data Migration
Features
Console Operations
Logs
Event
Database audit
Instance Switch Impact
API 2.0 to 3.0 Switch Guide
Service Agreement
Service Level Agreement
Terms of Service
Reference
Standards and Certifications
Contact Us
Glossary

Performance Manifestation

PDF
Focus Mode
Font Size
Last updated: 2023-12-27 10:27:56
This section describes how to use the performance testing tool SysBench to compare the performance after the CPU Elastic Scaling is enabled.

SysBench Tool Introduction

SysBench is a modular, cross-platform, and multi-threaded performance measurement tool that evaluates primary system parameters concerning its operational performance under heavy loads. The tool circumvents the need for complex database benchmark configurations, enabling swift understanding of database performance, even without the necessity of installing a database.

Testing Environment

Note:
The following environment is only used in the example.
Environment Utilized for MySQL Performance Testing:
Region/AZ: Beijing - Beijing Zone 7
Client: S5.8XLARGE64 (32-core 64 GB Standard S5)
Client OS: CentOS 8.2 64-bit
Network: Both the CVM and MySQL instances are under the same VPC subnet.
Tested MySQL Instance:
Three groups of instances: Beijing Zone 7, General 2-core 4 GB, two-node MySQL
Group A: NO-CPU-Expand, the CPU Elastic Scaling feature is not enabled.
Group B: AUTO-CPU-Expand, the Automatic CPU Elastic Scaling feature is enabled. Group B:
Group C: MANUAL-CPU-Expand, the Manual CPU Elastic Scaling feature is enabled. Group B:
Setting Parameters:
Set console parameter 'max_prepared_stmt_count' to its highest value to cope with high concurrency.

Testing Process

Step 1:
Create a 'sbtest' database in the system, enable the Automatic CPU Elastic Scaling feature for group B, and enable the Manual CPU Elastic Scaling feature for group C.
Step 2:
Utilize Sysbench to prepare data, including 10 tables, with each table containing a data volume of 100,000.
Step 3:
Perform a Sysbench read/write test on 10 tables, with each table containing a data volume of 100,000.
Step 4:
Proceed with Sysbench to clear data and disable the Manual CPU Elastic Scaling feature for group C.

Testing Description

The Test can be affected by factors such as testing time, duration, machine used, etc. We suggest performing multiple tests.

Executed Commands:

Following the above steps, conduct the tests respectively.
Note:
Please replace the 'XXX' in the following command with the internal network address, port number, username, user password, and database name of the MySQL instance. The specific parameters are explained as follows:
host: Private network address of the tested instance
port: Port number
user: Username
password: Password corresponding to the username
time: Time
threads: Number of concurrent threads
1. Prepare data: 100,000 data volumes in each table, with 10 tables in total.
sysbench --db-driver=mysql --mysql-host=xxx --mysql-port=xxxx --mysql-user=xxx --mysql-password='XXXXXXXXXX' --mysql-db=sbtest --table_size=100000 --tables=10 --events=0 --time=xxxx --threads={xxxx} oltp_read_write prepare

2. Execute high concurrency operations on the 100,000 data volume in each table, with 10 tables in total.
sysbench --db-driver=mysql --mysql-host=xxx --mysql-port=xxxx --mysql-user=xxx --mysql-password='XXXXXXXXXX' --mysql-db=sbtest --table_size=100000 --tables=10 --events=0 --time=xxx --threads={xxx} --percentile=95 --report-interval=1 oltp_read_write run

3. Clear the data.
sysbench --db-driver=mysql --mysql-host=xxx --mysql-port=xxxx --mysql-user=xxx --mysql-password='XXXXXXXXXX' --mysql-db=sbtest --table_size=100000 --tables=10 --events=0 --time=xxx --threads={xxx} --percentile=95 oltp_read_write cleanup

Test Results

Note:
As illustrated below, in the comparative experiment results of the CPU Elastic Scaling feature of three groups of instances, we can observe:
Phase One: At 21:03, data injection was initiated. The CPU usage of both NO-CPU-Expand and AUTO-CPU-Expand exceeded 70%, but the duration did not exceed 1 minute. Therefore, the AUTO-CPU-Expand group did not trigger automatic scaling, while the MANUAL-CPU-Expand group scaled out immediately upon being operated and ran with 4 cores, with the CPU usage less than 50%.
Phase Two: At 21:07, high concurrency testing was initiated. The CPU usage of the NO-CPU-Expand group was remained over 70%, the CPU usage of the AUTO-CPU-Expand group also exceeded 70%, and it triggered automatic scaling when the CPU usage remained high for 1 minute. The scaling succeeded within seconds and reduced the usage to less than 50%. The CPU usage of the MANUAL-CPU-Expand group remained below 50%.

Note:
In addition to significant changes in CPU utilization, the performance of instances that have enabled the CPU Elastic Scaling feature also changes significantly. As demonstrated in the graph below, the TPS and QPS of instances with the feature enabled are higher than those for which the feature is not enabled. It should be noted, the performance in the test is affected by factors such as the testing period, duration, machine, etc. Thus, it is recommended to perform multiple tests and compare the results.



Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback