01:Sysbench 基准压测 IO篇
############################################
- line:V1.1
- mail: gczheng@139.com
- date: 2017-11-17
############################################
一、Sysench测试前准备
1.1、压测环境
| 配置 | 信息 |
|---|---|
| 主机 | Dell PowerEdge R730xd |
| CPU | 24 * Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz |
| 内存 | 64G (16G * 4) |
| RAID | RAID1 |
| 硬盘 | 7.2K RPM, 6000G SAS, 12G/s |
| 文件系统 | ext4 |
| 系统 | Red Hat Enterprise Linux Server release 7.3 (Maipo) |
| 内核 | 3.10.0-514.el7.x86_64 |
| Sysbench | 1.1.0-0167e45 |
1.2、压测基准值
| Tools | sysbench |
|---|---|
| time(sec) | 180 |
| events | 100000000 |
| threads | 24 |
| file-total-size | 128G |
| file-test-mode | rndrw(随机读写)、rndwr(随机写)、rndrd (随机读) |
| file-extra-flags | O_DIRECT |
| file-fsync-freq | 0 |
| file-block-size | 16K |
二、进行OLTP_IO测试
2.1、安装压测工具sysbench
- 标准安装
[root@localhost-m(252) /r2/soft/dbtest] curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash &&
sudo yum -y install sysbench
2.2、执行压测
- 2.2.1 创建128个表,并发线程数24个,总数据量128G
[root@localhost-m(252) /r2/soft/sysbench]# sysbench --threads=24 --test=fileio --file-total-size=128G --file-test-mode=rndrw prepare
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
sysbench 1.1.0-0167e45 (using bundled LuaJIT 2.1.0-beta3)
128 files, 1048576Kb each, 131072Mb total
Creating files for the test...
Extra file open flags: 0
Creating file test_file.0
......
Creating file test_file.127
- 2.2.2 进行fileio(rndrw随机读写)测试
[root@localhost-m(252) /r2/soft/sysbench]# sysbench fileio \
> --time=180 \
> --events=100000000 \
> --threads=24 \
> --file-total-size=128G \
> --file-test-mode=rndrw \
> --file-num=128 \
> --file-extra-flags=direct \
> --file-fsync-freq=0 \
> --file-block-size=16384 \
> run
sysbench 1.1.0-0167e45 (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: 3
128 files, 1GiB each
128GiB total file size
Block size 16KiB
Number of IO requests: 100000000
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!
Throughput:
read: IOPS=334.56 5.23 MiB/s (5.48 MB/s)
write: IOPS=223.03 3.48 MiB/s (3.65 MB/s)
fsync: IOPS=0.00
Latency (ms):
min: 0.18
avg: 42.99
max: 1329.63
95th percentile: 189.93
sum: 4320920.09
- 2.2.3 进行fileio(rndwr随机写)测试
[root@localhost-m(252) /r2/soft/sysbench]# sysbench fileio --time=180 --events=100000000 --threads=24 --file-total-size=128G --file-test-mode=rndwr --file-num=128 --file-extra-flags=direct--file-fsync-freq=0 --file-block-size=16384 run
sysbench 1.1.0-0167e45 (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: 3
128 files, 1GiB each
128GiB total file size
Block size 16KiB
Number of IO requests: 100000000
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=389.35 6.08 MiB/s (6.38 MB/s)
fsync: IOPS=0.00
Latency (ms):
min: 0.16
avg: 61.63
max: 1361.51
95th percentile: 108.68
sum: 4320453.91
- 2.2.4 进行fileio(rndrd随机读)测试
[root@localhost-m(252) /r2/soft/sysbench]# sysbench fileio --time=180 --events=100000000 --threads=24 --file-total-size=128G --file-test-mode=rndrd --file-num=128 --file-extra-flags=direct--file-fsync-freq=0 --file-block-size=16384 run
sysbench 1.1.0-0167e45 (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: 3
128 files, 1GiB each
128GiB total file size
Block size 16KiB
Number of IO requests: 100000000
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=697.23 10.89 MiB/s (11.42 MB/s)
write: IOPS=0.00 0.00 MiB/s (0.00 MB/s)
fsync: IOPS=0.00
Latency (ms):
min: 0.41
avg: 34.41
max: 737.43
95th percentile: 114.72
sum: 4320295.10
2.3、 执行结果

- 分别进行rndrw(随机读写)、rndwr(随机写)、rndrd (随机读)各3分钟,如图R2目录(/dev/sdl)IOPS:
- rndrw(随机读写)平均读iops:334,平均写iops:223
- rndwr(随机写)平均写iops:389.35
- rndwr(随机读)平均读iops:697.23
2.4、 清除生成的数据
[root@localhost-m(252) /r2/soft/sysbench]# sysbench --threads=24 --test=fileio --file-total-size=128G --file-test-mode=rndrw cleanup
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
sysbench 1.1.0-0167e45 (using bundled LuaJIT 2.1.0-beta3)
Removing test files...
01:Sysbench 基准压测 IO篇的更多相关文章
- 02:Sysbench基准压测(oltp_update_index.lua、oltp_update_non_index.lua)my.cnf
目录 Sysbench 基准压测 my.cnf 一.Sysench测试前准备 1.1.压测环境 二.进行OLTP_update测试 2.1.安装压测工具sysbench 2.2.执行压测 三.执行结果 ...
- 03:TPCC 基准压测my.cnf
line: V1.3 mail: gczheng@139.com date: 2017-11-09 一.TPCC测试前准备 1.压测环境 配置 信息 主机 Dell PowerEdge R730xd ...
- sysbench对MySQL的压测,使用sysbench压测磁盘io
QPS - query per secondTPS - transaction per second 不是特别关注,每个业务场景中事务标准是不一样的 Ⅰ.sysbench测试框架 Ⅱ.常用测试脚本 [ ...
- 【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 ...
- 018 磁盘 IO 性能监控/压测工具(sar、iotop、fio、iostat)
1 sar 命令查看当前磁盘 IO 读写 sar(System Activity Reporter 系统活动情况报告)是 Linux 上最为全面的系统性能分析工具之一,可以从多方面对系统的活动进行报告 ...
- 05:Sysbench压测-innodb_deadlock_detect参数对性能的影响
目录 sysbench压测-innodb_deadlock_detect参数对性能的影响 一.OLTP测试前准备 二.进行OLTP测试 三.测试结果解读: 四.关于测试后的结论: 五.关于测试后的性能 ...
- 04:Sysbench压测-innodb_flush_log_at_trx_commit,sync_binlog参数对性能的影响
目录 sysbench压测-innodb_flush_log_at_trx_commit,sync_binlog参数对性能的影响 一.OLTP测试前准备 二.MySQL 数据落盘的过程 三.参数说明 ...
- Jmeter(四十七) - 从入门到精通高级篇 - 分布式压测部署之负载机的设置(详解教程)
1.简介 千呼万唤始出来,这一篇感觉写了好久,总想写的清楚明白简洁,但是还是洋洋洒洒写了好多,希望大家喜欢吧!本来打算将这一篇文章是放在性能测试中讲解和分享的,但是有的童鞋或者小伙伴们私下问的太多了, ...
随机推荐
- Tencent tinker 出现pre-verified crash
异常类型:app运行时异常 手机型号:sumsung N9008 手机系统版本:android4.4.2 tinker版本: 1.8.1 gradle版本::2.3.3 是否使用热更新SDK: Tin ...
- office在繁体系统下 导入导出 功能灰显的解决方法
当在win7系统使用繁体中文版的office时,或系统是繁体版时,可能会导致office的导入导出功能无法使用 解决方法: 控制面板--区域和语言--格式--中文简体
- .net的session详解
http://blog.csdn.net/justin_wkf/article/details/5746914#comments
- Deepgreen DB简介(转)
原文链接 Deepgreen DB 全称 Vitesse Deepgreen DB,它是一个可扩展的大规模并行(通常称为MPP)数据仓库解决方案,起源于开源数据仓库项目Greenplum DB(通 ...
- css 中相对定位和绝对定位
1. css中定位机制有三种: 标准文档流, 浮动, 绝对定位 2. 绝对定位就属于第三种定位, 用到position属性, 下面就是具体设置 相对定位: 相对于自身原有位置(就是普通流的时候)进行偏 ...
- .NET中,在方法参数的类型前加一个OUT是做什么用的
话说古时候,在一个名字叫C#的繁华的大城市里面,有两家珠宝加工店,一家叫ref,另外一家叫out. 有一天,有名字叫a和b的两个人每人都各带了一公斤黄金要加工首饰. a去了ref店,ref的掌柜告诉a ...
- socket创建TCP服务端和客户端
看情况选择相对应的套接字*面向连接的传输--tcp协议--可靠的--流式套接字(SOCK_STREAM)*面向无连接的传输--udp协议--不可靠的--数据报套接字(SOCK_DGRAM) 在liun ...
- C++调用SQLServer存储过程
同事手头的C++工程中涉及SQLServer数据库的操作需要优化,说是测试调用存储过程失败,提示: 要了C++的源码: 折腾半天,最终定位问题,问题不在C++的代码,而是SQLServer的存储过程要 ...
- Codeforces 620E New Year Tree【线段树傻逼题】
LINK 题目大意 给你一棵树 让你支持子树染色,子树查询颜色个数,颜色数<=60, 节点数<=4e5 思路 因为颜色数很少,考虑状态压缩变成二进制 然后直接在dfs序上用线段树维护就可以 ...
- BZOJ4373 算术天才⑨与等差数列 【线段树】*
BZOJ4373 算术天才⑨与等差数列 Description 算术天才⑨非常喜欢和等差数列玩耍. 有一天,他给了你一个长度为n的序列,其中第i个数为a[i]. 他想考考你,每次他会给出询问l,r,k ...