Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use FIO to test the pressure of hard disk in Linux system

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to use FIO to test the pressure of the hard disk in the Linux system. It is very detailed and has certain reference value. Interested friends must read it!

FIO is a very good tool for testing IOPS for stress testing and verification of disks. Disk IO is an important indicator for checking disk performance, which can be divided into two categories: read and write sequentially and randomly read and write according to the load. FIO is a tool that can generate many threads or processes and perform specific types of user-specified Icano operations. The typical use of FIO is to write and simulate job files that match the load of Icano. In other words, FIO is a multithreaded io generation tool that can generate a variety of IO patterns to test the performance of disk devices (including file systems, such as IO tests for network file system NFS).

FIO installation

Wget http://brick.kernel.dk/snaps/fio-2.0.7.tar.gz yum install libaio-devel installation dependency. We generally use libaio to initiate asynchronous IO requests. Tar-zxvf fio-2.0.7.tar.gz cd fio-2.0.7 make make install

Briefly introduce the parameters of fio

Ioengine: load engine. We usually use libaio to initiate asynchronous IO requests. Bs: IO size direct: write directly, bypass the operating system Cache. Because we are testing the hard drive, not the Cache of the operating system, it is set to 1. Rw: read-write mode, including sequential write write, sequential read read, random write randwrite, random read randread, etc. Size: addressing space, IO will fall on the hard disk space in the range of [0, size). This is a parameter that can affect IOPS. It is generally set to the size of the hard disk. Filename: test object iodepth: queue depth, which makes sense only when using libaio. This is a parameter that can affect IOPS. Runtime: test duration

Common test methods read fio-filename=/dev/sda-direct=1-iodepth 1-thread-rw=read-ioengine=psync-bs=16k-size=200G-numjobs=30-runtime=1000-group_reporting-name=mytest sequentially write fio-filename=/dev/sda-direct=1-iodepth 1-thread-rw=write-ioengine=psync-bs=16k-size=200G-numjobs=30-runtime=1000-group_reporting-name=mytest Random read fio-filename=/dev/sda-direct=1-iodepth 1-thread-rw=randread-ioengine=psync-bs=16k-size=200G-numjobs=30-runtime=1000-runtime=1000 Random Writing-group_reporting Sda-direct=1-iodepth 1-thread-rw=randwrite-ioengine=psync-bs=16k-size=200G-numjobs=30-runtime=1000-group_reporting-name=mytest mixed random read and write fio-filename=/dev/sda-direct=1-iodepth 1-thread-rw=randrw-rwmixread=70-ioengine=psync-bs=16k-size=200G-numjobs=30-runtime=100-group_reporting-name=mytest-ioscheduler=noop

Multi-disk fio test script

# / bin/bash#author wsm#date 2019/06/17#fio Sequential read Test #-filename Test object #-the direct=1 test process bypasses the buffer that comes with the machine. Make test results more realistic #-iodepth 1#-thread#-rw=read#-ioengine=psync io engine uses pync mode #-bs=16k single io block file size is 16k#-size=100G test file size #-numjobs=30 test thread is 30#-runtime=1000 test time is 1000 seconds #-group_reporting about displaying results, summarize information about each process #-name=mytestfor I in {a.. z} a {a.. z} Do fio-filename=/dev/sd$i-direct=1-iodepth 1-thread-rw=read-ioengine=psync-bs=16k-size=100G-numjobs=30-runtime=1000-group_reporting-name=mytestdone test results

Model: XXX; hard disk: 900G/SAS 10K/2.5 inch hard disk / RAID18k Random write: iops=7988k Random read: iops=111908k mixed read and write (read and write 7:3): read iops=1114 write iops=4791m order write: iops=1701m order read: iops=246 1m order read write (read write 7:3): read iops=134 write iops=56

The above is all the contents of the article "how to use FIO to stress test the hard drive in Linux system". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report