性能测试工具sysbench简介
作者:网络转载 发布时间:[ 2014/1/21 10:58:14 ] 推荐标签:性能测试 测试工具
线程测试
以下是引用片段:
NinGoo:/u01/sysbench/bin>$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: 4.3925s
total number of events: 10000
total time taken by event execution: 280.4418
per-request statistics:
min: 0.04ms
avg: 28.04ms
max: 72.81ms
approx. 95 percentile: 52.29ms
Threads fairness:
events (avg/stddev): 156.2500/1.43
execution time (avg/stddev): 4.3819/0.01
文件IO性能测试
首先生成需要的测试文件,文件总大小300M,16个并发线程,随机读写模式。执行完后会在当前目录下生成一堆小文件。
以下是引用片段:
NinGoo:/u01/sysbench/bin>$sysbench --test=fileio --num-threads=16
--file-total-size=300M --file-test-mode=rndrw prepare
sysbench 0.4.12: multi-threaded system evaluation benchmark
128 files, 2400Kb each, 300Mb total
Creating files for the test...
执行测试
以下是引用片段:
NinGoo:/u01/sysbench/bin>$sysbench --test=fileio --num-threads=16
--file-total-size=300M --file-test-mode=rndrw run
sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 16
Extra file open flags: 0
128 files, 2.3438Mb each
300Mb total file size
Block size 16Kb
Number of random requests for random IO: 10000
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Threads started!
Done.
Operations performed: 5996 Read, 4004 Write, 12800 Other = 22800 Total
Read 93.688Mb Written 62.562Mb Total transferred 156.25Mb (26.713Mb/sec)
1709.66 Requests/sec executed
Test execution summary:
total time: 5.8491s
total number of events: 10000
total time taken by event execution: 12.5045
per-request statistics:
min: 0.01ms
avg: 1.25ms
max: 373.28ms
approx. 95 percentile: 0.03ms
Threads fairness:
events (avg/stddev): 625.0000/109.60
execution time (avg/stddev): 0.7815/0.29
相关推荐
更新发布
功能测试和接口测试的区别
2023/3/23 14:23:39如何写好测试用例文档
2023/3/22 16:17:39常用的选择回归测试的方式有哪些?
2022/6/14 16:14:27测试流程中需要重点把关几个过程?
2021/10/18 15:37:44性能测试的七种方法
2021/9/17 15:19:29全链路压测优化思路
2021/9/14 15:42:25性能测试流程浅谈
2021/5/28 17:25:47常见的APP性能测试指标
2021/5/8 17:01:11