Created
October 4, 2024 15:33
-
-
Save theundefined/c3d586ee3f632cbff23f3534d816d6e1 to your computer and use it in GitHub Desktop.
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 | |
TEST_DIR=$1 | |
NUM_JOBS=1 | |
SIZE=5G | |
mkdir -p $TEST_DIR | |
fio \ | |
--name=write_throughput \ | |
--directory=$TEST_DIR \ | |
--numjobs=$NUM_JOBS \ | |
--size=$SIZE \ | |
--fsync=1 \ | |
--time_based \ | |
--runtime=60s \ | |
--ramp_time=2s \ | |
--ioengine=libaio \ | |
--direct=1 \ | |
--verify=0 \ | |
--bs=1M \ | |
--iodepth=1 \ | |
--rw=write \ | |
--group_reporting=1 | |
# Clean up | |
rm -f $TEST_DIR/write* $TEST_DIR/read* | |
fio \ | |
--name=write_iops \ | |
--directory=$TEST_DIR \ | |
--size=$SIZE \ | |
--fsync=1 \ | |
--numjobs=$NUM_JOBS \ | |
--time_based \ | |
--runtime=60s \ | |
--ramp_time=2s \ | |
--ioengine=libaio \ | |
--direct=1 \ | |
--verify=0 \ | |
--bs=4K \ | |
--iodepth=1 \ | |
--rw=randwrite \ | |
--group_reporting=1 | |
# Clean up | |
rm -f $TEST_DIR/write* $TEST_DIR/read* | |
fio \ | |
--name=read_throughput \ | |
--directory=$TEST_DIR \ | |
--numjobs=$NUM_JOBS \ | |
--size=$SIZE \ | |
--fsync=1 \ | |
--time_based \ | |
--runtime=60s \ | |
--ramp_time=2s \ | |
--ioengine=libaio \ | |
--direct=1 \ | |
--verify=0 \ | |
--bs=1M \ | |
--iodepth=1 \ | |
--rw=read \ | |
--group_reporting=1 | |
# Clean up | |
rm -f $TEST_DIR/write* $TEST_DIR/read* | |
fio \ | |
--name=read_iops \ | |
--directory=$TEST_DIR \ | |
--numjobs=$NUM_JOBS \ | |
--size=$SIZE \ | |
--fsync=1 \ | |
--time_based \ | |
--runtime=60s \ | |
--ramp_time=2s \ | |
--ioengine=libaio \ | |
--direct=1 \ | |
--verify=0 \ | |
--bs=4K \ | |
--iodepth=1 \ | |
--rw=randread \ | |
--group_reporting=1 | |
# Clean up | |
rm -f $TEST_DIR/write* $TEST_DIR/read* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment