MySQL Cluster2个数据节点压力测试--mysqlslap工具压400W写
锅巴哥的个人建议:cluster叫电信运营商版本,所以基本上在很大的用户并发量的情况下才会用到,对连接数的线性增长要求高的场景,千兆就不用想了, 没万兆就不用玩了。
很不幸,我的就是千兆网络,我的数据节点是16 core,32G内存,sql节点是16core,16G内存,做了raid10
PS: 水平所限,环境所限,测试结果仅供参考,欢迎大家一起交流提出宝贵的意见,让我更进一步。
1【】一:测试
10.80.40.107 3307
mysql -utim -pxxxxxxxx -P3307 -h10.80.40.107 --default-character-set=utf8
-- select 查询测试 100W 数据压力测试
1.1 ndbcluster
(time mysqlslap --engine=ndbcluster -h10.80.40.107 -P3307 -utim -pxxxxxxxx --auto-generate-sql-guid-primary --concurrency=500,1000,1500 --number-of-queries=1000000 --iterations=2 --number-char-cols=10 --number-int-cols=10 --auto-generate-sql --create-schema=rdb10
--auto-generate-sql-load-type=read ) 1> r101.log 2> r102.log
-- 20.40.30.31
(time mysqlslap --engine=ndbcluster --auto-generate-sql-guid-primary --concurrency=800,1200,1500 --number-of-queries=1000000 --iterations=2 --number-char-cols=10 --number-int-cols=10 --auto-generate-sql --create-schema=rdb10 --auto-generate-sql-load-type=read
) 1> /root/r101.log 2> /root/r102.log
1.2 innodb
-- 20.40.30.37
(time mysqlslap --engine=innodb -h20.40.30.37 -P3307 -utim -pxxxxxxxx --auto-generate-sql-guid-primary --concurrency=800,1200,1500 --number-of-queries=1000000 --iterations=2 --number-char-cols=10 --number-int-cols=10 --auto-generate-sql --create-schema=idb10
--auto-generate-sql-load-type=read ) 1> /root/rin101.log 2> /root/rin102.log
2 mixed 读写混合压力测试
ndbcluster 10W
2.1【===================10W 写 =================】
-- ndbcluster 在集群里面测试
2.1.1 ndbcluster 10W测试,并发分别为--concurrency=500,1000,1500
(time mysqlslap --engine=ndbcluster -h10.80.40.107 -P3307 -utim -pxxxxxxxx --auto-generate-sql-write-number=1000 --auto-generate-sql-guid-primary --concurrency=500 --number-of-queries=100000 --iterations=2 --number-char-cols=10 --number-int-cols=10
--auto-generate-sql --create-schema=ndb10 –-commint=100 --auto-generate-sql-load-type=write)
(time mysqlslap --engine=ndbcluster -h10.80.40.107 -P3307 -utim -pxxxxxxxx --auto-generate-sql-write-number=1000 --auto-generate-sql-guid-primary --concurrency=1000 --number-of-queries=100000 --iterations=2 --number-char-cols=10 --number-int-cols=10 --auto-generate-sql
--create-schema=ndb10 –-commint=100 --auto-generate-sql-load-type=write)
(time mysqlslap --engine=ndbcluster -h10.80.40.107 -P3307 -utim -pxxxxxxxx --auto-generate-sql-write-number=1000 --auto-generate-sql-guid-primary --concurrency=1500 --number-of-queries=100000 --iterations=2 --number-char-cols=10 --number-int-cols=10 --auto-generate-sql
--create-schema=ndb10 –-commint=100 --auto-generate-sql-load-type=write)
Benchmark
Running for engine ndbcluster
Average number of seconds to run all queries: 4.885 seconds
Minimum number of seconds to run all queries: 4.729 seconds
Maximum number of seconds to run all queries: 5.041 seconds
Number of clients running queries: 500
Average number of queries per client: 200
Benchmark
Running for engine ndbcluster
Average number of seconds to run all queries: 5.948 seconds
Minimum number of seconds to run all queries: 5.399 seconds
Maximum number of second