Created
September 10, 2025 00:42
-
-
Save TyeolRik/6f9d7bcb53b1547ac94bb841dbbf9891 to your computer and use it in GitHub Desktop.
Disk performance bench test with FIO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| FOLDER=/root/benchtest | |
| echo "Sequencial RW 50" | |
| echo "SSD" | |
| fio --name=seq_bw --filename=/root/fio_ssd_30g.raw --rw=readwrite --rwmixread=50 --bs=1M --iodepth=32 --numjobs=4 --ioengine=libaio --direct=1 --time_based=1 --runtime=300 --size=30G --fallocate=none --fsync=1 --fsync_on_close=1 --group_reporting --randrepeat=0 --refill_buffers=1 --thread --stonewall >> $FOLDER/seq_rw_ssd_result.txt | |
| echo "RAMDISK" | |
| fio --name=seq_bw --filename=/dev/ram0 --rw=readwrite --rwmixread=50 --bs=1M --iodepth=32 --numjobs=4 --ioengine=libaio --direct=1 --time_based=1 --runtime=300 --size=30G --fsync=1 --fsync_on_close=1 --group_reporting --randrepeat=0 --refill_buffers=1 --thread --stonewall >> $FOLDER/seq_rw_ramdisk_result.txt | |
| echo "TMPFS" | |
| fio --name=seq_bw --filename=/dev/shm/fio_tmpfs_30g.raw --rw=readwrite --rwmixread=50 --bs=1M --iodepth=32 --numjobs=4 --ioengine=libaio --direct=1 --time_based=1 --runtime=300 --size=30G --fallocate=none --fsync=1 --fsync_on_close=1 --group_reporting --randrepeat=0 --refill_buffers=1 --thread --stonewall >> $FOLDER/seq_rw_tmpfs_result.txt | |
| echo "Random RW 50" | |
| echo "SSD" | |
| fio --name=rand_iops --filename=/root/fio_ssd_30g.raw --rw=randrw --rwmixread=50 --bs=4k --iodepth=32 --numjobs=8 --ioengine=libaio --direct=1 --time_based=1 --runtime=300 --size=30G --fallocate=none --group_reporting --randrepeat=0 --refill_buffers=1 --lat_percentiles=1 --percentile_list=50:90:95:99:99.9 --thread --stonewall >> $FOLDER/rand_rw_ssd_result.txt | |
| echo "RAMDISK" | |
| fio --name=rand_iops --filename=/dev/ram0 --rw=randrw --rwmixread=50 --bs=4k --iodepth=32 --numjobs=8 --ioengine=libaio --direct=1 --time_based=1 --runtime=300 --size=30G --group_reporting --randrepeat=0 --refill_buffers=1 --lat_percentiles=1 --percentile_list=50:90:95:99:99.9 --thread --stonewall >> $FOLDER/rand_rw_ramdisk_result.txt | |
| echo "TMPFS" | |
| fio --name=rand_iops --filename=/dev/shm/fio_tmpfs_30g.raw --rw=randrw --rwmixread=50 --bs=4k --iodepth=32 --numjobs=8 --ioengine=libaio --direct=1 --time_based=1 --runtime=300 --size=30G --fallocate=none --group_reporting --randrepeat=0 --refill_buffers=1 --lat_percentiles=1 --percentile_list=50:90:95:99:99.9 --thread --stonewall >> $FOLDER/rand_rw_tmpfs_result.txt | |
| echo "MIX RW 70" | |
| echo "SSD" | |
| fio --name=mix_oltp --filename=/root/fio_ssd_30g.raw --rw=randrw --rwmixread=70 --bs=4k --iodepth=64 --numjobs=4 --ioengine=libaio --direct=1 --time_based=1 --runtime=300 --size=30G --fallocate=none --fsync=1 --fsync_on_close=1 --group_reporting --randrepeat=0 --refill_buffers=1 --lat_percentiles=1 --percentile_list=50:90:95:99:99.9 --thread --stonewall >> $FOLDER/read70_write30_ssd_result.txt | |
| echo "RAMDISK" | |
| fio --name=mix_oltp --filename=/dev/ram0 --rw=randrw --rwmixread=70 --bs=4k --iodepth=64 --numjobs=4 --ioengine=libaio --direct=1 --time_based=1 --runtime=300 --size=30G --fsync=1 --fsync_on_close=1 --group_reporting --randrepeat=0 --refill_buffers=1 --lat_percentiles=1 --percentile_list=50:90:95:99:99.9 --thread --stonewall >> $FOLDER/read70_write30_ramdisk_result.txt | |
| echo "TMPFS" | |
| fio --name=mix_oltp --filename=/dev/shm/fio_tmpfs_30g.raw --rw=randrw --rwmixread=70 --bs=4k --iodepth=64 --numjobs=4 --ioengine=libaio --direct=1 --time_based=1 --runtime=300 --size=30G --fallocate=none --fsync=1 --fsync_on_close=1 --group_reporting --randrepeat=0 --refill_buffers=1 --lat_percentiles=1 --percentile_list=50:90:95:99:99.9 --thread --stonewall >> $FOLDER/read70_write30_tmpfs_result.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment