Ⅰ、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的更多相关文章

  1. sysbench对MySQL的压测,使用sysbench压测磁盘io

    QPS - query per secondTPS - transaction per second 不是特别关注,每个业务场景中事务标准是不一样的 Ⅰ.sysbench测试框架 Ⅱ.常用测试脚本 [ ...

  2. 04:Sysbench压测-innodb_flush_log_at_trx_commit,sync_binlog参数对性能的影响

    目录 sysbench压测-innodb_flush_log_at_trx_commit,sync_binlog参数对性能的影响 一.OLTP测试前准备 二.MySQL 数据落盘的过程 三.参数说明 ...

  3. 05:Sysbench压测-innodb_deadlock_detect参数对性能的影响

    目录 sysbench压测-innodb_deadlock_detect参数对性能的影响 一.OLTP测试前准备 二.进行OLTP测试 三.测试结果解读: 四.关于测试后的结论: 五.关于测试后的性能 ...

  4. 用sysbench压测MySQL,通过orzdba监控MySQL

    1.1 安装sysbench wget https://codeload.github.com/akopytov/sysbench/zip/0.5 unzip 0.5 cd sysbench-0.5/ ...

  5. sysbench压测过程

    1.sysbench安装(sysbench1.1.0)  [root@master soft]# ls sysbench1.1.0.zip sysbench1.1.0.zip 解压: [root@ma ...

  6. 【MySQL】sysbench压测服务器及结果解读

    主要压测范围包括CPU测试.磁盘IO测试.线程测试.OLTP测试等,那么sysbench就可以满足我们的压测需求.下面我们简单来看下sysbench的安装使用以及压测结果的解读. 一.sysbench ...

  7. sysbench压测自装MySQL数据库

    压测准备 测试机器 2vCPUs | 4GB | s6.large.2 CentOS 7.6 64bit 建立测试库 create database test_db character set utf ...

  8. sysbench 压测

    IP架构 sysbench部署服务器:172.17.100.107 压测服务器:172.17.100.100 MySQL部署目录:/usr/local/mysql 前置工作 1.完成MySQL的安装( ...

  9. 技术分享|sysbench 压测工具用法浅析

    GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源. 介绍 新业务上线的时候通常需要对数据库性能进行压力测试,以确认是否满足需要,今天简单介绍下sysbench的用法: 1.s ...

随机推荐

  1. Ubuntu 16.04 总出现红色圆圈警告和检测到系统程序出现问题

    这种问题不可忽视!不可忽视!不可忽视!重要的事情说三遍!!!(一次死机,好多文件丢失,真是痛苦的经历) 自从从第三方安装了Python3.6,并将默认3.5改为3.6,导致ubuntu16.04右上角 ...

  2. 在node中使用MongoDB

    1.下载安装包,进行安装: https://www.mongodb.com/download-center/community 参考网址:https://www.cnblogs.com/ymwange ...

  3. apache基础

    apache基于多域名的虚拟主机 NameVirtualHost *:80<VirtualHost *:80> DocumentRoot "/var/www/html/xk/sh ...

  4. freemarker是什么东西?

    前言 由于考虑到网站访问量,以及tocmat可能承受的最大访问压力,我们需要引进一些比较好的技术,来解决这个问题.所以在项目快要结束之际又收到消息,我们要考虑到这些问题然后对现在的项目进行改进,于是就 ...

  5. Integer Replacement

    https://leetcode.com/problems/integer-replacement/#/solutions 这题是一道典型的搜索问题,我采用广度搜索,可以直接输出最短路径.这题的tes ...

  6. web中cookie的使用

    一:cookie在浏览器中什么地方查找写入成功 二:如何用js写 function addCookie(name,value,expireHours){ var cookieString=name+& ...

  7. UOJ#172. 【WC2016】论战捆竹竿 字符串 KMP 动态规划 单调队列 背包

    原文链接https://www.cnblogs.com/zhouzhendong/p/UOJ172.html 题解 首先,这个问题显然是个背包问题. 然后,可以证明:一个字符串的 border 长度可 ...

  8. Codeforces 1110D. Jongmah 动态规划

    原文链接https://www.cnblogs.com/zhouzhendong/p/CF1110D.html 题意 给定 n 个数,每一个数都是在 [1,m] 里的整数. 从中取出形如 {x,x,x ...

  9. rem实现移动端自适应页面

    一.把px转换成rem方案 1.cssrem插件 2.css预处理器 3.rem-unit插件 4.px2rem插件 rem就是相对于根元素的font-size来做计算,设置好根结点字体大小,子节点用 ...

  10. DWM1000 多个标签定位讨论 --[蓝点无限]

    多标签代码已经基本实现,完成代码可以在论坛上下载 http://bphero.com.cn/forum.php?mod=viewthread&tid=53&fromuid=2  蓝点D ...