Performance Test on Cloud-native Databases

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云原生数据库 PolarDB PostgreSQL 版,标准版 2核4GB 50GB
简介: Performance Test on Cloud-native Databases

Hello,I'm binghe~~

In the past few years, we have seen explosive growth in the cloud database market, with fierce competition between service providers aiming for the top. Notable contenders in this space include AWS Aurora, Alibaba Cloud PolarDB, and Huawei GaussDB.

Having been a MySQL practitioner for many years and published A Practical Guide for MySQL Development, Optimization, and O&M, I frequently receive messages from database administrators and architects at companies who are ready to make the leap to cloud, asking for advice on selecting cloud database services. To make things simple, we can make reliable choices around two major indicators – stability and performance. In this article, I'll test and compare the performance of five database services: PolarDB, ApsaraDB for OceanBase, Aurora, GaussDB, and TDSQL-C. The tests will be performed on these databases with the default configurations to provide a baseline reference.

Abstract

In the low-specification category (8 cores, 64 GB), PolarDB outperforms its contenders across the board in both CPU-bound and I/O-bound tests.

In the high-specification category (64 cores, 512 GB), PolarDB also leads with considerable margin. Largely outperforming its contenders in both CPU-bound and I/O-bound tests, PolarDB has demonstrated its edge in today's cloud database offerings.

It is also worth mentioning that in both categories, we can see an obvious deterioration in performance on Aurora databases in read-write and write-only scenarios.

image.pngimage.png

Figure 2. Test results of the instances in the low-specification category (8 cores, 64 GB)

Scope

The following MySQL-compatible database services are tested:

  • PolarDB by Alibaba Cloud
  • Aurora by Amazon Web Services
  • ApsaraDB for OceanBase by Ant Group
  • GaussDB by HUAWEI CLOUD
  • TDSQL-C by Tencent Cloud

Controlled Variables

Public cloud database instances are purchased from the cloud service providers and tested out-of-the-box, with no post-configuration. For this test, database instances are divided into two categories, the low-specification category (8 cores, 64 GB), and the high-specification category (64 cores, 512 GB). All instances run MySQL 8.0 and are deployed in the primary/secondary architecture.

Note: ApsaraDB for OceanBase does not offer a 64-core, 512 GB instance type. The 62-core, 400 GB instance type is used instead.

Testing Configurations

CPU-bound and I/O-bound tests are performed on the database services by using the same scripts for each test.

The test results are returned in the following format:

Case Database name, number of tables, table sizes, number of threads, cloud server name, QPS

Where:

  • Case: the name of the test script used, which is indicative of the read/write mode. Test scripts used: oltp_read_only, oltp_read_write, and oltp_write_only.
  • Database name: the name of the database. Databases used in CPU-bound tests are named tpk_s, while those in I/O-bound tests are named tpk_l.
  • Number of tables: the number of tables in each database. Ten tables are specified for each database.
  • Table sizes: the number of rows in each table. In CPU-bound tests, each table contains 10 million rows of data. In I/O-bound tests, the table sizes vary based on the category. Tables in the low-specification category contain 40 million rows each, and tables in the high-specification category contain 300 million rows each.
  • Number of threads: the number of threads used to perform the test. The number of threads used vary based on the category of the tests. Tests on the low-specification category involve a minimum of 1 thread and a maximum of 128 threads. Tests on the high-specification category involve a minimum of 1 thread and a maximum of 300 threads.
  • Cloud server name: the name of the cloud server instance where the database is deployed. Test scripts are not stored in this cloud server.
  • QPS: the QPS value, grouped by the number of threads.

The Comparative Analysis section provides side-to-side comparisons of the performance metrics outlined in the preceding section. Raw results from the tests are included in the Tests results section, and are grouped by services.

Comparative Analysis

Low-specification category (8 cores, 64 GB)

The tables in this section provide side-to-side comparisons for databases in the low-specification category.

CPU-bound tests

1)oltp_read_only

Database QPS (128 threads) QPS (1 thread)
PolarDB 95,863.56 5,184.38
ApsaraDB  for OceanBase 61,068.59 1,953.32
Aurora 69,933.45 3,183.13
GaussDB 85,244.76 5,638.32
TDSQL-C 94,343.16 4,091.835

2)oltp_read_write

