LOG_PATH=/home/fio.result
rm -rf ${LOG_PATH}

#512B 读测试
for loop in 1 2 3 4 5 6 7 8 9 10
do
echo 3 >/proc/sys/vm/drop_caches
fio -filename=/dev/sda -ioengine=psync -time_based=1 -rw=read -direct=1 -buffered=0 -thread  -size=110g -bs=512B -numjobs=16 -iodepth=1 -runtime=300 -lockmem=1G -group_reporting -name=read >> ${LOG_PATH}
done

#512B 写测试 
for loop in 1 2 3 4 5 6 7 8 9 10
do       
echo 3 >/proc/sys/vm/drop_caches
fio -filename=/dev/sda -ioengine=psync -time_based=1 -rw=write -direct=1 -buffered=0 -thread  -size=110g -bs=512B -numjobs=16 -iodepth=1 -runtime=300 -lockmem=1G -group_reporting -name=write >> ${LOG_PATH}
done

#512B 随机读测试
for loop in 1 2 3 4 5 6 7 8 9 10 4 5 6 7 8 9 10
do
echo 3 >/proc/sys/vm/drop_caches
fio -filename=/dev/sda -ioengine=psync -time_based=1 -rw=randread -direct=1 -buffered=0 -thread  -size=110g -bs=512B -numjobs=16 -iodepth=1 -runtime=300 -lockmem=1G -group_reporting -name=randread >> ${LOG_PATH}
done

#512B 随机写测试 
for loop in 1 2 3 4 5 6 7 8 9 10
do
echo 3 >/proc/sys/vm/drop_caches
fio -filename=/dev/sda -ioengine=psync -time_based=1 -rw=randwrite -direct=1 -buffered=0 -thread  -size=110g -bs=512B -numjobs=16 -iodepth=1 -runtime=300 -lockmem=1G -group_reporting -name=randwrite >> ${LOG_PATH}
done

#512B 混合读写测试 
for loop in 1 2 3 4 5 6 7 8 9 10
do
echo 3 >/proc/sys/vm/drop_caches
fio -filename=/dev/sda -ioengine=psync -time_based=1 -rw=rw -direct=1 -buffered=0 -thread -size=110g  -bs=512B -numjobs=16 -iodepth=1 -runtime=300 -lockmem=1G -group_reporting -name=rw  >> ${LOG_PATH}
done

#512B 随机混合读写测试
for loop in 1 2 3 4 5 6 7 8 9 10
do
echo 3 >/proc/sys/vm/drop_caches
fio -filename=/dev/sda -ioengine=psync -time_based=1 -rw=randrw -direct=1 -buffered=0 -thread -size=110g  -bs=512B -numjobs=16 -iodepth=1 -runtime=300 -lockmem=1G -group_reporting -name=randrw >> ${LOG_PATH}
done

###########################################################

#1M 读测试
for loop in 1 2 3 4 5 6 7 8 9 10
do
echo 3 >/proc/sys/vm/drop_caches
fio -filename=/dev/sda -ioengine=psync -time_based=1 -rw=read -direct=1 -buffered=0 -thread -size=110g  -bs=1M -numjobs=16 -iodepth=1 -runtime=300 -lockmem=1G -group_reporting -name=read >> ${LOG_PATH}
done

#1M 写测试
for loop in 1 2 3 4 5 6 7 8 9 10
do
echo 3 >/proc/sys/vm/drop_caches
fio -filename=/dev/sda -ioengine=psync -time_based=1 -rw=write -direct=1 -buffered=0 -thread -size=110g  -bs=1M -numjobs=16 -iodepth=1 -runtime=300 -lockmem=1G -group_reporting -name=write >> ${LOG_PATH}
done

#1M 随机读测试 
for loop in 1 2 3 4 5 6 7 8 9 10
do
echo 3 >/proc/sys/vm/drop_caches
fio -filename=/dev/sda -ioengine=psync -time_based=1 -rw=randread -direct=1 -buffered=0 -thread -size=110g  -bs=1M -numjobs=16 -iodepth=1 -runtime=300 -lockmem=1G -group_reporting -name=randread >> ${LOG_PATH}
done

#1M 随机写测试   
for loop in 1 2 3 4 5 6 7 8 9 10
do
echo 3 >/proc/sys/vm/drop_caches
fio -filename=/dev/sda -ioengine=psync -time_based=1 -rw=randwrite -direct=1 -buffered=0 -thread -size=110g  -bs=1M -numjobs=16 -iodepth=1 -runtime=300 -lockmem=1G -group_reporting -name=randwrite >> ${LOG_PATH}
done

#1M 混合读写测试 
for loop in 1 2 3 4 5 6 7 8 9 10
do
echo 3 >/proc/sys/vm/drop_caches
fio -filename=/dev/sda -ioengine=psync -time_based=1 -rw=rw -direct=1 -buffered=0 -thread -size=110g -bs=1M  -numjobs=16 -iodepth=1 -runtime=300 -lockmem=1G -group_reporting -name=rw  >> ${LOG_PATH}
done

#1M 随机混合读写测试 
for loop in 1 2 3 4 5 6 7 8 9 10
do
echo 3 >/proc/sys/vm/drop_caches
fio -filename=/dev/sda -ioengine=psync -time_based=1 -rw=randrw -direct=1 -buffered=0 -thread -size=110g -bs=1M  -numjobs=16 -iodepth=1 -runtime=300 -lockmem=1G -group_reporting -name=randrw >> ${LOG_PATH}
done
