安装

安装包地址

  1. 1.
  2. rpm -ivh sysbench-1.0.20-1.el7.x86_64.rpm
  3. 2.
  4. # 将 libmysqlclient.so.18 添加到/usr/lib64
  5. cp /root/libmysqlclient.so.18 /usr/lib64/

输出日志信息

sysbench 1.0.14 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options:
Number of threads: 10
Report intermediate results every 10 second(s)
Initializing random number generator from current time


Initializing worker threads...

--线程启动
Threads started!

-- 每10秒钟报告一次测试结果,tps、每秒读、每秒写、99%以上的响应时长统计
[ 10s ] thds: 10 tps: 956.45 qps: 19139.38 (r/w/o: 13399.56/3825.92/1913.91) lat (ms,95%): 29.72 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: 10 tps: 989.71 qps: 19804.24 (r/w/o: 13862.17/3962.55/1979.52) lat (ms,95%): 28.67 err/s: 0.10 reconn/s: 0.00
[ 30s ] thds: 10 tps: 995.44 qps: 19909.03 (r/w/o: 13936.11/3982.05/1990.87) lat (ms,95%): 27.66 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: 10 tps: 983.30 qps: 19660.90 (r/w/o: 13764.23/3930.08/1966.59) lat (ms,95%): 27.66 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: 10 tps: 994.20 qps: 19882.58 (r/w/o: 13918.26/3975.92/1988.41) lat (ms,95%): 29.19 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: 10 tps: 982.50 qps: 19648.18 (r/w/o: 13752.56/3930.82/1964.81) lat (ms,95%): 28.16 err/s: 0.00 reconn/s: 0.00
[ 70s ] thds: 10 tps: 981.10 qps: 19624.20 (r/w/o: 13737.80/3924.00/1962.40) lat (ms,95%): 29.19 err/s: 0.00 reconn/s: 0.00
[ 80s ] thds: 10 tps: 991.69 qps: 19837.87 (r/w/o: 13885.81/3968.67/1983.39) lat (ms,95%): 27.17 err/s: 0.00 reconn/s: 0.00
[ 90s ] thds: 10 tps: 1007.34 qps: 20142.36 (r/w/o: 14100.50/4027.27/2014.59) lat (ms,95%): 26.68 err/s: 0.00 reconn/s: 0.00
[ 100s ] thds: 10 tps: 1009.76 qps: 20195.17 (r/w/o: 14135.79/4039.75/2019.63) lat (ms,95%): 26.20 err/s: 0.00 reconn/s: 0.00
[ 110s ] thds: 10 tps: 1003.80 qps: 20077.42 (r/w/o: 14053.54/4016.28/2007.59) lat (ms,95%): 25.74 err/s: 0.00 reconn/s: 0.00
[ 120s ] thds: 10 tps: 984.30 qps: 19685.77 (r/w/o: 13781.75/3935.41/1968.61) lat (ms,95%): 28.67 err/s: 0.00 reconn/s: 0.00
SQL statistics:
    queries performed:
        read:                            1663326 --读总数
        write:                           475233 -- 写总数  
        other:                           237617 -- 其他操作总数(SELECT、INSERT、UPDATE、DELETE之外的操作,例如COMMIT等)  
        total:                           2376176 -- 全部总数
    transactions:                        118808 (989.85 per sec.) -- 总事务数(每秒事务数)
    queries:                             2376176 (19797.13 per sec.)
    ignored errors:                      1      (0.01 per sec.) --总忽略错误总数(每秒忽略错误次数)
    reconnects:                          0      (0.00 per sec.) --重连总数(每秒重连次数)

General statistics: --常规统计
    total time:                          120.0244s --总耗时
    total number of events:              118808 --共发生多少事务数

Latency (ms):
         min:                                    6.08 --最小耗时
         avg:                                   10.10 --平均耗时
         max:                                   87.65 --最长耗时
         95th percentile:                       28.16 --超过95%平均耗时
         sum:                              1199522.76

Threads fairness: --并发统计
    events (avg/stddev):           11880.8000/273.15 --总处理事件数/标准偏差
    execution time (avg/stddev):   119.9523/0.00 --总执行时间/标准偏差