Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/bash
- DIR=/tank
- LOGFILE="/$1" #filename of the logfile
- iostat | tee -a "${LOGFILE}"
- zpool status > $LOGFILE
- zpool list >> $LOGFILE
- bonnie++ -u root -r 1024 -s 16384 -d /tank -f -b -n 1 -c 4 >> $LOGFILE
- # sync randwrite = (writes 1G)
- fio --filename=$DIR/test.file --name=sync_randwrite --rw=randwrite --bs=4k --direct=1 --sync=1 --numjobs=1 --ioengine=psync --iodepth=1 --refill_buffers --size=1G --loops=1 --group_reporting | tee -a "${LOGFILE}"
- rm $DIR/test.file
- # sync randread (writes 1G)
- fio --filename=$DIR/test.file --name=sync_randread --rw=randread --bs=4k --direct=1 --sync=1 --numjobs=1 --ioengine=psync --iodepth=1 --refill_buffers --size=1G --loops=10 --group_reporting | tee -a "${LOGFILE}"
- rm $DIR/test.file
- # seq sync seqwrite (writes 5G)
- fio --filename=$DIR/test.file --name=sync_seqwrite --rw=write --bs=4M --direct=1 --sync=1 --numjobs=1 --ioengine=psync --iodepth=1 --refill_buffers --size=5G --loops=1 --group_reporting | tee -a "${LOGFILE}"
- rm $DIR/test.file
- # seq sync seqread (writes 1G)
- fio --filename=$DIR/test.file --name=sync_seqread --rw=read --bs=4M --direct=1 --sync=1 --numjobs=1 --ioengine=psync --iodepth=1 --refill_buffers --size=1G --loops=10 --group_reporting | tee -a "${LOGFILE}"
- rm $DIR/test.file
- #async uncached randwrite (writes 4G)
- fio --filename=$DIR/test.file --name=async_uncached_randwrite --rw=randwrite --bs=4k --direct=1 --sync=0 --numjobs=4 --ioengine=libaio --iodepth=32 --refill_buffers --size=1G --loops=1 --group_reporting | tee -a "${LOGFILE}"
- rm $DIR/test.file
- #async cached randwrite (writes 4G)
- fio --filename=$DIR/test.file --name=async_cached_randwrite --rw=randwrite --bs=4k --direct=0 --sync=0 --numjobs=4 --ioengine=libaio --iodepth=32 --refill_buffers --size=1G --loops=1 --group_reporting | tee -a "${LOGFILE}"
- rm $DIR/test.file
- #async uncached randread (writes 4G)
- fio --filename=$DIR/test.file --name=async_uncached_randread --rw=randread --bs=4k --direct=1 --sync=0 --numjobs=4 --ioengine=libaio --iodepth=32 --refill_buffers --size=1G --loops=10 --group_reporting | tee -a "${LOGFILE}"
- rm $DIR/test.file
- #async cached randread (writes 4G)
- fio --filename=$DIR/test.file --name=async_cached_randread --rw=randread --bs=4k --direct=0 --sync=0 --numjobs=4 --ioengine=libaio --iodepth=32 --refill_buffers --size=1G --loops=10 --group_reporting | tee -a "${LOGFILE}"
- rm $DIR/test.file
- #async uncached seqwrite (writes 8G)
- fio --filename=$DIR/test.file --name=async_uncached_seqwrite --rw=write --bs=4M --direct=1 --sync=0 --numjobs=4 --ioengine=libaio --iodepth=32 --refill_buffers --size=2G --loops=1 --group_reporting | tee -a "${LOGFILE}"
- rm $DIR/test.file
- #async cached seqwrite (writes 8G)
- fio --filename=$DIR/test.file --name=async_cached_seqwrite --rw=write --bs=4M --direct=0 --sync=0 --numjobs=4 --ioengine=libaio --iodepth=32 --refill_buffers --size=2G --loops=1 --group_reporting | tee -a "${LOGFILE}"
- rm $DIR/test.file
- #async uncached seqread (writes 4G)
- fio --filename=$DIR/test.file --name=async_uncached_seqread --rw=read --bs=4M --direct=1 --sync=0 --numjobs=4 --ioengine=libaio --iodepth=32 --refill_buffers --size=1G --loops=50 --group_reporting | tee -a "${LOGFILE}"
- rm $DIR/test.file
- #async cached seqread (writes 4G)
- fio --filename=$DIR/test.file --name=async_cached_seqread --rw=read --bs=4M --direct=0 --sync=0 --numjobs=4 --ioengine=libaio --iodepth=32 --refill_buffers --size=1G --loops=50 --group_reporting | tee -a "${LOGFILE}"
- rm $DIR/test.file
- fstrim -a
- sleep 60
- iostat | tee -a "${LOGFILE}"
Add Comment
Please, Sign In to add comment