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

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS PostgreSQL,高可用系列 2核4GB
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介:

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 ,如需转载请自行联系原作者



相关文章
|
2月前
|
缓存 关系型数据库 BI
使用MYSQL Report分析数据库性能(下)
使用MYSQL Report分析数据库性能
105 3
|
2月前
|
关系型数据库 MySQL 数据库
阿里云数据库RDS费用价格:MySQL、SQL Server、PostgreSQL和MariaDB引擎收费标准
阿里云RDS数据库支持MySQL、SQL Server、PostgreSQL、MariaDB,多种引擎优惠上线!MySQL倚天版88元/年,SQL Server 2核4G仅299元/年,PostgreSQL 227元/年起。高可用、可弹性伸缩,安全稳定。详情见官网活动页。
|
2月前
|
关系型数据库 分布式数据库 数据库
阿里云数据库收费价格:MySQL、PostgreSQL、SQL Server和MariaDB引擎费用整理
阿里云数据库提供多种类型,包括关系型与NoSQL,主流如PolarDB、RDS MySQL/PostgreSQL、Redis等。价格低至21元/月起,支持按需付费与优惠套餐,适用于各类应用场景。
|
2月前
|
缓存 监控 关系型数据库
使用MYSQL Report分析数据库性能(上)
最终建议:当前系统是完美的读密集型负载模型,优化重点应放在减少行读取量和提高数据定位效率。通过索引优化、分区策略和内存缓存,预期可降低30%的CPU负载,同时保持100%的缓冲池命中率。建议每百万次查询后刷新统计信息以持续优化
185 6
|
2月前
|
缓存 监控 关系型数据库
使用MYSQL Report分析数据库性能(中)
使用MYSQL Report分析数据库性能
124 1
|
2月前
|
关系型数据库 MySQL 数据库
阿里云数据库RDS支持MySQL、SQL Server、PostgreSQL和MariaDB引擎
阿里云数据库RDS支持MySQL、SQL Server、PostgreSQL和MariaDB引擎,提供高性价比、稳定安全的云数据库服务,适用于多种行业与业务场景。
|
3月前
|
缓存 关系型数据库 MySQL
MySQL数据库性能调优:实用技术与策略
通过秉持以上的策略实施具体的优化措施,可以确保MySQL数据库的高效稳定运行。务必结合具体情况,动态调整优化策略,才能充分发挥数据库的性能潜力。
169 0
|
5月前
|
关系型数据库 MySQL 分布式数据库
Super MySQL|揭秘PolarDB全异步执行架构,高并发场景性能利器
阿里云瑶池旗下的云原生数据库PolarDB MySQL版设计了基于协程的全异步执行架构,实现鉴权、事务提交、锁等待等核心逻辑的异步化执行,这是业界首个真正意义上实现全异步执行架构的MySQL数据库产品,显著提升了PolarDB MySQL的高并发处理能力,其中通用写入性能提升超过70%,长尾延迟降低60%以上。
|
2月前
|
关系型数据库 MySQL 数据库
自建数据库如何迁移至RDS MySQL实例
数据库迁移是一项复杂且耗时的工程,需考虑数据安全、完整性及业务中断影响。使用阿里云数据传输服务DTS,可快速、平滑完成迁移任务,将应用停机时间降至分钟级。您还可通过全量备份自建数据库并恢复至RDS MySQL实例,实现间接迁移上云。
|
3月前
|
存储 运维 关系型数据库
从MySQL到云数据库,数据库迁移真的有必要吗?
本文探讨了企业在业务增长背景下,是否应从 MySQL 迁移至云数据库的决策问题。分析了 MySQL 的优势与瓶颈,对比了云数据库在存储计算分离、自动化运维、多负载支持等方面的优势,并提出判断迁移必要性的五个关键问题及实施路径,帮助企业理性决策并落地迁移方案。

推荐镜像

更多