MySQL5.7 GR VS MariaDB10.1.19 Galera Cluster性能压测

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS PostgreSQL,集群系列 2核4GB
简介:

MySQL5.7 GR VS MariaDB10.1.19 Galera Cluster性能压测
视频演示:http://pan.baidu.com/s/1sk87tfB


工具sysbench0.5 128并发 10张表100万行

硬件配置R720 64G RAID10(SAS 15000转)

192.168.143.244 gr(primary-3306端口)     Galera(secondary-3308端口)
192.168.143.245 gr(secondary-3306端口)   Galera(primary-3308端口)
192.168.143.246 gr(secondary-3306端口)   Galera(secondary-3308端口)

我们这里纯粹是为了跑性能。

gr我关闭了限流group_replication_flow_control_mode = 'DISABLED'。因数据复制是通过binlog,这里我采用基于表的并行复制,slave_parallel_type = 'LOGICAL_CLOCK',开启并行复制线程slave_parallel_workers设置了24个线程。


Galera我将gcs.fc_limit设置了1000K,调整成最大,避免限流。开启并行复制线程wsrep_slave_threads设置了24个线程。

gr压测192.168.143.244,Galera压测192.168.143.245。BP都是30G

下面废话不多说,看视频演示,数据说话!

--------------------------------------------------------------------------------
GR
[  10s] threads: 128, tps: 768.46, reads: 10937.14, writes: 2339.68, response time: 335.94ms (95%), errors: 0.00, reconnects:  0.00
[  20s] threads: 128, tps: 1009.40, reads: 14132.12, writes: 3031.30, response time: 214.42ms (95%), errors: 0.00, reconnects:  0.00
[  30s] threads: 128, tps: 1060.00, reads: 14840.01, writes: 3179.30, response time: 195.94ms (95%), errors: 0.00, reconnects:  0.00
[  40s] threads: 128, tps: 1042.69, reads: 14597.30, writes: 3129.28, response time: 203.54ms (95%), errors: 0.00, reconnects:  0.00
[  50s] threads: 128, tps: 1083.11, reads: 15163.89, writes: 3249.42, response time: 189.03ms (95%), errors: 0.00, reconnects:  0.00
[  60s] threads: 128, tps: 979.30, reads: 13710.20, writes: 2938.00, response time: 210.79ms (95%), errors: 0.00, reconnects:  0.00
[  70s] threads: 128, tps: 974.39, reads: 13641.44, writes: 2922.97, response time: 199.02ms (95%), errors: 0.00, reconnects:  0.00
[  80s] threads: 128, tps: 762.01, reads: 10593.03, writes: 2267.93, response time: 360.43ms (95%), errors: 0.00, reconnects:  0.00
[  90s] threads: 128, tps: 960.30, reads: 13519.30, writes: 2897.30, response time: 286.83ms (95%), errors: 0.00, reconnects:  0.00
[ 100s] threads: 128, tps: 1015.30, reads: 14214.20, writes: 3046.30, response time: 188.41ms (95%), errors: 0.00, reconnects:  0.00


--------------------------------------------------------------------------------------
Galera
[  10s] threads: 128, tps: 1207.93, reads: 17081.43, writes: 3656.79, response time: 113.88ms (95%), errors: 0.00, reconnects:  0.00
[  20s] threads: 128, tps: 1302.00, reads: 18227.01, writes: 3904.70, response time: 112.76ms (95%), errors: 0.00, reconnects:  0.00
[  30s] threads: 128, tps: 1287.10, reads: 18021.19, writes: 3863.00, response time: 112.79ms (95%), errors: 0.00, reconnects:  0.00
[  40s] threads: 128, tps: 1279.60, reads: 17913.70, writes: 3839.20, response time: 114.97ms (95%), errors: 0.00, reconnects:  0.00
[  50s] threads: 128, tps: 1289.80, reads: 18058.41, writes: 3869.70, response time: 114.46ms (95%), errors: 0.00, reconnects:  0.00
[  60s] threads: 128, tps: 1275.20, reads: 17850.90, writes: 3824.90, response time: 116.12ms (95%), errors: 0.00, reconnects:  0.00
[  70s] threads: 128, tps: 1243.30, reads: 17406.47, writes: 3729.99, response time: 118.15ms (95%), errors: 0.00, reconnects:  0.00
[  80s] threads: 128, tps: 1287.20, reads: 18020.37, writes: 3861.19, response time: 114.08ms (95%), errors: 0.00, reconnects:  0.00
[  90s] threads: 128, tps: 1283.20, reads: 17967.07, writes: 3850.01, response time: 114.70ms (95%), errors: 0.00, reconnects:  0.00
[ 100s] threads: 128, tps: 1261.30, reads: 17656.79, writes: 3783.50, response time: 117.41ms (95%), errors: 0.00, reconnects:  0.00


