Difference between revisions of "Fio"
Tags: Mobile web edit, Mobile edit |
|||
(21 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
− | == | + | = fio examples = |
+ | :--readwrite='''read''' | ||
+ | :--readwrite='''randread''' | ||
+ | :--readwrite='''write''' | ||
+ | :--readwrite='''randwrite''' | ||
+ | :--readwrite='''rw''' --rwmixwrite=70 | ||
− | == | + | == [[fio Random read]] == |
− | < | + | <code>fio --randrepeat=1 --size=5G --ioengine=libaio --direct=1 --gtod_reduce=1 --bs=4k --iodepth=64 --readwrite='''randread''' --name=MY_TEST --filename=TEST_TO_DELETE && rm TEST_TO_DELETE</code> |
− | + | ||
− | + | == [[fio Sequential Write]] == | |
− | + | <code>fio --randrepeat=1 --size=5G --ioengine=libaio --direct=1 --gtod_reduce=1 --bs=4k --iodepth=64 --readwrite='''write''' --name=MY_TEST --filename=TEST_TO_DELETE && rm TEST_TO_DELETE</code> | |
− | |||
− | size= | ||
− | |||
− | |||
− | |||
− | == | + | == [[fio Random Write]] == |
− | <code>fio --randrepeat=1 --size=5G --ioengine=libaio --direct=1 --gtod_reduce=1 --bs=4k --iodepth=64 --readwrite=randwrite --name=MY_TEST --filename=TEST_TO_DELETE</code> | + | <code>fio --randrepeat=1 --size=5G --ioengine=libaio --direct=1 --gtod_reduce=1 --bs=4k --iodepth=64 --readwrite='''randwrite''' --name=MY_TEST --filename=TEST_TO_DELETE && rm TEST_TO_DELETE</code> |
:<code>--randrepeat=1</code> | :<code>--randrepeat=1</code> | ||
:<code>--size=5G</code> | :<code>--size=5G</code> | ||
Line 85: | Line 85: | ||
* Read Write Performance Test: | * Read Write Performance Test: | ||
<code> sudo fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=random_read_write.fio --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75</code> | <code> sudo fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=random_read_write.fio --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75</code> | ||
− | |||
== Activities == | == Activities == | ||
# Read <code>fio</code> output explained article: https://tobert.github.io/post/2014-04-17-fio-output-explained.html | # Read <code>fio</code> output explained article: https://tobert.github.io/post/2014-04-17-fio-output-explained.html | ||
− | # [[ | + | # [[Benchmark disk performance using fio]] |
# Use <code>direct=0</code> or <code>direct=1</code> option and compare results. Review memory usage using <code>[[free (command)|free]]</code> command | # Use <code>direct=0</code> or <code>direct=1</code> option and compare results. Review memory usage using <code>[[free (command)|free]]</code> command | ||
+ | # review <code>--fallocate=none</code> option | ||
== See also == | == See also == | ||
− | * | + | * {{Io performance commands}} |
+ | * {{Block device hardware}} | ||
+ | * [[sysbench]] | ||
* [[Benchmarking tools]] | * [[Benchmarking tools]] | ||
[[Category:Storage]] | [[Category:Storage]] |
Latest revision as of 11:55, 23 April 2020
wikipedia:fio
is a flexible io performance tester. See following examples to learn how to test your storage devices.
Contents
fio examples[edit]
- --readwrite=read
- --readwrite=randread
- --readwrite=write
- --readwrite=randwrite
- --readwrite=rw --rwmixwrite=70
fio Random read[edit]
fio --randrepeat=1 --size=5G --ioengine=libaio --direct=1 --gtod_reduce=1 --bs=4k --iodepth=64 --readwrite=randread --name=MY_TEST --filename=TEST_TO_DELETE && rm TEST_TO_DELETE
fio Sequential Write[edit]
fio --randrepeat=1 --size=5G --ioengine=libaio --direct=1 --gtod_reduce=1 --bs=4k --iodepth=64 --readwrite=write --name=MY_TEST --filename=TEST_TO_DELETE && rm TEST_TO_DELETE
fio Random Write[edit]
fio --randrepeat=1 --size=5G --ioengine=libaio --direct=1 --gtod_reduce=1 --bs=4k --iodepth=64 --readwrite=randwrite --name=MY_TEST --filename=TEST_TO_DELETE && rm TEST_TO_DELETE
--randrepeat=1
--size=5G
--ioengine=libaio
--direct=1
--gtod_reduce=1
--bs=4k
--iodepth=64
--readwrite=randwrite
--name=MY_TEST
--filename=TEST_TO_DELETE
cat random-write-test.fio ; random write of 1G of data [random-write] rw=randwrite size=1G directory=/tmp/fio-testing/data
$ mdir /tmp/fio-testing && fio random-write-test.fio
[1]
Run status group 0 (all jobs): WRITE: bw=83.2MiB/s (87.3MB/s), 83.2MiB/s-83.2MiB/s (87.3MB/s-87.3MB/s), io=10.0GiB (10.7GB), run=123009-123009msec Disk stats (read/write): sdd: ios=0/348004, merge=0/292322, ticks=0/156728, in_queue=183700, util=95.38%
Use direct=0
or direct=1
and compare results.
Sequential Write (not random)[edit]
cat write-test-sequential.fio ; Sequential write of 1G of data [write] rw=write size=10G directory=/tmp/fio-testing
100% Read 4k[edit]
fio --filename=/dev/sdXXXX#### --direct=1 --rw=randrw --refill_buffers --norandommap --randrepeat=0 --ioengine=libaio --bs=4k --rwmixread=100 --iodepth=16 --numjobs=16 --runtime=60 --group_reporting --name=4ktest
[2]
100% Write 4k[edit]
fio --filename=/dev/sdXXXX#### --direct=1 --rw=randrw --refill_buffers --norandommap --randrepeat=0 --ioengine=libaio --bs=4k --rwmixread=0 --iodepth=16 --numjobs=16 --runtime=60 --group_reporting --name=4ktest
[3]
Example output:
.../... Run status group 0 (all jobs): WRITE: bw=596KiB/s (611kB/s), 596KiB/s-596KiB/s (611kB/s-611kB/s), io=35.6MiB (37.3MB), run=61170-61170msec Disk stats (read/write): sdc: ios=16/9115, merge=0/0, ticks=668/8173832, in_queue=8178340, util=99.90%
- Performing a Random Write Test:
sudo fio --name=randwrite --ioengine=libaio --iodepth=1 --rw=randwrite --bs=4k --direct=0 --size=512M --numjobs=2 --runtime=240 --group_reporting
[4]
- Read Write Performance Test:
sudo fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=random_read_write.fio --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75
Activities[edit]
- Read
fio
output explained article: https://tobert.github.io/post/2014-04-17-fio-output-explained.html - Benchmark disk performance using fio
- Use
direct=0
ordirect=1
option and compare results. Review memory usage usingfree
command - review
--fallocate=none
option
See also[edit]
- IO performance:
iotop, iostat, sar -d, fio, nmon, vmstat -d
,dd
,nmon
,stress
- Block devices: HDD, SSD, Intel Optane, block size
- sysbench
- Benchmarking tools
Advertising: