大家好!
对于下面的测试结果我有两个地方不明白,请给予说明。
1、参数-thread-yields=100 --thread-locks=2 怎么理解?
2、对于测试结果怎么解读?
sysbench --test=threads --num-threads=64 --thread-yields=100 --thread-locks=2 run
sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 64
Doing thread subsystem performance test
Thread yields per test: 100 Locks used: 2
Threads started!
Done.
Test execution summary:
total time: 7.4763s
total number of events: 10000
total time taken by event execution: 477.6998
per-request statistics:
min: 0.15ms
avg: 47.77ms
max: 948.79ms
approx. 95 percentile: 268.39ms
Threads fairness:
events (avg/stddev): 156.2500/42.59
execution time (avg/stddev): 7.4641/0.00
谢谢!
-thread-yields=100 是每个请求产生100个线程
--thread-locks=2 是每个线程的锁的数量为2
Test execution summary:下面的是测试概要:分别是总耗时,总事件数,事件执行花费的总时间
per-request statistics:下的是单个请求的测试统计
min: 0.15ms 最少用时
avg: 47.77ms 平均用时
max: 948.79ms 最大用时
其他的好像还没用到过
总事件相同 对比耗时,耗时越短越优;你可以适当增加锁的数量就可以分析出规律了