Skip to content

Instantly share code, notes, and snippets.

@xupeng
Created January 26, 2015 02:30
Show Gist options
  • Save xupeng/1ae0068b2994e9a85a35 to your computer and use it in GitHub Desktop.
Save xupeng/1ae0068b2994e9a85a35 to your computer and use it in GitHub Desktop.
fiotest-memblaze-fs.sh
#!/bin/bash
DEVICE="/ssd/test"
IOSTAT_DEVICE="memdiska"
BLOCK_SIZE="4k"
NUM_JOBS=16
RUNTIME=600
for BLOCK_SIZE in 4k 8k 16k; do
for NUM_JOBS in 8 16 32 64 96 128 144; do
echo $DEVICE $BLOCK_SIZE $NUM_JOBS
result_file="${BLOCK_SIZE}-${NUM_JOBS}"
cmd="fio --filename=${DEVICE} --direct=1 --rw=randrw --bs=${BLOCK_SIZE} --size=50G --numjobs=${NUM_JOBS} --runtime=${RUNTIME} --group_reporting --name=file1 --rwmixread=90 --thread --ioengine=psync --output ${result_file}.fio"
echo $cmd
iostat -xdm 5 ${IOSTAT_DEVICE} >> ${result_file}.iostat &
IOSTAT_PID=$!
$cmd > /dev/null 2>&1
kill -9 ${IOSTAT_PID} >/dev/null 2>&1
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment