当前位置:网站首页>Actual measurement: the performance of cloud RDS MySQL is 1.6 times that of self built
Actual measurement: the performance of cloud RDS MySQL is 1.6 times that of self built
2022-06-21 10:56:00 【Game programming】
1. Abstract
Based on what I wrote before 「 Cloud manufacturers RDS MySQL How to choose 」 The article , In order to further understand how cloud vendors are RDS MySQL Differences in database performance , This article will build by oneself MySQL、 Alibaba cloud 、 Tencent cloud 、 Huawei Yunhe AWS Of RDS MySQL Compare the database performance . The pressure measurement results in this paper are only for reference , Not as a buying suggestion .
2. test result
From this article 「 Test details 」 The following conclusions are drawn from the various conclusions in result :

explain : 100 " , Score according to the conclusion of the test details later in this article . The scoring rules are relatively simple : The best is 100 branch , Next, follow and 100 Score by the ratio of points , Such as 「 build by oneself -Percona」 Of QPS by 1000, score 100 branch ,「 build by oneself -MySQL」 Of QPS by 900, Then we get 90 branch .
Add : The performance of universal may be higher than that of exclusive 20%~30%, The price is also lower than exclusive , Because GM is oversold . But it may also be affected by oversold and lead to low stability , Please choose to use... According to the actual situation .
Specific information can be found in :「 Actually measured : cloud RDS MySQL Performance is self built 1.6 times 」, This content is synchronously published on wechat official account :「 Cloud database technology 」, Welcome to subscribe to , Get information at the first time .
3. Test instructions
To better compare the performance of various cloud vendor databases , Using a pressure measuring tool sysbench, The tool is an open source 、 Modular 、 Cross platform multithreading performance testing tool , It can be used for CPU、 Memory 、 disk I/O、 Threads 、 Database performance test .
3.1 Test indicators (sysbench value )
- Number of transactions executed per second TPS(Transactions Per Second)
Number of requests executed per second QPS(Queries Per Second) 3.2 Test instructions
branch 3 Two scenarios to test :「 Reading and writing 」、「 read-only 」、「 Just write 」, For each scenario 2~3000 Thread pressure test , Pressure measurement QPS、TPS The sum of the average values of is used as the performance comparison index .
Instance specifications are divided into exclusive specifications and general specifications :

Exclusive specifications : Each cluster will monopolize the allocated computing resources ( Such as CPU), Instead of sharing resources with other clusters on the same server , performance more Stable and reliable .
General specifications : Different clusters on the same server , Will make full use of each other's free computing resources ( Such as CPU), Enjoy scale dividends by reusing computing resources , There will be oversold ( Better performance , May be affected by other generic specification instances on the same physical machine ), High cost performance , Low stability .
4. Test details
4.1 Test environment
Asynchronous replication
The data exceeds innodb_buffer_pool_size
High performance template parameters
sync_binlog = 1000<br>innodb_flush_log_at_trx_commit = 2<br>innodb_flush_method = O_DIRECT<br>innodb_buffer_pool_size = 12gb<br>innodb_flush_neighbors = 0<br>max_prepared_stmt_count = 1048575<br><br>#Percona<br>thread_handling = pool-of-threadsExample specifications

Client specifications

