Guest User

zfstest.sh

a guest
Jun 14th, 2024
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. #!/usr/bin/bash
  2.  
  3. DIR=/tank
  4.  
  5. LOGFILE="/$1" #filename of the logfile
  6.  
  7. iostat | tee -a "${LOGFILE}"
  8.  
  9. zpool status > $LOGFILE
  10. zpool list >> $LOGFILE
  11.  
  12. bonnie++ -u root -r 1024 -s 16384 -d /tank -f -b -n 1 -c 4 >> $LOGFILE
  13.  
  14. # sync randwrite = (writes 1G)
  15. 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}"
  16. rm $DIR/test.file
  17.  
  18. # sync randread (writes 1G)
  19. 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}"
  20. rm $DIR/test.file
  21.  
  22. # seq sync seqwrite (writes 5G)
  23. 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}"
  24. rm $DIR/test.file
  25.  
  26. # seq sync seqread (writes 1G)
  27. 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}"
  28. rm $DIR/test.file
  29.  
  30. #async uncached randwrite (writes 4G)
  31. 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}"
  32. rm $DIR/test.file
  33.  
  34. #async cached randwrite (writes 4G)
  35. 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}"
  36. rm $DIR/test.file
  37.  
  38. #async uncached randread (writes 4G)
  39. 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}"
  40. rm $DIR/test.file
  41.  
  42. #async cached randread (writes 4G)
  43. 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}"
  44. rm $DIR/test.file
  45.  
  46. #async uncached seqwrite (writes 8G)
  47. 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}"
  48. rm $DIR/test.file
  49.  
  50. #async cached seqwrite (writes 8G)
  51. 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}"
  52. rm $DIR/test.file
  53.  
  54. #async uncached seqread (writes 4G)
  55. 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}"
  56. rm $DIR/test.file
  57.  
  58. #async cached seqread (writes 4G)
  59. 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}"
  60. rm $DIR/test.file
  61.  
  62. fstrim -a
  63.  
  64. sleep 60
  65.  
  66. iostat | tee -a "${LOGFILE}"
  67.  
Add Comment
Please, Sign In to add comment