> --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压力测试工具,值得收藏】
推荐阅读
- MySQL 子查询优化
- MySQL Binlog 技术原理和业务应用案例分析
- mysql数据库时间类型datetime、bigint、timestamp的查询效率比较 java互联网架构
- 快速解“锁”MySQL,拿下这7把钥匙,便能撬倒面试官
- MySQL中另一种查询优化方案—重构查询的方式
- MySQL 中你必须要懂的 MVCC
- 华为二面凉凉:Linux+Redis+MySQL+算法+网络+Java一个都讲不清
- 二 最详细MySQL事务隔离级别及原理讲解!
- 多向 异地多活-MySQL实时双向复制
- 茶香可助人缓解压力,各种花茶的健康功效