当前位置:网站首页>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
边栏推荐
猜你喜欢
2022-7-18 guyujia's study notes of group 8
Mikrotik ROS软路由配置PCC负载均衡实现双宽带叠加
使用google cloud部署基于flask的网站
2022-7-8 Group 8 Gu Yujia's Outward Bound Training
Postgresql Tutorial
Mikrotik ROS软路由设置上网方式(三)
网安学习(二十)ACL
Deep parsing ThreadLocal
Openstack queens create fixed IP virtual machine
The third "intelligence Cup" National College Students' IT skills competition (solution to group B of the preliminary competition)
随机推荐
育才项目运行流程
zabbix agent配置多server
LVM和磁盘配额
使用Google colab进行机器学习的经验
Stack simulation queue
DHCP第一次静态实验
Computer 408+ database [suitable for postgraduate entrance examination or final review]
Mikrotik ROS软路由设置上网方式(二)
iptables examples
进程和计划任务管理
Leshan normal programming competition 2020-e: divide stones [01 backpacks]
2022-7-18 guyujia's study notes of group 8
Unreal Engine learning (2)
黑马程序员线程池
Leetcode:2. Add two numbers [large number addition + analog carry]
Openstack queens create fixed IP virtual machine
numpy中选择特定两行
网安学习(二一)NAT 动态路由
網絡安全學習(十七)VlAN
静态路由复习