Add :
build by oneself MySQL/Percona Deployed in Alibaba cloud ECS On , The data disk is PL2(PL2 The specified disk space needs to be greater than 500G)Percona Server Using the thread pool function, both the master-slave server and the client are in the same zone VPC Of cloud vendors RDS Instance parameters ( In addition to high-performance template parameters ) The general specification of Huawei cloud is cloud disk SSD
4.2 The test method
-- Prepare the data sysbench --db-driver=mysql --mysql-host=XXX --mysql-port=XXX --mysql-user=XXX --mysql-password=XXX --mysql-db=sbtest --table_size=10000000 --tables=10 --events=0 --time=300 --threads={2~3000} oltp_read_write prepare-- function workload# OLTP Read write mix sysbench --db-driver=mysql --mysql-host=XXX --mysql-port=XXX --mysql-user=XXX --mysql-password=XXX --mysql-db=sbtest --table_size=10000000 --tables=10 --events=0 --time=300 --threads={2~3000} --percentile=95 --report-interval=1 oltp_read_write run# OLTP Read only scenario sysbench --db-driver=mysql --mysql-host=XXX --mysql-port=XXX --mysql-user=XXX --mysql-password=XXX --mysql-db=sbtest --table_size=10000000 --tables=10 --events=0 --time=300 --threads={2~3000} --percentile=95 --skip-trx=1 --report-interval=1 oltp_read_only run# OLTP Just the scene sysbench --db-driver=mysql --mysql-host=XXX --mysql-port=XXX --mysql-user=XXX --mysql-password=XXX --mysql-db=sbtest --table_size=10000000 --tables=10 --events=0 --time=300 --threads={2~3000} --percentile=95 --report-interval=1 oltp_write_only run-- Clean up the data sysbench --db-driver=mysql --mysql-host=XXX --mysql-port=XXX --mysql-user=XXX --mysql-password=XXX --mysql-db=sbtest --table_size=10000000 --tables=10 --events=0 --time=300 --threads={2~3000} --percentile=95 oltp_read_write/oltp_read_only/oltp_write_only cleanup4.3 Test scenarios
Yes, reading and writing 、 read-only 、 Just write three scenes , Number of threads from 2 To 3000 Carry out pressure measurement instructions .
4.3.1 Reading and writing scenes
QPS:


TPS:


Reading and writing scenario conclusion :
- The general-purpose version of Alibaba cloud has higher performance than the exclusive version 23%; The general-purpose model of Tencent cloud has higher performance than the exclusive model 52%; The general-purpose model of Huawei cloud has higher performance than the exclusive model 8%. self-built Percona Server Than the community version MySQL High performance 7%;
「 build by oneself -MySQL」 Thread pools are not supported , stay 512 After thread pool , Performance degrades ;
「 Tencent cloud - exclusive 」 stay 16 The performance before the thread is not high , As threads increase, performance increases , And stay stable ;
「 build by oneself MySQL/Percona」 stay 2 When there are threads , The performance is better than that of various cloud manufacturers ; stay 4 The performance of the thread is similar to that of a cloud vendor ( Except Tencent cloud ), stay 8 After threads, it lags far behind cloud vendors ( Tencent cloud - Exclusive ); from QPS and TPS Of Average The sum of the , Performance from high to low Sort by :「 Alibaba cloud - Universal 」>「 Hua Wei Yun - Universal 」> 「 Tencent cloud - Universal 」> 「 Hua Wei Yun - exclusive 」> 「 Alibaba cloud - exclusive 」> 「 build by oneself -Percona」> 「 build by oneself -MySQL」> 「AWS」> 「 Tencent cloud - exclusive 」
4.3.2 Read only scenario
QPS:


TPS:


Read only scenario conclusion :
- The general-purpose version of Alibaba cloud has higher performance than the exclusive version 30%; The general-purpose model of Tencent cloud has higher performance than the exclusive model 59%; The general-purpose and exclusive performance of Huawei cloud are similar . self-built Percona Server Than the community version MySQL High performance 9%;
「 build by oneself -MySQL」 Thread pools are not supported , stay 512 After thread pool , Performance degrades ;
「 Tencent cloud - exclusive 」 stay 32 The performance before the thread is not high , As threads increase, performance increases , And stay stable ( Slow heat );
「 build by oneself MySQL/Percona」 stay 4 A thread ago , The performance is better than that of various cloud manufacturers ( except AWS And Huawei cloud - exclusive ); stay 8 Lower than cloud vendors after threads ( Tencent cloud - Exclusive ),32 When there are threads ,「 build by oneself MySQL」 Start below 「 Tencent cloud - exclusive 」,「 Tencent cloud - exclusive 」 and 「 build by oneself -Percona」 Close . from QPS and TPS Of The sum of the average , Performance from high to low Sort by :「 Hua Wei Yun - exclusive 」>「 Alibaba cloud - Universal 」> 「 Hua Wei Yun - Universal 」> 「 Tencent cloud - Universal 」> 「 Alibaba cloud - exclusive 」> 「 build by oneself -Percona」> 「AWS」> 「 build by oneself -MySQL」> 「 Tencent cloud - exclusive 」
4.3.3 Just the scene
QPS:


