女教师遭网课入侵视频mysql压⼒(并发)测试--mysqlslap
[root@document-system bin]# mysqlslap -hlocalhost -uroot -proot -P3306 --concurrency=1000 --iterations=1 --auto-generate-sql --auto-generate-sql-load Warning: Using a password on the command line interface can be insecure.
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 0.060 seconds
Minimum number of seconds to run all queries: 0.060 seconds
Maximum number of seconds to run all queries: 0.060 seconds
Number of clients running queries: 1000springer期刊什么级别
Average number of queries per client: 1
User time 0.08, System time 0.43
Maximum resident set size 28220, Integral resident set size 0
Non-physical pagefaults 7459, Physical pagefaults 0, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 16324, Involuntary context switches 39
上图中是在mysql的bin⽬录下执⾏的命令。我们可以看出1000的并发量对于单个数据库⽽⾔是没有问题的,下⾯看5000的并发量:
[root@document-system bin]# mysqlslap -hlocalhost -uroot -proot -P3306 --concurrency=5000 --iterations=1 --auto-generate-sql --auto-generate-sql-load Warning: Using a password on the command line interface can be insecure.
Benchmark
borrow怎么读Running for engine innodb
Average number of seconds to run all queries: 0.598 seconds
Minimum number of seconds to run all queries: 0.598 seconds
Maximum number of seconds to run all queries: 0.598 seconds
Number of clients running queries: 5000
Average number of queries per client: 1
User time 0.53, System time 1.88
Maximum resident set size 134844, Integral resident set size 0
Non-physical pagefaults 30313, Physical pagefaults 0, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 96141, Involuntary context switches 33
这时候数据库就有点吃⼒了,再看12000的并发量:
[root@document-system bin]# mysqlslap -hlocalhost -uroot -proot -P3306 --concurrency=12000 --iter
ations=1 --auto-generate-sql --auto-generate-sql-loa mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
strncpy函数不能执行mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 2001 Can't create UNIX socket (24)
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysql面试题测试mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connectionsr语言中rbind函数
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
mysqlslap: Error when connecting to server: 1040 Too many connections
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 1.141 seconds
Minimum number of seconds to run all queries: 1.141 seconds
Maximum number of seconds to run all queries: 1.141 seconds
Number of clients running queries: 12000
Average number of queries per client: 1
User time 1.68, System time 4.36
Maximum resident set size 303504, Integral resident set size 0
Non-physical pagefaults 68515, Physical pagefaults 0, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 271921, Involuntary context switches 81
这时候MySQL就拒绝了部分请求。所以单节点数据库的查询并发超过10000,就扛不住了。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论