Database QPS (128 threads) QPS (1 thread)
PolarDB 82,701.53 4,809.97
ApsaraDB  for OceanBase 39,874.51 1,801.23
Aurora 42,649.67 2,465.01
GaussDB 58,522.77 4,896.80
TDSQL-C 61,997.33 2,661.6075

3)oltp_write_only

Database QPS (128 threads) QPS (1 thread)
PolarDB 96,784.14 4,617.05
ApsaraDB  for OceanBase 31,767.13 1,648.32
Aurora 35,598.10 1,484.75
GaussDB 58,697.92 2,216.81
TDSQL-C 53,867.95 1,799.2725

The CPU-bound test results show that PolarDB outperforms its contenders in every test metric.

I/O-bound tests

1)oltp_read_only

Database QPS (128 threads) QPS (1 thread)
PolarDB 67,105.08 2,943.15
ApsaraDB  for OceanBase 33,997.1 1,684.21
Aurora 30,695.90 1,056.77
GaussDB 24,423.91 1,927.34
TDSQL-C 48,069.14 2,032.22

2)oltp_read_write

Database QPS (128 threads) QPS (1 thread)
PolarDB 61,093.90 2,891.23
ApsaraDB  for OceanBase 29,325.76 1,582.34
Aurora 21,751.73 683.03
GaussDB 90,774.04 4,896.80
TDSQL-C 38,388.89 1,667.94

3)oltp_write_only

Database QPS (128 threads) QPS (1 thread)
PolarDB 61,438.08 2,602.82
ApsaraDB  for OceanBase 29,876.21 1,503.22
Aurora 23,290.39 1,001.32
GaussDB 41,209.88 1,638.43
TDSQL-C 40,414.65 1,559.45

In the I/O-bound tests, PolarDB also emerged as the clear winner in every test metric.

High-specification category (64 cores, 512 GB)

The tables in this section provide side-to-side comparisons for databases in the high-specification category.

CPU-bound tests

1)oltp_read_only

Database QPS (300 threads) QPS (1 thread)
PolarDB 583,481.91 5,299.95
ApsaraDB  for OceanBase 210,599.67 1,979.00
Aurora 460,661.52 3,953.16
GaussDB 324,943.02 5,238.16
TDSQL-C 345,769.06 4,102.13

2)oltp_read_write

Database QPS (300 threads) QPS (1 thread)
PolarDB 459,306.28 4,998.68
ApsaraDB  for OceanBase 161,787.02 1,725.00
Aurora 161,193.67 2,330.50
GaussDB 231,511.89 3,528.90
TDSQL-C 259,070.85 2,648.34

3)oltp_write_only

Database QPS (300 threads) QPS (1 thread)
PolarDB 415,477.31 5,025.55
ApsaraDB  for OceanBase 102,735.32 1,636.21
Aurora 52,484.71 1,282.10
GaussDB 195,454.50 2,077.85
TDSQL-C 122,732.32 1,799.2725

The CPU-bound test results show that PolarDB outperforms its contenders in every test metric.

I/O-bound tests

1)oltp_read_only

Database QPS (300 threads) QPS (1 thread)
PolarDB 379,448.39 3,205.95
ApsaraDB  for OceanBase 186,231.85 1,663.59
Aurora 162,073.88 908.75
GaussDB 202,102.54 2,438.24
TDSQL-C 130,938.23 2,203.23

2)oltp_read_write

Database QPS (300 threads) QPS (1 thread)
PolarDB 323,182.93 3,147.55
ApsaraDB  for OceanBase 142,723.88 1,592.08
Aurora 75,080.03 807.78
GaussDB 164,403.19 2,243.14
TDSQL-C 112,711.66 1,782.34

3)oltp_write_only

Database QPS (300 threads) QPS (1 thread)
PolarDB 335,549.53 3,751.35
ApsaraDB  for OceanBase 99,543.00 1,447.24
Aurora 26,616.15 748.74
GaussDB 152,426.14 2,254.31
TDSQL-C 72,023.23 1,582.23

In the I/O-bound tests, PolarDB also emerged as the clear winner in every test metric, with obvious performance gains compared to its contenders.

Test Results

This section contains the raw results of the tests performed in this article. To ensure the fairness of the tests, all tests are performed on out-of-the-box offerings of different service providers. Controlled variables and testing configurations used for these tests can be found in their corresponding sections.

Low-specification category (8 cores, 64GB)