TPS:


Write only the scenario conclusion :
- The general-purpose version of Alibaba cloud has higher performance than the exclusive version 26%; The general-purpose model of Tencent cloud has higher performance than the exclusive model 39%; The general-purpose model of Huawei cloud has higher performance than the exclusive model 78%. self-built Percona Server Than the community version MySQL High performance 7%;
「 build by oneself -MySQL」 Thread pools are not supported , stay 512 After thread pool , Performance degrades ;
「 Tencent cloud - exclusive 」 stay 32 The performance before the thread is not high , As threads increase, performance increases , And stay stable ( Slow heat );
「 build by oneself MySQL/Percona」 stay 8 A thread ago , The performance is better than that of various cloud manufacturers ( except AWS Outside ); stay 8 Lower than cloud vendors after threads ,「 Hua Wei Yun - exclusive 」 and 「 build by oneself MySQL」 Close .
from QPS and TPS Of The sum of the average , Performance from high to low Sort by :「 Hua Wei Yun - Universal 」>「 Alibaba cloud - Universal 」> 「 Tencent cloud - Universal 」> 「 Alibaba cloud - exclusive 」> 「AWS」> 「 Tencent cloud - exclusive 」> 「 build by oneself -Percona」> 「 build by oneself -MySQL」> 「 Hua Wei Yun - exclusive 」
4.4 Additional explanation
- 「 Tencent cloud - exclusive 」 The low score is due to the small number of online trips , The performance is not high ( Lower than self built instances ), Even later 512 The thread performs well , But the overall score is not high .
The thread pool is used in the case of a large number of short connections or high concurrency , Have a good performance , There is no thread pool support 「 build by oneself MySQL」 and 「AWS」 When the number of connections is greater than 2000 The performance drops significantly when .
「 build by oneself MySQL/Percona」 stay 2~4 Under the pressure of threads , Overall performance ratio RDS It is better to , If the instance pressure is small , You can deploy in a self built way , Otherwise, cloud database is the first choice .
AWS The highest number of connection threads 512( exceed 1024 Report errors ), In addition, additional purchase is required IOPS, During the pressure measurement in this paper IOPS Did not buy the maximum ,gp2 and io1 The difference can be seen in the official documentation .
「 Alibaba cloud - exclusive 」 The maximum number of connection threads is 2400, because 3000 More than the max_user_connections Parameters ( Specifications limit ).
The test results of this paper are from 5 From the monthly test report , During this period, cloud vendors may have new function releases and hardware upgrades , Some conclusions may have been different when I read the article .
4.5 Test summary
Through to 「 Reading and writing 」、「 read-only 」、「 Just write 」 Pressure measurement under the scene , And take pressure measurement results QPS、TPS Of The sum of the average To statistics , obtain ( You can also look directly at the beginning of the article test result ):
- Mixed reading and writing scenarios :「 Alibaba cloud - Universal 」 The highest performance of , Higher than 「 Hua Wei Yun - Universal 」6%, Higher than 「 Tencent cloud - Universal 」13%, Higher than 「 Hua Wei Yun - exclusive 」14%, Higher than 「 Alibaba cloud - exclusive 」23%, Higher than 「 build by oneself Percona」51%, Higher than 「 build by oneself -MySQL」61%, Higher than 「AWS」66%, Higher than 「 Tencent cloud - exclusive 」72%.
Read only scenario :「 Hua Wei Yun - exclusive 」 The highest performance of , Higher than 「 Alibaba cloud - Universal 」1%, Higher than 「 Hua Wei Yun - Universal 」3%, Higher than 「 Tencent cloud - Universal 」8%, Higher than 「 Alibaba cloud - exclusive 」31%, Higher than 「AWS」52%, Higher than 「 build by oneself Percona」53%, Higher than 「 build by oneself -MySQL」66%, Higher than 「 Tencent cloud - exclusive 」72%.
Just the scene :「 Hua Wei Yun - Universal 」 The highest performance of , Higher than 「 Alibaba cloud - Universal 」4%, Higher than 「 Tencent cloud - Universal 」7%, Higher than 「 Alibaba cloud - exclusive 」31%, Higher than 「AWS」40%, Higher than 「 Tencent cloud - exclusive 」49%, Higher than 「 build by oneself Percona」63%, Higher than 「 build by oneself -MySQL」75%, Higher than 「 Hua Wei Yun 」78%.
5. summary
Pass the description of the test details , At the beginning of this article 「 test result 」, I hope that through this article , Yes, we are choosing cloud vendors RDS MySQL Products are helpful .
Last , adopt 「 Cloud manufacturers RDS MySQL How to choose 」 And the description of this article , You can see 「 cloud RDS MySQL」 No matter in the operation and maintenance capability or performance around the product, it is obviously superior to 「 build by oneself MySQL example 」, Especially under the pressure of high concurrency . So if business permits , Going to the cloud is a very good choice .
author :DBA's Record
Game programming , A game development favorite ~
If the picture is not displayed for a long time , Please use Chrome Kernel browser .
边栏推荐
- China international e-commerce center and Analysys jointly released: the national online retail development index in the fourth quarter of 2021 increased by 0.6% year on year
- Cvte side
- Esp8266/esp32 +1.3 "or 0.96" IIC OLED pointer clock
- EIG和沙特阿美签署谅解备忘录,扩大能源合作
- Summary of mapping methods (chain mapping method using hash map)
- Network multimedia -- linphone correlation analysis -- directory
- Summary of embedded development -- General Catalog
- [cloud native | kubernetes] kubernetes configuration (XV)
- 简易的安卓天气app(三)——城市管理、数据库操作
- Software architecture discussion
猜你喜欢

