Performance Test on Cloud-native Databases

本文涉及的产品
RDS MySQL DuckDB 分析主实例,集群系列 4核8GB
RDS AI 助手,专业版
简介: 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

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



相关实践学习
每个IT人都想学的“Web应用上云经典架构”实战
本实验从Web应用上云这个最基本的、最普遍的需求出发,帮助IT从业者们通过“阿里云Web应用上云解决方案”,了解一个企业级Web应用上云的常见架构,了解如何构建一个高可用、可扩展的企业级应用架构。
MySQL数据库入门学习
本课程通过最流行的开源数据库MySQL带你了解数据库的世界。   相关的阿里云产品:云数据库RDS MySQL 版 阿里云关系型数据库RDS(Relational Database Service)是一种稳定可靠、可弹性伸缩的在线数据库服务,提供容灾、备份、恢复、迁移等方面的全套解决方案,彻底解决数据库运维的烦恼。 了解产品详情: https://www.aliyun.com/product/rds/mysql 
相关文章
|
设计模式 存储 Java
深拷贝与浅拷贝,就是这么简单
深拷贝与浅拷贝,就是这么简单
|
前端开发 JavaScript Java
图解HTTP请求Tomcat服务器实现前后端交互-1
图解HTTP请求Tomcat服务器实现前后端交互
466 0
|
存储 数据采集 人工智能
以Trace为核心的根因分析概述
近期一直在学习和复现“根因分析”领域的相关文章,在这里跟大家一起分享下相关内容。这里不在赘述关于“可观测性”和“AIOps”的重要性和必要性,也不过多的陈述在“复杂系统”中进行快速根因诊断的必要性,直接进入到相关算法和系统设计部分。
2394 0
以Trace为核心的根因分析概述
|
SQL 消息中间件 JSON
datafaker --- 测试数据生成工具
本文介绍如何使用datafaker工具生成测试数据
|
关系型数据库 MySQL Docker
docker 安装 mysql(arm64)
docker 安装 mysql(arm64)
2016 0
|
10月前
|
Shell 网络安全 虚拟化
XPipe:一款新型开源终端管理神器
XPipe 是一款创新的 Shell 连接中心和远程文件管理器,它能够让你从本地机器轻松访问整个服务器基础设施。这款工具运行在你已安装的命令行程序之上,无需在远程系统上进行任何额外配置。因此,如果你通常使用 CLI 工具(如 ssh、docker、kubectl 等)来连接服务器,你可以直接在 XPipe 上使用这些工具,极大地简化了操作流程。
576 15
XPipe:一款新型开源终端管理神器
|
11月前
|
存储 关系型数据库 数据库
华为数据库openGauss与PostgreSQL使用对比
华为openGauss数据库基于PostgreSQL内核演进,进行了多项增强。密码认证从MD5升级为SHA256;字符串存储中,char(n)、varchar(n)的n由字符改为字节,新增nvarchar2(n)表示字符,最大存储100MB;且将空字符''统一转换为null,提升了数据处理的一致性和安全性。
1022 12
|
监控 网络协议 安全
DNS服务器故障不容小觑,从应急视角谈DNS架构
DNS服务器故障不容小觑,从应急视角谈DNS架构
325 4
|
JSON IDE Java
创建一个简单的Spring Boot Web项目
创建一个简单的Spring Boot Web项目
508 1