sysbench–实践–06–Mutex测试
1、介绍
互斥性能测试
2、参数说明
sysbench --test=mutex help
2.1、–mutex-num=N
- 数组互斥的总大小
- 默认值:4096。
2.2、–mutex-locks=N
- 每个线程互斥锁的数量
- 默认值:50000。
2.3、–mutex-loops=N
- 内部互斥锁的空循环数量
- 默认值:10000
3、操作
命令
sysbench mutex --num-threads=16 --mutex-num=1024 --mutex-locks=10000 --mutex-loops=5000 run
结果
WARNING: --num-threads is deprecated, use --threads instead
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)
Running the test with following options:
Number of threads: 16
Initializing random number generator from current time
Initializing worker threads...
Threads started!
General statistics:
total time: 0.5235s
total number of events: 16
Latency (ms):
min: 299.78
avg: 430.09
max: 520.68
95th percentile: 520.62
sum: 6881.36
Threads fairness:
events (avg/stddev): 1.0000/0.00
execution time (avg/stddev): 0.4301/0.07