使用sysbench压测磁盘io
Ⅰ、sysbench安装
cd /usr/local/src
yum -y install make automake libtool pkgconfig libaio-devel
git clone https://github.com/akopytov/sysbench.git
cd sysbench
./autogen.sh
./configure
make -j 4
make install
ldconfig /usr/local/mysql/lib
[root@VM_42_63_centos sysbench]# sysbench --version;
sysbench 1.1.0-50966c8
Ⅱ、file io测试
2,1 生成测试文件
sysbench fileio --file-num=4 --file-block-size=16384 --file-total-size=110G prepare
2.2 看下参数
[root@VM_42_63_centos data]# sysbench fileio help
sysbench 1.1.0-50966c8 (using bundled LuaJIT 2.1.0-beta3)
fileio options:
--file-num=N number of files to create [128]
--file-block-size=N block size to use in all IO operations [16384]
--file-total-size=SIZE total size of files to create [2G]
--file-test-mode=STRING test mode {seqwr, seqrewr, seqrd, rndrd, rndwr, rndrw}
--file-io-mode=STRING file operations mode {sync,async,mmap} [sync]
--file-extra-flags=[LIST,...] list of additional flags to use to open files {sync,dsync,direct} []
--file-fsync-freq=N do fsync() after this number of requests (0 - don't use fsync()) [100]
--file-fsync-all[=on|off] do fsync() after each write operation [off]
--file-fsync-end[=on|off] do fsync() at the end of test [on]
--file-fsync-mode=STRING which method to use for synchronization {fsync, fdatasync} [fsync]
--file-merged-requests=N merge at most this number of IO requests if possible (0 - don't merge) [0]
--file-rw-ratio=N reads/writes ratio for combined test [1.5]
2.3 测两把看看
- 先看随机读
[root@VM_42_63_centos sysdata]# sysbench fileio \
> --time=180 \
> --threads=24 \
> --file-total-size=110G \
> --file-test-mode=rndrd \
> --file-num=4 \
> --file-extra-flags=direct \
> --file-fsync-freq=0 \
> --file-block-size=16384 \
> run
sysbench 1.1.0-50966c8 (using bundled LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 24
Initializing random number generator from current time
Extra file open flags: directio
4 files, 2.5GiB each
10GiB total file size
Block size 16KiB
Number of IO requests: 0
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 read test
Initializing worker threads...
Threads started!
Throughput:
read: IOPS=1752.15 27.38 MiB/s (28.71 MB/s)
write: IOPS=0.00 0.00 MiB/s (0.00 MB/s)
fsync: IOPS=0.00
Latency (ms):
min: 0.07
avg: 13.70
max: 687.59
95th percentile: 36.89
sum: 4319633.88
- 再看随机写
[root@VM_42_63_centos sysdata]# sysbench fileio \
> --time=180 \
> --threads=24 \
> --file-total-size=110G \
> --file-test-mode=rndwr \
> --file-num=4 \
> --file-extra-flags=direct \
> --file-fsync-freq=0 \
> --file-block-size=16384 \
> run
sysbench 1.1.0-50966c8 (using bundled LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 24
Initializing random number generator from current time
Extra file open flags: directio
4 files, 2.5GiB each
10GiB total file size
Block size 16KiB
Number of IO requests: 0
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 write test
Initializing worker threads...
Threads started!
Throughput:
read: IOPS=0.00 0.00 MiB/s (0.00 MB/s)
write: IOPS=1094.75 17.11 MiB/s (17.94 MB/s)
fsync: IOPS=0.53
Latency (ms):
min: 0.09
avg: 21.92
max: 3376.77
95th percentile: 94.10
sum: 4319984.68
随机读的iops为1752,随机写的iops为1094,读写非对称
清理测试文件用cleanup选项即可
我们主要看随机写的性能哦
使用sysbench压测磁盘io的更多相关文章
- sysbench对MySQL的压测,使用sysbench压测磁盘io
QPS - query per secondTPS - transaction per second 不是特别关注,每个业务场景中事务标准是不一样的 Ⅰ.sysbench测试框架 Ⅱ.常用测试脚本 [ ...
- 04:Sysbench压测-innodb_flush_log_at_trx_commit,sync_binlog参数对性能的影响
目录 sysbench压测-innodb_flush_log_at_trx_commit,sync_binlog参数对性能的影响 一.OLTP测试前准备 二.MySQL 数据落盘的过程 三.参数说明 ...
- 05:Sysbench压测-innodb_deadlock_detect参数对性能的影响
目录 sysbench压测-innodb_deadlock_detect参数对性能的影响 一.OLTP测试前准备 二.进行OLTP测试 三.测试结果解读: 四.关于测试后的结论: 五.关于测试后的性能 ...
- 用sysbench压测MySQL,通过orzdba监控MySQL
1.1 安装sysbench wget https://codeload.github.com/akopytov/sysbench/zip/0.5 unzip 0.5 cd sysbench-0.5/ ...
- sysbench压测过程
1.sysbench安装(sysbench1.1.0) [root@master soft]# ls sysbench1.1.0.zip sysbench1.1.0.zip 解压: [root@ma ...
- 【MySQL】sysbench压测服务器及结果解读
主要压测范围包括CPU测试.磁盘IO测试.线程测试.OLTP测试等,那么sysbench就可以满足我们的压测需求.下面我们简单来看下sysbench的安装使用以及压测结果的解读. 一.sysbench ...
- sysbench压测自装MySQL数据库
压测准备 测试机器 2vCPUs | 4GB | s6.large.2 CentOS 7.6 64bit 建立测试库 create database test_db character set utf ...
- sysbench 压测
IP架构 sysbench部署服务器:172.17.100.107 压测服务器:172.17.100.100 MySQL部署目录:/usr/local/mysql 前置工作 1.完成MySQL的安装( ...
- 技术分享|sysbench 压测工具用法浅析
GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源. 介绍 新业务上线的时候通常需要对数据库性能进行压力测试,以确认是否满足需要,今天简单介绍下sysbench的用法: 1.s ...
随机推荐
- IDEA远程调试服务器代码
先在idea添加一个remote,host填服务器ip,port填监听服务器端口,默认5005 然后在服务器tomcat catalina.sh 添加(红色部分): JAVA_OPTS="$ ...
- 【easy】206. Reverse Linked List 链表反转
链表反转,一发成功~ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; ...
- 【原创】大叔经验分享(46)用户提交任务到yarn报错
用户提交任务到yarn时有可能遇到下面的错误: 1) Requested user anything is not whitelisted and has id 980,which is below ...
- chromerdriver下载地址:xpath_help
chrome下载地址 http://npm.taobao.org/mirrors/chromedriver xpath_help https://blog.csdn.net/Cayny/article ...
- Windows安装activemq
1.Windows下载解压就可以了,官网:http://activemq.apache.org/ 8161查看端口 61616消息服务端口 2.浏览器访问localhost:8161测试 3.可以在c ...
- ES6 语法学习(二)
1.类的建立与继承 constructor方法是类的构造函数是默认方法,通过new命令生成对象实例时,自动调用该方法.一个类必须有constructor方法,如果没有显式定义,一个默认的constru ...
- SpringMvc+Hibernate+Mysql保存表情字符(昵称)到数据库报错的问题?
背景: 一个中小型H5游戏 描述: 游戏通过微信授权登入, 获取到用户昵称并将用户信息保存至Mysql数据库, 当遇到有些用户微信昵称中带有表情(特殊字符)时, 保存至数据库出错! 核心错误: Cau ...
- [原创]创芯电子实验室iFPGA-Cable JTAG工具实物图
创芯电子实验室iFPGA-Cable JTAG工具实物图 对于Xilinx平台 基于FTDI 芯片的Xilinx JTAG 同时支持UART 电平1.8~5V 支持ISE和VIVADO 速度从10M. ...
- IntelliJ IDEA 使提示不区分大小写
File ==> Settings ==> Editor ==> General ==> Code Completion 第一行 Match case 将默认勾选去掉
- AGC-018 C
题意: 有$X + Y + Z$个人,第$i$个人有$Ai$个金币,$Bi$个银币,$Ci$个铜币. 选出$X$个人获得其金币,选出$Y$ 个人获得其银币,选出$Z$个人获得 其铜币,在不重复选某个人 ...