06. Redis log: the trump card for fast recovery without fear of downtime

2. MySQL index creation method and its optimization

Celsius 的暴雷,会是加密领域的“雷曼时刻”吗?
![Fastapi web framework [pydantic]](/img/e1/290a8a6a978b9fb56a9c86f1734c45.png)
Fastapi web framework [pydantic]

MySQL 5.7都即将停只维护了,是时候学习一波MySQL 8了

The third part of the procedure

One of the components of the program

IAAs, SaaS, PAAS, DAAS concepts

Will the thunderstorm of Celsius be the "Lehman moment" in the field of encryption?

WCF RestFul+JWT身份验证
随机推荐
送分题,ArrayList 的扩容机制了解吗?
wangeditor封装插件初步
Three elements of basic concepts and methods of machine learning
support vector machine
Introduction to ThreadPoolExecutor
启牛到底是用的什么证券开户?开户是哪家的安全吗
ThreadLocal
为什么 C# 访问 null 字段会抛异常?
Mid 2022 Summary - step by step, step by step
DSP online upgrade (1) -- understand the startup process of DSP chip
JobService的使用
DSP online upgrade (3) -- how to burn two projects in the on-chip flash of a DSP chip
Detailed explanation of connection pool parameter settings (view while adjusting)
New programmers optimize a line of code on Monday and are discouraged on Wednesday?
Error reporting using dynamic multiple data sources under the same transaction
《Feature-metric Loss for Self-supervised Learning of Depth and Egomotion》论文笔记
Les nouveaux programmeurs optimisent une ligne de code lundi et sont exhortés à se retirer mercredi?
Simple implementation of Snake game in C language
TensorFlow,危!抛弃者正是谷歌自己
Performance optimization - image compression, loading and format selection