diff --git a/diskspeed.sh b/diskspeed.sh new file mode 100755 index 0000000..c786afe --- /dev/null +++ b/diskspeed.sh @@ -0,0 +1,19 @@ +#! /usr/bin/bash +#inspired by Sun Knudsen + +# create the test files +echo "preparing tests" +sysbench fileio --file-total-size=8G prepare > /dev/null + +# Test with 16K block size, random read/write +echo "run test with 16K block size" +sysbench fileio --file-block-size=16K --file-total-size=8G --file-test-mode=rndrw --threads=$(nproc) run + +# Test with 1M block size, random read/write +echo "run test with 1M block size" +sysbench fileio --file-block-size=1M --file-total-size=8G --file-test-mode=rndrw --threads=$(nproc) run + +# cleanup the test files +sysbench fileio --file-total-size=8G cleanup + +