From 48ea8b8d122a88e4c20b370e1bf56a55426a595a Mon Sep 17 00:00:00 2001 From: 12b Date: Tue, 12 Jan 2021 13:16:59 +0100 Subject: [PATCH] Add small block size disk test --- README.md | 2 +- bin/disk-test.sh | 31 ++++++++++++++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f5104a9..07393cd 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The testing procedure mainly focusses on energy consuption and CPU/memory/disk s The full test procedure during which the energy consumption is measured takes one hour. During that period the CPU is heavily stressed for around 40 minutes, the system is idle for 10 minutes and the remaining 10 minutes are taken by the CPU/Memory/Disk tests (these tests can actually last less or more than 10 minutes depending on the performance of the machine being tested but the nergy consumption is done on the 60 first minutes after the styart of the test). -By default the disk speed is measured for sequential reads, sequential writes and a mix of random reads and writes with a 2 to 1 ratio (2 reads for 1 write) with a block size of 1024 KiB over 512 files of 128 MiB each (64 GiB total) +By default the disk speed is measured for sequential reads, sequential writes and a mix of random reads and writes with a 2 to 1 ratio (2 reads for 1 write) with block sizes of 4 kiB and 1024 kiB over 512 files of 128 MiB each (64 GiB total) But the total disk space that is used is adapted depending on the target board specs. The goal is to use a disk space that is at least 2 times larger than the system memory size to avoid having the results biased by the system file cache. This is a work in progress. diff --git a/bin/disk-test.sh b/bin/disk-test.sh index bd45fcc..a12f716 100755 --- a/bin/disk-test.sh +++ b/bin/disk-test.sh @@ -20,9 +20,10 @@ TEST_FILE_NUM=$3 #FILE_IO_MODE=async FILE_IO_MODE=sync THREADS=8 -#BLOCK_SIZE=16384 -BLOCK_SIZE=1048576 -#BLOCK_SIZE=4194304 +BLOCK_SIZE_1=4096 +BLOCK_SIZE_2=1048576 +BLOCK_SIZE_1_TXT="4 kiB" +BLOCK_SIZE_2_TXT="1 MiB" echo ' ' echo "#### Disk test ####" | tee -a $LOGFILE @@ -37,12 +38,24 @@ do done /usr/local/bin/sysbench fileio prepare --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE -echo "# sysbench random read/write test in current directory #" | tee -a $LOGFILE -/usr/local/bin/sysbench fileio run --threads=$THREADS --file-test-mode=rndrw --file-block-size=$BLOCK_SIZE --file-io-mode=$FILE_IO_MODE --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE --file-rw-ratio=2 2>&1 | tee -a $LOGFILE +echo "# sysbench $BLOCK_SIZE_1_TXT random read/write test #" | tee -a $LOGFILE +/usr/local/bin/sysbench fileio run --threads=$THREADS --file-test-mode=rndrw --file-block-size=$BLOCK_SIZE_1 --file-io-mode=$FILE_IO_MODE --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE --file-rw-ratio=2 2>&1 | tee -a $LOGFILE /usr/local/bin/sysbench fileio prepare --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE -echo "# sysbench sequential read test in current directory #" | tee -a $LOGFILE -/usr/local/bin/sysbench fileio run --threads=$THREADS --file-test-mode=seqrd --file-block-size=$BLOCK_SIZE --file-io-mode=$FILE_IO_MODE --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE +echo "# sysbench $BLOCK_SIZE_2_TXT random read/write test #" | tee -a $LOGFILE +/usr/local/bin/sysbench fileio run --threads=$THREADS --file-test-mode=rndrw --file-block-size=$BLOCK_SIZE_2 --file-io-mode=$FILE_IO_MODE --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE --file-rw-ratio=2 2>&1 | tee -a $LOGFILE + /usr/local/bin/sysbench fileio prepare --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE -echo "# sysbench sequential write test in current directory #" | tee -a $LOGFILE -/usr/local/bin/sysbench fileio run --threads=$THREADS --file-test-mode=seqwr --file-block-size=$BLOCK_SIZE --file-io-mode=async --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE +echo "# sysbench $BLOCK_SIZE_1_TXT sequential read test #" | tee -a $LOGFILE +/usr/local/bin/sysbench fileio run --threads=$THREADS --file-test-mode=seqrd --file-block-size=$BLOCK_SIZE_1 --file-io-mode=$FILE_IO_MODE --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE +/usr/local/bin/sysbench fileio prepare --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE +echo "# sysbench $BLOCK_SIZE_2_TXT sequential read test #" | tee -a $LOGFILE +/usr/local/bin/sysbench fileio run --threads=$THREADS --file-test-mode=seqrd --file-block-size=$BLOCK_SIZE_2 --file-io-mode=$FILE_IO_MODE --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE + +/usr/local/bin/sysbench fileio prepare --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE +echo "# sysbench $BLOCK_SIZE_1_TXT sequential write test #" | tee -a $LOGFILE +/usr/local/bin/sysbench fileio run --threads=$THREADS --file-test-mode=seqwr --file-block-size=$BLOCK_SIZE_1 --file-io-mode=async --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE +/usr/local/bin/sysbench fileio cleanup --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE +echo "# sysbench $BLOCK_SIZE_2_TXT sequential write test #" | tee -a $LOGFILE +/usr/local/bin/sysbench fileio run --threads=$THREADS --file-test-mode=seqwr --file-block-size=$BLOCK_SIZE_2 --file-io-mode=async --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE + /usr/local/bin/sysbench fileio cleanup --file-num=$TEST_FILE_NUM --file-total-size=$TEST_DISK_SPACE 2>&1 | tee -a $LOGFILE