summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@utumno.home.lan>2019-10-18 22:23:38 -0700
committerroot <root@utumno.home.lan>2019-10-18 22:23:56 -0700
commit5fcad85847adf5741e07a0a77cc7fa1d1a8c5e45 (patch)
treeebddca98d23b1e342729df7a355ae4b611fa52d5
parentce57f737388fc153f368a6081fd992f02a63506e (diff)
2019 updates
-rwxr-xr-xbenches/buffered-read-multithreaded-largeblock16
-rwxr-xr-xbenches/buffered-read-multithreaded-smallblock16
-rwxr-xr-xbenches/dio-append-one-cpu14
-rwxr-xr-xbenches/dio-randread3
-rwxr-xr-xbenches/dio-randrw7
-rwxr-xr-xbenches/dio-randwrite1
-rwxr-xr-xbenches/dio-randwrite-unwritten3
-rwxr-xr-xprep-benchmark-fs.sh30
-rwxr-xr-xrun-benchmark.sh57
9 files changed, 93 insertions, 54 deletions
diff --git a/benches/buffered-read-multithreaded-largeblock b/benches/buffered-read-multithreaded-largeblock
new file mode 100755
index 0000000..12e2990
--- /dev/null
+++ b/benches/buffered-read-multithreaded-largeblock
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+fallocate -l8G test
+dd if=test of=/dev/null bs=8M 2>/dev/null
+
+fio --group_reporting \
+ --runtime=30 \
+ --name=read \
+ --ioengine=psync \
+ --filename=test \
+ --fallocate=none \
+ --fadvise_hint=0 \
+ --io_size=64G \
+ --rw=randread \
+ --blocksize=1M \
+ --numjobs=6
diff --git a/benches/buffered-read-multithreaded-smallblock b/benches/buffered-read-multithreaded-smallblock
new file mode 100755
index 0000000..69ef028
--- /dev/null
+++ b/benches/buffered-read-multithreaded-smallblock
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+fallocate -l8G test
+dd if=test of=/dev/null bs=8M 2>/dev/null
+
+fio --group_reporting \
+ --runtime=30 \
+ --name=read \
+ --ioengine=psync \
+ --filename=test \
+ --fallocate=none \
+ --fadvise_hint=0 \
+ --io_size=64G \
+ --rw=randread \
+ --blocksize=512 \
+ --numjobs=6
diff --git a/benches/dio-append-one-cpu b/benches/dio-append-one-cpu
deleted file mode 100755
index 4ecdf9f..0000000
--- a/benches/dio-append-one-cpu
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-fio --group_reporting \
- --runtime=30 \
- --size=16G \
- --name=dio-append-one-cpu \
- --ioengine=libaio \
- --direct=1 \
- --numjobs=64 \
- --rw=write \
- --blocksize=4k \
- --create_on_open=1 \
- --file_append=1 \
- --cpus_allowed=4
diff --git a/benches/dio-randread b/benches/dio-randread
index f935bfe..05faed9 100755
--- a/benches/dio-randread
+++ b/benches/dio-randread
@@ -8,4 +8,5 @@ fio --group_reporting \
--direct=1 \
--iodepth=64 \
--rw=randread \
- --blocksize=4k
+ --blocksize=4k \
+ --cpus_allowed=0
diff --git a/benches/dio-randrw b/benches/dio-randrw
index f39439e..aca3c11 100755
--- a/benches/dio-randrw
+++ b/benches/dio-randrw
@@ -6,6 +6,9 @@ fio --group_reporting \
--name=dio-randrw \
--ioengine=libaio \
--direct=1 \
- --iodepth=60 \
+ --iodepth=32 \
+ --iodepth_batch_complete_min=1 \
+ --iodepth_batch_complete_max=64 \
--rw=randrw \
- --blocksize=4k
+ --blocksize=4k \
+ --cpus_allowed=0
diff --git a/benches/dio-randwrite b/benches/dio-randwrite
index 3dc5a68..4eaf7a2 100755
--- a/benches/dio-randwrite
+++ b/benches/dio-randwrite
@@ -9,4 +9,5 @@ fio --group_reporting \
--iodepth=64 \
--rw=randwrite \
--blocksize=4k \
+ --cpus_allowed=0 \
--overwrite=1
diff --git a/benches/dio-randwrite-unwritten b/benches/dio-randwrite-unwritten
index 2c4d1f8..fd770ef 100755
--- a/benches/dio-randwrite-unwritten
+++ b/benches/dio-randwrite-unwritten
@@ -8,4 +8,5 @@ fio --group_reporting \
--direct=1 \
--iodepth=64 \
--rw=randwrite \
- --blocksize=4k
+ --blocksize=4k \
+ --cpus_allowed=0
diff --git a/prep-benchmark-fs.sh b/prep-benchmark-fs.sh
index 3a46946..9fee222 100755
--- a/prep-benchmark-fs.sh
+++ b/prep-benchmark-fs.sh
@@ -23,17 +23,17 @@ while getopts "hd:m:f:" arg; do
esac
done
-if [[ -z $DEV ]]; then
+if [[ -z ${DEV-} ]]; then
echo "Required parameter -d missing: device to test"
exit 1
fi
-if [[ -z $MNT ]]; then
+if [[ -z ${MNT-} ]]; then
echo "Required parameter -m missing: mount point"
exit 1
fi
-if [[ -z $FS ]]; then
+if [[ -z ${FS-} ]]; then
echo "Required parameter -f missing: filesystem type"
exit 1
fi
@@ -41,23 +41,27 @@ fi
umount $DEV >/dev/null 2>&1 || true
umount $MNT >/dev/null 2>&1 || true
-blkdiscard -s $DEV >/dev/null 2>&1 ||
- blkdiscard $DEV >/dev/null 2>&1 ||
- true
+blkdiscard $DEV >/dev/null 2>&1 || true
case $FS in
- bcache)
- wipefs -a $DEV
- bcache format \
- --error_action=panic \
- --data_csum_type=none \
- --cache $DEV
+ bcachefs)
+ bcachefs format -f \
+ --errors=panic \
+ $DEV
+ ;;
+ bcachefs-no-checksum)
+ bcachefs format -f \
+ --errors=panic \
+ --data_checksum=none \
+ $DEV
+ FS=bcachefs
;;
ext4)
mkfs.ext4 -F $DEV
;;
ext4-no-journal)
mkfs.ext4 -F -O ^has_journal $DEV
+ FS=ext4
;;
xfs)
mkfs.xfs -f $DEV
@@ -67,4 +71,4 @@ case $FS in
;;
esac
-mount $DEV $MNT
+mount -t $FS $DEV $MNT
diff --git a/run-benchmark.sh b/run-benchmark.sh
index 6643523..8a7058b 100755
--- a/run-benchmark.sh
+++ b/run-benchmark.sh
@@ -7,29 +7,29 @@ set -o pipefail
BENCHDIR=$(dirname "$(readlink -f "$0")")
-FILESYSTEMS="bcache ext4 ext4-no-journal xfs btrfs"
-DEVS="/dev/rssda /dev/sdb /dev/sda5"
-BENCHES=" \
- dio-randread \
- dio-randread-multithreaded \
- dio-randwrite \
- dio-randwrite-multithreaded \
- dio-randwrite-unwritten \
- dio-randwrite-multithreaded-unwritten \
- dio-randrw \
- dio-randrw-multithreaded \
- dio-append \
- dio-append-one-cpu \
- buffered-sync-append"
+FILESYSTEMS="bcachefs bcachefs-no-checksum ext4 ext4-no-journal xfs btrfs"
+
+#DEVS="/dev/rssda /dev/sdb /dev/sda5"
+DEVS="/dev/nvme0n1"
+
+BENCHES=$(cd $BENCHDIR/benches; echo *)
OUT=""
MNT=/mnt/run-benchmark
+usage()
+{
+ echo "run-benchmark.sh - run benchmarks"
+ echo " -d devices to test"
+ echo " -f filesystems to test"
+ echo " -b benchmarks to run"
+ echo " -m mountpoint to use (default /mnt/run-benchmark)"
+ echo " -o benchmark output directory (default /root/results/<date>_\$i/"
+ echo " -h display this help and exit"
+ exit 0
+}
+
while getopts "hd:f:b:m:o:" arg; do
case $arg in
- h)
- usage
- exit 0
- ;;
d)
DEVS=$OPTARG
;;
@@ -45,6 +45,10 @@ while getopts "hd:f:b:m:o:" arg; do
o)
OUT=$OPTARG
;;
+ h)
+ usage
+ exit 0
+ ;;
esac
done
shift $(( OPTIND - 1 ))
@@ -68,11 +72,17 @@ full=$OUT/full
truncate --size 0 $terse
truncate --size 0 $full
-echo "Test output in $OUT:"
+echo "Test output in $OUT"
+
+function cleanup {
+ umount $MNT > /dev/null 2>&1 || true
+}
+trap cleanup SIGINT SIGHUP SIGTERM EXIT
for dev in $DEVS; do
devname=$(basename $dev)
- model=$(hdparm -i $dev |tr ',' '\n'|sed -n 's/.*Model=\(.*\)/\1/p')
+ #model=$(hdparm -i $dev |tr ',' '\n'|sed -n 's/.*Model=\(.*\)/\1/p')
+ model=$(cat /sys/block/$devname/device/model)
echo "Device $devname ($model):" |tee -a $terse
@@ -85,16 +95,17 @@ for dev in $DEVS; do
printf " %-16s" $fs: |tee -a $terse
$BENCHDIR/prep-benchmark-fs.sh -d $dev -m $MNT -f $fs >/dev/null 2>&1
- sleep 30 # quiesce
+ sleep 30 # quiesce - SSDs are annoying
(cd $MNT; "$BENCHDIR/benches/$bench") > $out
umount $dev
echo "**** Device $devname ($model) filesystem $fs benchmark $benchname:" >> $full
cat $out >> $full
+
echo >> $full
- sed -rne '/iops/ s/ +([[:alpha:]]+) ?:.*iops=([0-9]+).*/\1 \2/ p' $out|
- awk '{printf("%8s %8d iops", $1, $2)} END {printf("\n")}'|
+ sed -rne '/IOPS/ s/ +([[:alpha:]]+) ?:.*IOPS=([^,]+).*/\1 \2/ p' $out|
+ awk '{printf("%8s %8s iops", $1, $2)} END {printf("\n")}'|
tee -a $terse
done
done