Ⅰ、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. js中子页面父页面方法 变量相互调用(转)

    原文:https://www.cnblogs.com/huangshuqiang/p/5734358.html (1)子页面调用父页面的方法或者变量: window.parent.方法()或者变量名w ...

  2. [HAOI2015]树上操作-树链剖分

    #include<bits/stdc++.h> using namespace std; const int maxn = 1e6+5; #define mid ((l+r)>> ...

  3. JAVA 实现 简单的 HTTP服务器

    关于JAVA的HTTP服务器的简单实现,还望大家给出宝贵建议,谢谢. 1.首先来说下HTTP所有的状态碼,相信对于网页开发的博友们,肯定不陌生. 状态码 状态码英文名称 中文描述 100 Contin ...

  4. form表单获取多选的值

    flask 中 form 表单直接获取多选框的值时 language = request.values.getlist('values')或 language=request.from.getlist ...

  5. tensorflow+ssd_mobilenet实现目标检测的训练

    本文在Ubuntu下使用tensorflow的object detection API来训练自己的数据集.所用模型为ssd_mobilenet,也可以使用其他的模型.当然也可以在windows下训练, ...

  6. Java Spring Boot VS .NetCore (十一)自定义标签 Java Tag Freemarker VS .NetCore Tag TagHelper

    Java Spring Boot VS .NetCore (一)来一个简单的 Hello World Java Spring Boot VS .NetCore (二)实现一个过滤器Filter Jav ...

  7. ExtJs5的基本理论概念

    概述 理解ExtJs里面的一些基本关键字的概念是使用ExtJs搭建MMVC框架的基础,在ExtJs中,我们通常遇到ExtJs的配置和启动项Ext.application(),该方法是ExtJs程序初始 ...

  8. Spring Conditional注解使用小结

    今天我们来总结下Conditional注解的使用. Conditional注解 增加配置类Config package condition; import org.springframework.co ...

  9. PostgreSQL自学笔记:9 索引

    9 索引 9.1 索引简介 索引是对数据库表中一列或多列值进行排序的一种结构,使用 索引可提高数据库中特定数据的查询速度 9.1.1 索引的含义和特点 索引是一种单独的.存储在磁盘上的数据库结构,他们 ...

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

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