总结

GR和Galera的性能不及半同步复制,如果您对性能要求较高,数据一致性不太在意,建议用MariaDB 10.1.X Loss-Less Semi  replication+MHA高可用架构。


关于GR和Galera,在部署生产环境中多做几次压测,选择一款适合您的。




















本文转自hcymysql51CTO博客,原文链接:http://blog.51cto.com/hcymysql/1889706 ,如需转载请自行联系原作者



相关实践学习
通过性能测试PTS对云服务器ECS进行规格选择与性能压测
本文为您介绍如何利用性能测试PTS对云服务器ECS进行规格选择与性能压测。
相关文章
|
30天前
|
缓存 关系型数据库 MySQL
【深入了解MySQL】优化查询性能与数据库设计的深度总结
本文详细介绍了MySQL查询优化和数据库设计技巧,涵盖基础优化、高级技巧及性能监控。
258 0
|
1月前
|
Cloud Native 关系型数据库 MySQL
无缝集成 MySQL,解锁秒级数据分析性能极限
在数据驱动决策的时代,一款性能卓越的数据分析引擎不仅能提供高效的数据支撑,同时也解决了传统 OLTP 在数据分析时面临的查询性能瓶颈、数据不一致等挑战。本文将介绍通过 AnalyticDB MySQL + DTS 来解决 MySQL 的数据分析性能问题。
|
3月前
|
并行计算 算法 测试技术
C语言因高效灵活被广泛应用于软件开发。本文探讨了优化C语言程序性能的策略,涵盖算法优化、代码结构优化、内存管理优化、编译器优化、数据结构优化、并行计算优化及性能测试与分析七个方面
C语言因高效灵活被广泛应用于软件开发。本文探讨了优化C语言程序性能的策略,涵盖算法优化、代码结构优化、内存管理优化、编译器优化、数据结构优化、并行计算优化及性能测试与分析七个方面,旨在通过综合策略提升程序性能,满足实际需求。
99 1
|
3月前
|
缓存 关系型数据库 MySQL
MySQL索引策略与查询性能调优实战
在实际应用中,需要根据具体的业务需求和查询模式,综合运用索引策略和查询性能调优方法,不断地测试和优化,以提高MySQL数据库的查询性能。
321 66
|
3月前
|
SQL 关系型数据库 MySQL
MySQL性能探究:count(*)与count(1)的性能对决
在MySQL数据库的性能优化中,对查询语句的细微差别有着深入的理解是非常重要的。`count(*)`和`count(1)`是两种常用的聚合函数,用于计算行数。在面试中,面试官经常会问到这两种函数的性能差异。本文将探讨`count(*)`与`count(1)`的性能对比,并整理十道经典的MySQL面试题,帮助你在面试中游刃有余。
140 3
|
3月前
|
缓存 监控 关系型数据库
如何根据监控结果调整 MySQL 数据库的参数以提高性能?
【10月更文挑战第28天】根据MySQL数据库的监控结果来调整参数以提高性能,需要综合考虑多个方面的因素
137 1
|
3月前
|
监控 关系型数据库 MySQL
如何监控和诊断 MySQL 数据库的性能问题?
【10月更文挑战第28天】监控和诊断MySQL数据库的性能问题是确保数据库高效稳定运行的关键
459 1
|
3天前
|
关系型数据库 MySQL 网络安全
如何排查和解决PHP连接数据库MYSQL失败写锁的问题
通过本文的介绍,您可以系统地了解如何排查和解决PHP连接MySQL数据库失败及写锁问题。通过检查配置、确保服务启动、调整防火墙设置和用户权限,以及识别和解决长时间运行的事务和死锁问题,可以有效地保障应用的稳定运行。
47 25
|
12天前
|
关系型数据库 MySQL 数据库
Docker Compose V2 安装常用数据库MySQL+Mongo
以上内容涵盖了使用 Docker Compose 安装和管理 MySQL 和 MongoDB 的详细步骤,希望对您有所帮助。
91 42
|
26天前
|
关系型数据库 MySQL 数据库连接
数据库连接工具连接mysql提示:“Host ‘172.23.0.1‘ is not allowed to connect to this MySQL server“
docker-compose部署mysql8服务后,连接时提示不允许连接问题解决

推荐镜像

更多