MySQL压力测试工具,值得收藏( 四 )


> --threads=16
> fileio
> --file-num=5
> --file-total-size=2G
> --file-test-mode=rndrw
> --file-fsync-freq=0
> --file-block-size=16384
> run
返回的结果如下:
Running the test with following options:
Number of threads: 16
Initializing random number generator from current time
Extra file open flags: (none)
5 files, 409.6MiB each
2GiB total file size
Block size 16KiB
Number of IO requests: 5000
Read/Write ratio for combined random IO test: 1.50
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads...
Threads started!
File operations:
reads/s: 9899.03
writes/s: 6621.38
fsyncs/s: 264.33
Throughput: # 吞吐量
read, MiB/s: 154.66 #表示读带宽
written, MiB/s: 103.46 #表示写的带宽
General statistics:
total time: 0.3014s
total number of events: 5000
Latency (ms):
min: 0.00
avg: 0.81
max: 53.56
95th percentile: 4.10
sum: 4030.48
Threads fairness:
events (avg/stddev): 312.5000/27.64
execution time (avg/stddev): 0.2519/0.02
2)测试cpu性能
[root@mysql ~]# sysbench cpu --threads=40 --events=10000 --cpu-max-prime=20000 run
压测时 , 还请小心谨慎!!!!

【MySQL压力测试工具,值得收藏】


推荐阅读