MySQL自带压力测试工具mysqlslap基本使用

mysqlslap 

-uroot 

-p123456 

--create-schema="pcitc_fbd_test" 

--query="SQL" 

--concurrency=500 

--debug-info 

--number-of-queries 5000

参数解释:

-u 数据库连接用户名

-p 数据库连接密码

--create-schema 连接的数据库名

--query 要测试的性能的SQL语句

--concurrency 并发数(同时访问的用户数)

--debug-info 打印相关信息

--number-of-queries 执行SQL的次数,除以--concurrency (并发数)为每个用户执行的次数

执行结果展示:

Benchmark
        Average number of seconds to run all queries: 6.750 seconds
        Minimum number of seconds to run all queries: 6.750 seconds
        Maximum number of seconds to run all queries: 6.750 seconds
        Number of clients running queries: 500
        Average number of queries per client: 10
User time 0.25, System time 0.62
Maximum resident set size 23856, Integral resident set size 0
Non-physical pagefaults 5516, Physical pagefaults 14, Swaps 0
Blocks in 3112 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 15975, Involuntary context switches 23


你可能感兴趣的:(mysql,压力测试)