Linux HDD Performance test Tool-FIO

Source: Internet
Author: User
Tags rand

1. Installation:
Method one: Direct with the command yum-y install Fio
Method Two: If the method is not OK, on the official website http://freshmeat.net/projects/fio/Download FIO installation package. The installation method is simple. After decompression, enter the directory input./configure make do install.


2. Implementation:
Command line:

Fio-filename=/data/fiotest-direct=1-ioengine=libaio-iodepth=16-rw=randrw-rwmixwrite=70-bs=64k-size=10g-numjobs =4-runtime=60-group_reporting-name=test_rwfio-filename=/data/fiotest-direct=1-ioengine=libaio-iodepth=16-rw= Randrw-rwmixwrite=70-bs=64k-size=10g-numjobs=4-runtime=60-group_reporting-name=test_rw

Script:

Vim/usr/local/src/fiotest.conf
[Global]filename=/data/fiotest  # The Device/file namedirect=1        # Use raw IO instead of buffered Ioioengine=libaio # Libaio is asynchronized io mode, Sync was synchronized modeiodepth=16      # If use Libaio, iodepth means the iOS can being S Ubmitted at the same time. It is important!size=10gnumjobs=5 # Number of clones of processes/threads for each       jobruntime=60      # in seconds for Each jobname=test_read[rw64k-rand]stonewall       # Wait until the previous job is finishedbs=64krw=randrwrwmixwrite= 70group_reportingrw512k-rand]stonewall       #wait until the previous job is finishedbs=512krw=randrwrwmixwrite= 70group_reporting

Note that the FIO test instructions need to be operated under root authority
The first text is a 5G text file that is generated in the/data directory after the run is finished.
The second test_read is that the test run results are displayed on the screen with Test_read: ...


3. About Parameters:
-filename: Can be added directly after the device name, such as-FILENAME/DEV/SDB1, you can also add the device's mount point file name, such as-filename=/data/testfile.
-directory: Sets the path prefix for filename, which can be omitted if the stake filename has a specified path.
The-direct:bool type, if set to True (1), means that no IO buffer is used, the test bypasses the machine's own buffer, and the test results are more realistic.
-ioengine=sync I/O engine, now FIO supports 19 kinds of ioengine. The default value is Sync Sync blocking I/o,libaio is the native asynchronous I/O for Linux.
There are usually two ways of synchronizing and asynchrony. The synchronized IO can only issue one IO request at a time, waiting for the kernel to complete before returning, so that the iodepth is always less than 1, but multiple threads concurrently can make iodepth larger. The asynchronous approach is to commit a batch of requests at once, waiting for a batch to complete, reducing the number of interactions
-iodepth:io queue Depth, when Ioengine takes an asynchronous approach, this parameter takes effect, representing the number of IO units that a batch commits to hold.
There are 5 types of-RW:
1.-rw=read
2.-rw=randread
3.-rw=write
4.-rw=randwrite
5.-RW=RANDRW-RWMIXREAD=70//mixed-mode reading accounted for 70
-bs:blocksize the size of each read and write, the default is 4k.
-size: The size of this test file is tested by default at 4k IO per session.
-numjobs: Specifies the number of clones (threads) of the job.
-runtime: Specifies the number of seconds after which the process is stopped. If this parameter is not specified, FIO executes to the specified file read-write complete.
-group_reporting: For realistic results, summarize information for each process, and when Numjobs is specified, the output is displayed in groups.
-name: Specifies the name of the job, which in the command line indicates that a new job is started.
-time_based: If the file is read/write when the time specified by runtime is not reached, it will continue to repeat until the runtime is finished.

[The END]

Linux HDD Performance test Tool-FIO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.