PolarDB

1)CPU-bound tests

Read  or write mode Number  of tables Table  size Threads  (Max) Threads  (Min) QPS  (128 threads) QPS  (1 thread)
oltp_read_only 10 10,000,000 128 1 95,863.56 5,184.38
oltp_read_write 10 10,000,000 128 1 82,701.53 4,809.97
oltp_write_only 10 10,000,000 128 1 96,784.14 4,617.05

2)I/O-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (128 threads) QPS (1 thread)
oltp_read_only 10 40,000,000 128 1 67,105.08 2,943.15
oltp_read_write 10 40,000,000 128 1 61,093.90 2,891.23
oltp_write_only 10 40,000,000 128 1 61,438.08 2,602.82

ApsaraDB for OceanBase

1)CPU-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (128 threads) QPS (1 thread)
oltp_read_only 10 10,000,000 128 1 61,068.59 1,953.32
oltp_read_write 10 10,000,000 128 1 39,874.51 1,801.23
oltp_write_only 10 10,000,000 128 1 31,767.13 1,648.32

2)I/O-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (128 threads) QPS (1 thread)
oltp_read_only 10 40,000,000 128 1 33,997.1 1,684.21
oltp_read_write 10 40,000,000 128 1 29,325.76 1,582.34
oltp_write_only 10 40,000,000 128 1 29,876.21 1,503.22

Aurora

1)CPU-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (128 threads) QPS (1 thread)
oltp_read_only 10 10,000,000 128 1 69,933.45 3,183.13
oltp_read_write 10 10,000,000 128 1 42,649.67 2,465.01
oltp_write_only 10 10,000,000 128 1 35,598.10 1,484.75

2)I/O-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (128 threads) QPS (1 thread)
oltp_read_only 10 40,000,000 128 1 30,695.90 1,056.77
oltp_read_write 10 40,000,000 128 1 21,751.73 683.03
oltp_write_only 10 40,000,000 128 1 23,290.39 1,001.32

GaussDB

1)CPU-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (128 threads) QPS (1 thread)
oltp_read_only 10 10,000,000 128 1 85,244.76 5,638.32
oltp_read_write 10 10,000,000 128 1 58,522.77 4,896.80
oltp_write_only 10 10,000,000 128 1 58,697.92 2,216.81

2)I/O-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (128 threads) QPS (1 thread)
oltp_read_only 10 40,000,000 128 1 24,423.91 1,927.34
oltp_read_write 10 40,000,000 128 1 23,178.85 1,703.34
oltp_write_only 10 40,000,000 128 1 41,209.88 1,638.43

TDSQL-C

1)CPU-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (128 threads) QPS (1 thread)
oltp_read_only 10 10,000,000 128 1 94,343.16 4,091.835
oltp_read_write 10 10,000,000 128 1 61,997.33 2,661.6075
oltp_write_only 10 10,000,000 128 1 53,867.95 1,799.2725

2)I/O-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (128 threads) QPS (1 thread)
oltp_read_only 10 40,000,000 128 1 48,069.14 2,032.22
oltp_read_write 10 40,000,000 128 1 38,388.89 1,667.94
oltp_write_only 10 40,000,000 128 1 40,414.65 1,559.45

High-specification category (64 cores, 512 GB)

PolarDB

1)CPU-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (300 threads) QPS (1 thread)
oltp_read_only 10 10,000,000 300 1 583,481.91 5,299.95
oltp_read_write 10 10,000,000 300 1 459,306.28 4,998.68
oltp_write_only 10 10,000,000 300 1 415,477.31 5,025.55

2)I/O-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (300 threads) QPS (1 thread)
oltp_read_only 10 300,000,000 300 1 379,448.39 3,205.95
oltp_read_write 10 300,000,000 300 1 323,182.93 3,147.55
oltp_write_only 10 300,000,000 300 1 335,549.53 3,751.35

ApsaraDB for OceanBase

1)CPU-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (300 threads) QPS (1 thread)
oltp_read_only 10 10,000,000 300 1 210,599.67 1,979.00
oltp_read_write 10 10,000,000 300 1 161,787.02 1,725.00
oltp_write_only 10 10,000,000 300 1 102,735.32 1,636.21

