Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Ref: https://www.binarylane.com.au/support/solutions/articles/1000055889-how-to-benchmark-disk-i-o
- ###########################
- # Only needed for testing. $SPLUNK_HOME should be present when this script is run by Splunk
- #
- SPLUNK_HOME="/opt/splunk"
- # SPLUNK_HOME="/opt/splunkforwarder"
- # pushd `dirname $0` > /dev/null
- # SCRIPT_PATH=`pwd -P`
- # echo $SCRIPT_PATH
- # WHITELIST_FILE="$SCRIPT_PATH/whitelist.txt"
- ###########################
- BASE_DIRECTORY="$SPLUNK_HOME/etc/apps/TA-splunk_performance_tests"
- TOTAL_TEST_FILE_SIZE="10G"
- NUM_FILES="50"
- NUM_JOBS="1"
- SPLUNK_INDEX_PATH="/opt/splunk/var/lib/splunk"
- now="$(date +"%Y-%m-%d %H:%M:%S")"
- # Random Read Writes (25% reads 75% writes)
- ${BASE_DIRECTORY}/bin/fio --runtime=60 --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=hotwarm_random_rw_25_75 --filename=${SPLUNK_INDEX_PATH}/fio-test.dat --bs=4k --iodepth=64 --size=${TOTAL_TEST_FILE_SIZE} --nrfiles=${NUM_FILES} --numjobs=${NUM_JOBS} --readwrite=randrw --rwmixread=25 --disable_lat=0 --disable_clat=0 --disable_slat=0 --output-format=json+
- sleep 10
- # Random Read Writes (25% reads-random 75% writes-sequential)
- ${BASE_DIRECTORY}/bin/fio --runtime=60 --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=hotwarm_random_rw_25_75__readrand_writeseq --filename=${SPLUNK_INDEX_PATH}/fio-test.dat --bs=4k --iodepth=64 --size=${TOTAL_TEST_FILE_SIZE} --nrfiles=${NUM_FILES} --numjobs=${NUM_JOBS} --readwrite=randrw --rwmixread=25 --disable_lat=0 --disable_clat=0 --disable_slat=0 --percentage_random=100,0 --output-format=json+
- sleep 10
- # Sequential Read Writes (25% reads 75% writes)
- ${BASE_DIRECTORY}/bin/fio --runtime=60 --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=hotwarm_seqential_rw_25_75 --filename=${SPLUNK_INDEX_PATH}/fio-test.dat --bs=4k --iodepth=64 --size=${TOTAL_TEST_FILE_SIZE} --nrfiles=${NUM_FILES} --numjobs=${NUM_JOBS} --readwrite=rw --rwmixread=25 --disable_lat=0 --disable_clat=0 --disable_slat=0 --output-format=json+
- sleep 10
- # Random Read Writes (75% reads 25% writes)
- ${BASE_DIRECTORY}/bin/fio --runtime=60 --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=hotwarm_random_rw_75_25 --filename=${SPLUNK_INDEX_PATH}/fio-test.dat --bs=4k --iodepth=64 --size=${TOTAL_TEST_FILE_SIZE} --nrfiles=${NUM_FILES} --numjobs=${NUM_JOBS} --readwrite=randrw --rwmixread=75 --disable_lat=0 --disable_clat=0 --disable_slat=0 --output-format=json+
- sleep 10
- # Sequential Read Writes (75% reads 25% writes)
- ${BASE_DIRECTORY}/bin/fio --runtime=60 --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=hotwarm_seqential_rw_75_25 --filename=${SPLUNK_INDEX_PATH}/fio-test.dat --bs=4k --iodepth=64 --size=${TOTAL_TEST_FILE_SIZE} --nrfiles=${NUM_FILES} --numjobs=${NUM_JOBS} --readwrite=rw --rwmixread=75 --disable_lat=0 --disable_clat=0 --disable_slat=0 --output-format=json+
- sleep 10
- # Random Reads
- ${BASE_DIRECTORY}/bin/fio --runtime=60 --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=hotwarm_random_read --filename=${SPLUNK_INDEX_PATH}/fio-test.dat --bs=4k --iodepth=64 --size=${TOTAL_TEST_FILE_SIZE} --nrfiles=${NUM_FILES} --numjobs=${NUM_JOBS} --readwrite=randread --disable_lat=0 --disable_clat=0 --disable_slat=0 --output-format=json+
- sleep 10
- # Sequential Reads (Note last run contains unlink command to delete test file)
- ${BASE_DIRECTORY}/bin/fio --runtime=60 --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=hotwarm_sequential_read --filename=${SPLUNK_INDEX_PATH}/fio-test.dat --bs=4k --iodepth=64 --size=${TOTAL_TEST_FILE_SIZE} --nrfiles=${NUM_FILES} --numjobs=${NUM_JOBS} --readwrite=read --disable_lat=0 --disable_clat=0 --disable_slat=0 --unlink=1 --output-format=json+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement