MySQL 的性能测试IP :192.168.1.249。

2年前 (2016-03-31) admin mysql 0评论 已收录 6016℃
  1. MySQL 5.6.19x64系统版本CentOS release 6.6_x_64 的性能测试IP :192.168.1.249这台服务器/data目录挂载一块三星ssd 1TB固态硬盘。

mysqlslap -uroot -p123123123 --concurrency=1000 --iterations=1 --auto-generate-sql --auto-generate-sql-load-type=mixed --auto-generate-sql-add-autoincrement --engine=myisam --number-of-queries=10 --debug-info

#备注本次测试以1000个并发线程、测试1次,自动生成SQL测试脚本、读、写、更新混合测试、自增长字段、测试引擎为myisam、共运行10次查询,输出cpu资源信息

Running for engine myisam
运行引擎MyISAM
Average number of seconds to run all queries: 0.831 seconds
平均秒数运行所有查询:0.611秒
Minimum number of seconds to run all queries: 0.831 seconds
最小秒数,运行所有查询:0.631秒
Maximum number of seconds to run all queries: 0.831 seconds
最大秒数运行所有查询:0.631秒
Number of clients running queries: 1000
运行查询的客户数:1000
Average number of queries per client: 0
每个客户的平均查询数:0
User time 0.27, System time 0.51
用户时间0.27,系统时间0.51
Maximum resident set size 41288, Integral resident set size 0
最大驻留集大小为41288,积分驻留集合大小为0
Non-physical pagefaults 8198, Physical pagefaults 0, Swaps 0
非物理故障数目8198,物理故障数目0,掉期0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
块0出0,信息在0出0,信号0
Voluntary context switches 37694, Involuntary context switches 46

自愿的上下文切换37694,非自愿的上下文切换46
##############################################################
假如以5000个并发线程、测试1次,自动生成SQL测试脚本、读、写、更新混合测试、自增长字段、测试引擎为myisam、共运行10次查询,输出cpu资源信息
mysqlslap -uroot -p123123123 --concurrency=5000 --iterations=1 --auto-generate-sql --auto-generate-sql-load-type=mixed --auto-generate-sql-add-autoincrement --engine=myisam --number-of-queries=10 --debug-info;
运行引擎MyISAM
Average number of seconds to run all queries: 7.201 seconds
平均秒数运行所有查询:7.201秒
Minimum number of seconds to run all queries: 7.201 seconds
最小秒数,运行所有查询:7.201秒
Maximum number of seconds to run all queries: 7.201 seconds
最大秒数运行所有查询:7.201秒
Number of clients running queries: 5000
运行查询的客户数:5000
Average number of queries per client: 0
每个客户的平均查询数:0
User time 1.37, System time 2.80
用户时间1.37,系统时间2.80
Maximum resident set size 217496, Integral resident set size 0
最大驻留集大小为217496,积分驻留集合大小为0
Non-physical pagefaults 36187, Physical pagefaults 0, Swaps 0
非物理故障数目36187,物理故障数目0,掉期0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
块0出0,信息在0出0,信号0
Voluntary context switches 203565, Involuntary context switches 143

自愿的上下文切换203565,非自愿的上下文切换143
################################
.测试时mysql的连接1000个进程数
mysqlslap -a -c 1000 -i 10 -uroot -p123123123
Average number of seconds to run all queries: 3.607 seconds
平均秒数运行所有查询:3.607秒
Minimum number of seconds to run all queries: 2.826 seconds
最小秒数,运行所有查询:2.826秒
Maximum number of seconds to run all queries: 4.641 seconds
最大秒数运行所有查询:4.641秒
Number of clients running queries: 1000
运行查询的客户数:1000
Average number of queries per client: 0
每个客户的平均查询数:0