2)I/O-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (300 threads) QPS (1 thread)
oltp_read_only 10 300,000,000 30 1 186,231.85 1,663.59
oltp_read_write 10 300,000,000 30 1 142,723.88 1,592.08
oltp_write_only 10 300,000,000 30 1 99,543.00 1,447.24

Aurora

1)CPU-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (300 threads) QPS (1 thread)
oltp_read_only 10 10,000,000 300 1 460,661.52 3,953.16
oltp_read_write 10 10,000,000 300 1 161,193.67 2,330.50
oltp_write_only 10 10,000,000 300 1 52,484.71 1,282.10

2)I/O-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (300 threads) QPS (1 thread)
oltp_read_only 10 300,000,000 300 1 162,073.88 908.75
oltp_read_write 10 300,000,000 300 1 75,080.03 807.78
oltp_write_only 10 300,000,000 300 1 26,616.15 748.74

GaussDB

1)CPU-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (300 threads) QPS (1 thread)
oltp_read_only 10 10,000,000 300 1 324,943.02 5,238.16
oltp_read_write 10 10,000,000 300 1 231,511.89 3,528.90
oltp_write_only 10 10,000,000 300 1 195,454.50 2,077.85

2)I/O-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (300 threads) QPS (1 thread)
oltp_read_only 10 300,000,000 300 1 202,102.54 2,438.24
oltp_read_write 10 300,000,000 300 1 164,403.19 2,243.14
oltp_write_only 10 300,000,000 300 1 152,426.14 2,254.31

TDSQL-C

1)CPU-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (300 threads) QPS (1 thread)
oltp_read_only 10 10,000,000 300 1 345,769.06 4,102.13
oltp_read_write 10 10,000,000 300 1 259,070.85 2,648.34
oltp_write_only 10 10,000,000 300 1 122,732.32 1,799.2725

2)I/O-bound tests

Read or write mode Number of tables Table size Threads (Max) Threads (Min) QPS (300 threads) QPS (1 thread)
oltp_read_only 10 300,000,000 300 1 130,938.23 2,203.23
oltp_read_write 10 300,000,000 300 1 112,711.66 1,782.34
oltp_write_only 10 300,000,000 300 1 72,023.23 1,582.23

Well, let's call it a day. I'm binghe. See you next time~~

收录于合集 #架构师进阶系列

10

下一篇复盘:我在真实场景下对几款主流云原生数据库进行极限性能压测的一次总结!!(建议收藏)



相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
2月前
|
SQL 关系型数据库 MySQL
介绍5款 世界范围内比较广的 5款 mysql Database Management Tool
介绍5款 世界范围内比较广的 5款 mysql Database Management Tool
114 0
Query Performance Optimization at Alibaba Cloud Log Analytics Service
PrestoCon Day 2023,链接:https://prestoconday2023.sched.com/event/1Mjdc?iframe=no首页自我介绍,分享题目概要各个性能优化项能够优化的资源类别limit快速短路有什么优点?有啥特征?进一步的优化空间?避免不必要块的生成逻辑单元分布式执行,global 阶段的算子哪些字段无需输出?公共子表达式结合FilterNode和Proje
Query Performance Optimization at Alibaba Cloud Log Analytics Service
|
SQL 关系型数据库 RDS
Troubleshooting High CPU Usage on Alibaba Cloud SQL Server
A primary issue with SQL Server is its sensitivity to latency, often resulting in performance issues.
1363 0
Troubleshooting High CPU Usage on Alibaba Cloud SQL Server
|
关系型数据库 MySQL RDS
Implementing Effective MySQL Database Backup Mechanisms
Alibaba Cloud ApsaraDB for RDS for MySQL provides a variety of methods to synchronize data to a local self-built database.
1516 0
|
SQL 固态存储 OLAP
Alibaba Cloud Database group's Academic programs and Recruitment information
We are hiring technical experts   Database Kernel Expert: Job Description: Alibaba Cloud ApsaraDB team is well known for database products, includi.
2008 0
|
Web App开发 Java Apache
Cannot determine embedded database driver class for database type NONE
这个问题要从“  java.io.IOException: Server returned HTTP response code: 403 for URL: http://start.spring.
3246 0
|
Java Spring Maven
深入Spring Boot:怎样排查 Cannot determine embedded database driver class for database type NONE
写在前面 这个demo来说明怎么一步步排查一个常见的spring boot AutoConfiguration的错误。 https://github.
3757 0
|
负载均衡 Oracle 关系型数据库