Performance Test on Cloud-native Databases

本文涉及的产品
RDS AI 助手,专业版
PolarDB Agent Express,2核4GB
云数据库 PolarDB MySQL 版,列存表分析加速 4核8GB
简介: 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 
相关文章
|
机器学习/深度学习 存储 算法
sklearn应用线性回归算法
sklearn应用线性回归算法
|
11月前
|
存储 安全 JavaScript
如何使用Set的add()方法添加元素?
如何使用Set的add()方法添加元素?
871 58
|
设计模式 监控 数据库
代理模式(Proxy Pattern)
代理模式(Proxy Pattern)是一种设计模式,通过一个中间对象(代理)来间接访问目标对象,以控制访问权限或添加额外功能。常见的代理类型包括远程代理、虚拟代理、保护代理和智能引用代理。代理模式常用于延迟加载、权限控制、日志记录等场景,能够提高系统的灵活性和安全性。
|
存储 弹性计算 运维
快速部署 K3s 社区版
K3s 是轻量级的 Kubernetes。K3s 易于安装,仅需要 Kubernetes 内存的一半,所有组件都在一个小于 100 MB 的二进制文件中。K3s 是一个完全兼容的 Kubernetes 发行版。本文向您介绍如何通过计算巢快速部署K3s社区版。
快速部署 K3s 社区版
|
数据库 数据安全/隐私保护
共享锁和排他锁在实际应用中的优缺点
【10月更文挑战第16天】共享锁和排他锁是多进程和多线程环境中常用的同步机制,它们各自具有优点和缺点。在实际应用中,需要根据具体的场景和需求选择合适的锁类型。在选择锁时,需要考虑读写比例、数据一致性要求、系统性能、死锁风险等因素,并结合实际情况进行优化和调整。通过合理使用锁,可以提高系统的并发性、数据一致性和性能。
|
机器学习/深度学习 Java Nacos
Nacos实战之配置中心与注册中心详解
Nacos实战之配置中心与注册中心详解
Nacos实战之配置中心与注册中心详解
工作流引擎WorkFlow开源项目
1、WorkFlowEngine      https://workflowengine.io/downloads/ ...
9801 0
|
运维 安全 数据中心
【Terraform实现云服务基础设施既代码(IaC)案例实战-1】:树苗科技公司的自动化转型之旅
背景树苗科技公司业务上云2年有余,随着技术的不断发展。运维团队支持业务变更配置、开资源、删资源等过程加班到深夜一两点已是家常便饭。为了进一步提升工作效率,运维总监张三决定对当前业务交付路径进行统一梳理,借助IaC的理念和Terraform自动化工具逐步实施运维生产自动化,改善组内成员频繁加班的现状。...
936 57
|
Linux Shell Perl
Linux环境下的字符串处理:基础到高级
在Linux系统中,字符串处理是一个非常常见的任务,无论是在系统管理、文本处理还是脚本编程中。本文将从基础的字符串操作开始,逐步深入,介绍Linux下的字符串处理技术,包括基础的命令行操作、常见的文本处理工具、Shell脚本中的字符串操作等。
640 1
|
存储 小程序 Java
基于SpringBoot+Redis的前后端分离外卖项目-苍穹外卖微信小程序端(九)
基于SpringBoot+Redis的前后端分离外卖项目-苍穹外卖微信小程序端(九)

热门文章

最新文章