Difference between revisions of "Fio"
(Created page with "<code>wikipdia:fio</code> is a flexible io performance tester. See following examples to learn how to test your storage devices. == fio Examples =...") |
|||
Line 1: | Line 1: | ||
− | <code>[[ | + | <code>[[wikipedia:fio]]</code> is a flexible io [[Benchmarking tools|performance]] tester. See following examples to learn how to test your storage devices. |
Revision as of 15:59, 8 December 2019
wikipedia:fio
is a flexible io performance tester. See following examples to learn how to test your storage devices.
Contents
fio Examples
fio
Random read
cat random-read-test.fio ; <code>fio</code> random read of 1G of data [random-read] rw=randread size=1G directory=/tmp/fio-testing/data
mdir /tmp/fio-testing && fio random-read-test.fio
[1]
fio
Random Write
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
--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
[2]
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)
cat write-test-sequential.fio ; Sequential write of 1G of data [write] rw=write size=10G directory=/tmp/fio-testing
100% Read 4k
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
[3]
100% Write 4k
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
[4]
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
[5]
- 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
- 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
See also
Advertising: