MySQL Cluster 4个数据节点压力测试--mysqlslap工具压400W写
锅巴哥的个人建议:cluster叫电信运营商版本,所以基本上在很大的用户并发量的情况下才会用到,对连接数的线性增长要求高的场景,千兆就不用想了, 没万兆就不用玩了。
很不幸,我的就是千兆网络,我的数据节点是16 core,32G内存,sql节点是16core,16G内存,做了raid10
PS: 水平所限,环境所限,测试结果仅供参考,欢迎大家一起交流提出宝贵的意见,让我更进一步。
【】一:测试
20.30.50.107 3307
mysql -utim -mcgxxxxx -P3307 -h20.30.50.107 --default-character-set=utf8
1 查询测试 100W
1.1 ndbcluster 100W测试,并发分别为--concurrency=800,1200,1500
(time mysqlslap --engine=ndbcluster -h20.30.50.107 -P3307 -utim -mcgxxxxx --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> r101.log 2> r102.log
-- 20.30.50.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 100W测试,并发分别为--concurrency=800,1200,1500
-- 20.30.50.37
(time mysqlslap --engine=innodb -h20.30.50.37 -P3307 -utim -mcgxxxxx --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
mixed 混合读写压力测试
2 ndbcluster 10W
【===================10W 写 =================】
2.1 ndbcluster 在集群里面测试,并发分别为--concurrency=500,1000,1500
(time mysqlslap --engine=ndbcluster -h20.30.50.107 -P3307 -utim -mcgxxxxx --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 -h20.30.50.107 -P3307 -utim -mcgxxxxx --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 -h20.30.50.107 -P3307 -utim -mcgxxxxx --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: 3.735 seconds
Minimum number of seconds to run all queries: 3.629 seconds
Maximum number of seconds to run all queries: 3.841 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: 3.577 seconds
Minimum number of seconds to run all queries: 3.535 seconds
Maximum number of sec