**************************************************************************************************************************************************************************
mysqlslap -a --concurrency=500,1000 --number-of-queries 1000 --iterations=5 --engine=myisam,innodb --debug-info -uroot -p123123123
运行引擎MyISAM
Average number of seconds to run all queries: 0.142 seconds
平均秒数运行所有查询:0.142秒
Minimum number of seconds to run all queries: 0.134 seconds
最小秒数,运行所有查询:0.134秒
Maximum number of seconds to run all queries: 0.175 seconds
最大秒数运行所有查询:0.175秒
Number of clients running queries: 500
运行查询的客户数:500
Average number of queries per client: 2
每个客户的平均查询数:2
Running for engine myisam
运行引擎MyISAM
Average number of seconds to run all queries: 0.193 seconds
平均秒数运行所有查询:0.193秒
Minimum number of seconds to run all queries: 0.189 seconds
最小秒数,运行所有查询:0.189秒
Maximum number of seconds to run all queries: 0.195 seconds
最大秒数运行所有查询:0.195秒
Number of clients running queries: 1000
运行查询的客户数:1000
Average number of queries per client: 1
每个客户端的平均查询数:1
Benchmark
基准
Running for engine innodb
运行引擎InnoDB
Average number of seconds to run all queries: 0.238 seconds
平均秒数运行所有查询:0.238秒
Minimum number of seconds to run all queries: 0.210 seconds
最小秒数,运行所有查询:0.210秒
Maximum number of seconds to run all queries: 0.280 seconds
最大秒数运行所有查询:0.280秒
Number of clients running queries: 500
运行查询的客户数:500
Average number of queries per client: 2
每个客户的平均查询数:2
Benchmark
基准
Running for engine innodb
运行引擎InnoDB
Average number of seconds to run all queries: 0.196 seconds
平均秒数运行所有查询:0.196秒
Minimum number of seconds to run all queries: 0.186 seconds
最小秒数,运行所有查询:0.186秒
Maximum number of seconds to run all queries: 0.207 seconds
最大秒数运行所有查询:0.207秒
Number of clients running queries: 1000
运行查询的客户数:1000
Average number of queries per client: 1
每个客户端的平均查询数:1
User time 2.18, System time 6.25
用户时间2.18,系统时间6.25
Maximum resident set size 31524, Integral resident set size 0
最大驻留集大小为31524,积分驻留集合大小为0
Non-physical pagefaults 109796, Physical pagefaults 0, Swaps 0
非物理故障数目109796,物理故障数目0,掉期0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
块0出0,信息在0出0,信号0
Voluntary context switches 253328, Involuntary context switches 1955

自愿的上下文切换253328,非自愿的上下文切换1955
##############################################################################################################################
执行一次测试,分别50和100个并发,执行1000次总查询:
Warning: Using a password on the command line interface can be insecure.
警告:使用命令行界面上的密码可能是不安全的。
Benchmark
基准
Average number of seconds to run all queries: 0.087 seconds
平均秒数运行所有查询:0.087秒
Minimum number of seconds to run all queries: 0.087 seconds
最小秒数,运行所有查询:0.087秒
Maximum number of seconds to run all queries: 0.087 seconds
最大秒数运行所有查询:0.087秒
Number of clients running queries: 50
运行查询的客户数:50
Average number of queries per client: 20
每个客户的平均查询数:20
Benchmark
基准
Average number of seconds to run all queries: 0.096 seconds
平均秒数运行所有查询:0.096秒
Minimum number of seconds to run all queries: 0.096 seconds
最小秒数,运行所有查询:0.096秒
Maximum number of seconds to run all queries: 0.096 seconds
最大秒数运行所有查询:0.096秒
Number of clients running queries: 100
运行查询的客户数:100
Average number of queries per client: 10
每个客户的平均查询数:10
User time 0.15, System time 0.11
用户时间0.15,系统时间0.11
Maximum resident set size 18524, Integral resident set size 0
最大驻留集大小为18524,积分驻留集合大小为0
Non-physical pagefaults 3936, Physical pagefaults 0, Swaps 0
非物理故障数目3936,物理故障数目0,掉期0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
块0出0,信息在0出0,信号0
Voluntary context switches 6504, Involuntary context switches 101
自愿的上下文切换6504,非自愿的上下文切换101

##############################################################################################################
 mysqlslap -a --concurrency=500,10000 --number-of-queries 10000 --iterations=5 --debug-info -uroot -p123123123
500和10000个并发分别得到一次测试结果,并发数越多,执行完所有查询的时间越长。
Average number of seconds to run all queries: 2.850 seconds
平均秒数运行所有查询:2.850秒
Minimum number of seconds to run all queries: 2.750 seconds
最小秒数,运行所有查询:2.750秒
Maximum number of seconds to run all queries: 3.170 seconds
最大秒数运行所有查询:3.170秒
Number of clients running queries: 500
运行查询的客户数:500
Average number of queries per client: 20
每个客户的平均查询数:20
Benchmark
基准
Average number of seconds to run all queries: 2.105 seconds
平均秒数运行所有查询:2.105秒
Minimum number of seconds to run all queries: 1.917 seconds
最小秒数,运行所有查询:1.917秒
Maximum number of seconds to run all queries: 2.283 seconds
最大秒数运行所有查询:2.283秒
Number of clients running queries: 10000
运行查询的客户数:10000
Average number of queries per client: 1
每个客户端的平均查询数:1
User time 27.15, System time 25.60
用户时间27.15,系统时间25.60
Maximum resident set size 360492, Integral resident set size 0
最大驻留集大小为360492,积分驻留集合大小为0
Non-physical pagefaults 646148, Physical pagefaults 0, Swaps 0
非物理故障数目646148,物理故障数目0,掉期0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
块0出0,信息在0出0,信号0
Voluntary context switches 1314026, Involuntary context switches 1304
自愿的上下文切换1314026,非自愿的上下文切换1304

博主

让学习成为习惯,坚持-共享-开源-自由! 成功者决不放弃,放弃者绝不成功!

相关推荐

嗨、骚年、快来消灭0回复。