当前位置:网站首页>FIO test hard disk performance
FIO test hard disk performance
2022-07-20 10:19:00 【The first code kills the immortal】
FIO It is a tool for testing disk performance , For stress testing and verification of hardware .
Use FIO when , It is recommended to use with libaio Of I/O Test the engine .
Software installation
Compilation and installation
fio The download address of each version is as follows :
https://github.com/axboe/fio/releases
With “fio-2.1.10” Version as an example , Download the source code , And compile and install .
# Installation dependency
yum install libaio libaio-devel -y
# download Fio Source code .
wget https://github.com/axboe/fio/archive/fio-2.1.10.tar.gz
# decompression Fio Source code .
tar -zxvf fio-2.1.10.tar.gz
# Compile and install Fio.
cd fio-fio-2.1.10
make
make install
# Check the installation Fio Version number .
fio --version
# The echo message is as follows , be Fio Installation successful .
fio-2.1.10
notes : You may need to exit the current shell, Log in again
yum install
If the version is not required , Can directly yum install :
yum install libaio libaio-devel -y
yum install -y fio
Measures
- IOPS: Read every second / Write times , The unit is secondary ( Count ). The underlying driver type of the storage device determines the different IOPS.
- throughput : The amount of read and write data per second , Unit is MB/s.
- Time delay :I/O The time between sending the operation and receiving the confirmation , The unit is in seconds .
Test suggestions
- It is suggested to do it in the free 、 On the hard disk without saving important data FIO test , And remake the file system of the tested hard disk after the test .
- When testing the performance of hard disk , It is recommended to test the raw data disk directly ( Such as /dev/vdb).
- When testing file system performance , It is recommended to specify specific document tests ( Such as /data/file).
Description of common parameters
The test formulas of different scenarios are basically the same , Only rw、iodepth and bs(block size) The difference between the three parameters . for example , Each workload fits best iodepth Different , It depends on your specific application for IOPS And the sensitivity of delay .
Parameter name | explain | Examples |
---|---|---|
bs | Block size per request . Values include 4k,8k,16k etc. . | 4k |
ioengine | I/O engine . Recommended Linux The asynchronous I/O engine . | libaio |
iodepth | Requested I/O Queue depth . | 1 |
direct | Appoint direct Pattern . True(1) To designate O_DIRECT identifier , Ignore I/O cache , Data direct writing . False(0) Means not to specify O_DIRECT identifier . The default is True(1). | 1 |
rw | Read write mode . Values include sequential reads (read)、 Sequential writing (write)、 random block read (randread)、 Write at random (randwrite)、 Mixed random read and write (randrw) And mixed sequential reading and writing (rw,readwrite). | read |
time_based | Specify the time mode . There is no need to set the parameter value , as long as FIO Run based on time . | N/A |
runtime | Specify test duration , namely FIO Run time . | 300 |
refill_buffers | FIO Will be repopulated on each submission I/O buffer . The default is to fill and reuse the data only initially . | N/A |
norandommap | Random I/O when ,FIO Each block of the file will be overwritten . If this parameter is given , Then the new offset will be selected without viewing I/O Historical record . | N/A |
randrepeat | Whether the random sequence is repeatable ,True(1) Indicates that the random sequence is repeatable ,False(0) Indicates that the random sequence is not repeatable . The default is True(1). | 0 |
group_reporting | Multiple job Concurrent , Print the whole group The statistical value of . | N/A |
name | job The name of . | fio-read |
size | I/O Address space tested . When not specified , Will test the whole . If it is a file test , If you don't specify the size , Will report a mistake . | 100G |
filename | Test object , That is, the name of the disk device to be tested . | /dev/sdb |
numjobs | Number of test processes | 16 |
The test case
Bare disk iops test
Write iops
fio -numjobs=16 -bs=4k -ioengine=libaio -iodepth=32 -direct=1 -rw=randwrite -time_based -runtime=300 -refill_buffers -norandommap -randrepeat=0 -group_reporting -name=fio-randwrite-iops -filename=/dev/vdb
Write iops Pay attention to the following output
read iops
fio -numjobs=16 -bs=4k -ioengine=libaio -iodepth=32 -direct=1 -rw=randread -time_based -runtime=300 -refill_buffers -norandommap -randrepeat=0 -group_reporting -name=fio-randread-iops -filename=/dev/vdb
read iops Pay attention to the following output :
Bare disk bandwidth test ( Sequential reading and writing )
Sequential writing
fio --numjobs=16 -bs=128k -ioengine=libaio -iodepth=32 -direct=1 -rw=write -time_based -runtime=300 -refill_buffers -norandommap -randrepeat=0 -group_reporting -name=fio-write-throughput -filename=/dev/vdb
Sequential reading
fio --numjobs=16 -bs=128k -ioengine=libaio -iodepth=32 -direct=1 -rw=read -time_based -runtime=300 -refill_buffers -norandommap -randrepeat=0 -group_reporting -name=fio-read-throughput -filename=/dev/vdb
Raw disk delay
Write delay
fio --numjobs=16 -bs=4k -ioengine=libaio -iodepth=1 -direct=1 -rw=randwrite -time_based -runtime=300 -refill_buffers -norandommap -randrepeat=0 -group_reporting -name=fio-randwrite-lat -filename=/dev/vdb
Read delay
fio --numjobs=16 -bs=4k -ioengine=libaio -iodepth=1 -direct=1 -rw=randread -time_based -runtime=300 -refill_buffers -norandommap -randrepeat=0 -group_reporting -name=fio-randread-lat -filename=/dev/vdb
边栏推荐
- LVM (PV, PE, VG, LV)
- 网络安全与等级保护
- Mikrotik ROS soft route setting Internet access mode (III)
- The third "intelligence Cup" National College Students' IT skills competition (solution to group B of the preliminary competition)
- fio测试硬盘性能
- Leetcode:905. Sort array by parity [double pointer + implementation in three languages]
- leetcode-序列和为K的数量-对前缀和和哈希代码的分析
- 黑马程序员多线程实现方式三
- 浅谈Excel文件解析
- Mikrotik ROS软路由设置上网方式(一)
猜你喜欢
Mikrotik ROS soft route setting Internet access mode (III)
DHCP服务与配置
静态路由复习
CA gem5 stats.txt 统计信息
虚幻引擎学习(一)
进程和计划任务管理
Network Security Learning (XX) ACL
The third "intelligence Cup" National College Students' IT skills competition (solution to group B of the preliminary competition)
网络安全学习(十六)
Mikrotik ROS soft route setting Internet access mode (I)
随机推荐
Deep parsing ThreadLocal
NJU南京大学数电实验课大实验:字符小游戏
学习笔记:猫眼top100电影信息爬取
2022-7-8 Group 8 Gu Yujia's Outward Bound Training
Computer 408+ database [suitable for postgraduate entrance examination or final review]
Postgresql Tutorial
Mikrotik ROS soft route setting Internet access mode (I)
DHCP service and configuration
Network Security Learning (XIX) HSRP protocol
DHCP服务与配置
my homework 模板 latex版本
CSV intro
Leshan normal programming competition 2020-c: maximum product [thinking]
firewall-cmd
Leshan normal programming competition 2020-e: divide stones [01 backpacks]
MongoDB
“==”与equals的区别
zabbix自动发现并监控GPU
南京大学计算方法(数值分析)期末复习笔记
TCP three handshakes and four swings