From f875bfd54d0fa05a33095c4fc910bd8e6358e00a Mon Sep 17 00:00:00 2001 From: rovandep Date: Tue, 6 Apr 2021 16:31:42 +0200 Subject: [PATCH 01/26] modify arguments approach with dry-run, usage and parameters --- volbench.sh | 104 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 74 insertions(+), 30 deletions(-) diff --git a/volbench.sh b/volbench.sh index 06a229c..1d73b96 100755 --- a/volbench.sh +++ b/volbench.sh @@ -1,55 +1,99 @@ #!/usr/bin/env bash - # published at https://github.com/chira001/volbench - PR and comments welcome - # originally inspired by https://github.com/leeliu/dbench ## checking if fio is installed if ! command -v fio &> /dev/null then echo "fio could not be found, please install fio." + command fio exit fi # specify a space seperated set of files to use as tests. tests are run in paralled across all files -if [ -z "${FIO_files}" ] -then FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" -fi - +FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" # note: the test files are not deleted at the end, to make it easy to run multiple tests # please remember to delete the test files - -# specify the size of the test files -if [ -z "${FIO_size}" ] -then FIO_size=100MB -fi - +# # specify the size of the test files +FIO_size=10MB # specify a ramp time before recording values - this should be around 10 seconds -if [ -z "${FIO_ramptime}" ] -then FIO_ramptime=1s -fi - +FIO_ramptime=10 # specify a runtime for each test - should be 30s minimum, but 120 is preferred -if [ -z "${FIO_runtime}" ] -then FIO_runtime=2s -fi - -# specify the percentage of read requests in mixed tests -if [ -z "${FIO_rwmixread}" ] -then FIO_rwmixread=75 -fi - +FIO_runtime=120 +# # specify the percentage of read requests in mixed tests +FIO_rwmixread=75 # specify how many write i/os before an fdatasync - 0 disables -if [ -z "${FIO_datasync}" ] -then FIO_fdatasync=0 -fi - +FIO_fdatasync=0 # specify default number of jobs per file - default to 1 (don't change this) FIO_numjobs=1 #specify default offset_increment - default to 0 (don't change this) FIO_offset_increment=0 +while getopts d:s:r:t:w:f:hq option +do + case "${option}" in + d) FIO_files=${OPTARG};; + s) FIO_size=${OPTARG};; + r) FIO_ramptime=${OPTARG};; + t) FIO_runtime=${OPTARG};; + w) FIO_rwmixread=${OPTARG};; + f) FIO_fdatasync=${OPTARG};; + q) + FIO_size=10MB + FIO_ramptime=1 + FIO_runtime=2;; + h) + echo "Usage: $0 [OPTION]..." + echo "Standardized benchmarking for volumes." + echo + echo " -h show the usage" + echo " -q run $0 with reduce ramp and run time to do a real dry-run" + echo + echo "Mandatory arguments for short options." + echo " -d space separated set of files to use as tests in parallel." + echo " e.g. & default; $FIO_files " + echo " -s size of the test files with a measurement unit" + echo " e.g. & default; 10MB" + echo " -r ramp time in seconds before recording values" + echo " e.g. & default; 10" + echo " -t run time in for each test" + echo " e.g. & default; 120" + echo " -w workload ratio of read requests in percentage" + echo " e.g. & default; 75" + echo " -f how many write I/Os before a fdatasync happnes" + echo " e.g. & default; 0 (disable)" + echo + echo "Example: \"$0 -d \"/mnt/data/file1 /mnt/data/file2\" -s 1 + echo "PR and Comments: " + exit ;; + esac +done + +if [[ $# -eq 0 ]] +then + echo "$0 will run with the following recommended parameters:" + echo " FIO_files=$FIO_files" + echo " FIO_size=$FIO_size" + echo " FIO_ramptime=$FIO_ramptime" + echo " FIO_runtime=$FIO_runtime" + echo " FIO_rwmixread=$FIO_rwmixread" + echo " FIO_fdatasync=$FIO_fdatasync" + echo "The total running time will be around 15 minutes." + echo + echo "For rapid dry-run, run \"$0 -q\" (total run time is around 30 seconds)." + echo "For details on the usage, run \"$0 -h\"." + echo + + # below read and case should be remove when containerized + read -p "Continue with the above values? " answer + case $answer in + [yY] ) echo "Starting $0 with default parameters...";; + [nN] ) exit;; + esac +fi + + #define some colour escape codes YELLOW='\033[1;33m' @@ -58,7 +102,7 @@ CYAN='\033[1;34m' NC='\033[0m' -# global setttins for all fio jobs +# global setttings for all fio jobs function fio-global { echo "[global] bs=${FIO_blocksize}k From f100fad7bae1fdacf238c84634d82fa533c6919c Mon Sep 17 00:00:00 2001 From: rovandep Date: Tue, 6 Apr 2021 18:01:54 +0200 Subject: [PATCH 02/26] fixing quotes issue --- volbench.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volbench.sh b/volbench.sh index 1d73b96..e066aa4 100755 --- a/volbench.sh +++ b/volbench.sh @@ -64,7 +64,7 @@ do echo " -f how many write I/Os before a fdatasync happnes" echo " e.g. & default; 0 (disable)" echo - echo "Example: \"$0 -d \"/mnt/data/file1 /mnt/data/file2\" -s 1 + echo "Example: $0 -d \"/mnt/data/file1 /mnt/data/file2\" -s 100MB -r 5 -t 5 -w 50 -f 50" echo "PR and Comments: " exit ;; esac From 8e4e63dd64ad978a98e7e34708d3a8fe6b3a7ca1 Mon Sep 17 00:00:00 2001 From: rovandep Date: Tue, 6 Apr 2021 20:07:12 +0200 Subject: [PATCH 03/26] add container config files to build and run volbench --- container/Dockerfile | 9 ++ container/docker-compose.yaml | 13 +++ container/volbench.sh | 183 ++++++++++++++++++++++++++++++++++ volbench.sh | 10 +- 4 files changed, 210 insertions(+), 5 deletions(-) create mode 100644 container/Dockerfile create mode 100644 container/docker-compose.yaml create mode 100755 container/volbench.sh diff --git a/container/Dockerfile b/container/Dockerfile new file mode 100644 index 0000000..cb49531 --- /dev/null +++ b/container/Dockerfile @@ -0,0 +1,9 @@ +FROM bash:latest + +RUN set -eux; \ + apk add --no-cache --virtual .build-deps \ + fio + +COPY volbench.sh / +CMD ["bash","/volbench.sh"] + diff --git a/container/docker-compose.yaml b/container/docker-compose.yaml new file mode 100644 index 0000000..442b4f9 --- /dev/null +++ b/container/docker-compose.yaml @@ -0,0 +1,13 @@ +version: '3.1' + +services: + volbench: + container_name: volbench-1 + image: volbench:latest + volumes: + - /tmp:/tmp + environment: + - FIO_size=1MB + - FIO_ramptime=1 + - FIO_runtime=5 + diff --git a/container/volbench.sh b/container/volbench.sh new file mode 100755 index 0000000..c6dce9b --- /dev/null +++ b/container/volbench.sh @@ -0,0 +1,183 @@ +#!/usr/bin/env bash +# published at https://github.com/chira001/volbench - PR and comments welcome +# originally inspired by https://github.com/leeliu/dbench + +# specify a space seperated set of files to use as tests. tests are run in paralled across all files +FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" +# note: the test files are not deleted at the end, to make it easy to run multiple tests +# please remember to delete the test files +# # specify the size of the test files +#FIO_size=10MB +# specify a ramp time before recording values - this should be around 10 seconds +#FIO_ramptime=10 +# specify a runtime for each test - should be 30s minimum, but 120 is preferred +#FIO_runtime=120 +# # specify the percentage of read requests in mixed tests +FIO_rwmixread=75 +# specify how many write i/os before an fdatasync - 0 disables +FIO_fdatasync=0 + +# specify default number of jobs per file - default to 1 (don't change this) +FIO_numjobs=1 +#specify default offset_increment - default to 0 (don't change this) +FIO_offset_increment=0 + +#define some colour escape codes +YELLOW='\033[1;33m' +GREEN='\033[1;32m' +CYAN='\033[1;34m' +NC='\033[0m' + + +# global setttings for all fio jobs +function fio-global { + echo "[global] +bs=${FIO_blocksize}k +ioengine=libaio +iodepth=$FIO_queuedepth +thread +direct=1 +fdatasync=$FIO_fdatasync +random_generator=tausworthe64 +random_distribution=random +rw=$FIO_readwrite +rwmixread=$FIO_rwmixread +percentage_random=$FIO_percentage_random +group_reporting=0 +time_based +ramp_time=$FIO_ramptime +runtime=$FIO_runtime" + echo +} + +# setup a job per test file +function fio-job { + for inp in $* + do + echo "[$inp]" + echo "numjobs=$FIO_numjobs" + echo "filename=$inp" + echo "size=$FIO_size" + echo "offset=0" + echo "offset_increment=$FIO_offset_increment" + done +} + +# parse the output of fio minimal data output +function fio-parse { + awk -F';' 'BEGIN {printf "%30s %8s %9s %8s %8s %9s %8s\n", "Test file", "R iops", "R lat ms", "R MB/s", "W iops", "W lat ms", "W MB/s"} {records +=1} {readsum += $8} {writesum += $49} {readmb += $7} {writemb += $48} {readlats += $40 } {writelats += $81} {printf "%30s '$YELLOW'%8d'$NC' '$GREEN'%9.3f'$NC' %8.1f '$YELLOW'%8d'$NC' '$GREEN'%9.3f'$NC' %8.1f \n", $3, $8, $40/1000, $7/1024, $49, $81/1000, $48/1024} END {printf "'$CYAN'%30s %8d %9.3f %8.1f %8d %9.3f %8.1f'$NC'\n\n", "TOTAL/Average", readsum, (readlats/records)/1000, readmb/1024, writesum, (writelats/records)/1000, writemb/1024}' +} + +#return a field from the minimal fio +function fio-getfield { + awk -F';' '{records +=1} {readsum += $8} {writesum += $49} {readmb += $7} {writemb += $48} {readlats += $40 } {writelats += $81} END {printf "%d %.3f %.1f %d %.3f %.1f\n", readsum, (readlats/records)/1000, readmb/1024, writesum, (writelats/records)/1000, writemb/1024}' | awk '{print $'$1'}' +} + +# sync and clear the caches, then run the fio job +function fio-run { + sync + + #if we are root, then drop the kernel caches + if [ $UID -eq 0 ] + then echo 1 > /proc/sys/vm/drop_caches + fi + + #combine the global params and the jobspec and run fio + ( fio-global ; fio-job $FIO_files ) | fio --minimal - +} + + +#start the suite of tests +echo +echo "Starting VolBench tests ..." +echo +echo "Test parameters:" +echo "FIO_files=$FIO_files" +echo "FIO_size=$FIO_size FIO_ramptime=$FIO_ramptime FIO_runtime=$FIO_runtime" +echo ; echo + + +# test concurrent random read iops - e.g. db queries/message bus +echo Testing read iops ... +FIO_blocksize=4k FIO_queuedepth=16 FIO_readwrite=randread FIO_percentage_random=100 +FIO_output=$(fio-run) +echo "$FIO_output" | fio-parse +READ_IOPS=`echo "$FIO_output" | fio-getfield 1` + +# test concurrent randdom write iops - e.g. db commits +echo Testing write iops ... +FIO_blocksize=4k FIO_queuedepth=16 FIO_readwrite=randwrite FIO_percentage_random=100 +FIO_output=$(fio-run) +echo "$FIO_output" | fio-parse +WRITE_IOPS=`echo "$FIO_output" | fio-getfield 4` + +# test read throughput +echo Testing read throughput ... +FIO_blocksize=128k FIO_queuedepth=16 FIO_readwrite=randread FIO_percentage_random=100 +FIO_output=$(fio-run) +echo "$FIO_output" | fio-parse +READ_MB=`echo "$FIO_output" | fio-getfield 3` + +# test write throughput +echo Testing write throughput ... +FIO_blocksize=128k FIO_queuedepth=16 FIO_readwrite=randwrite FIO_percentage_random=100 +FIO_output=$(fio-run) +echo "$FIO_output" | fio-parse +WRITE_MB=`echo "$FIO_output" | fio-getfield 6` + +# test read latency, low concurrency +echo Testing read latency ... +FIO_blocksize=4k FIO_queuedepth=4 FIO_readwrite=randread FIO_percentage_random=100 +FIO_output=$(fio-run) +echo "$FIO_output" | fio-parse +READ_LAT=`echo "$FIO_output" | fio-getfield 2` + +# test write latency, low concurrency +echo Testing write latency ... +FIO_blocksize=4k FIO_queuedepth=4 FIO_readwrite=randwrite FIO_percentage_random=100 +FIO_output=$(fio-run) +echo "$FIO_output" | fio-parse +WRITE_LAT=`echo "$FIO_output" | fio-getfield 5` + +# test concurrent read and write iops +echo Testing mixed iops ... +FIO_blocksize=4k FIO_queuedepth=16 FIO_readwrite=randrw FIO_percentage_random=100 +FIO_output=$(fio-run) +echo "$FIO_output" | fio-parse +READ_MIXED=`echo "$FIO_output" | fio-getfield 1` +WRITE_MIXED=`echo "$FIO_output" | fio-getfield 4` + +# update FIO_size and set increment to be able to split across 4 jobs +FIO_unit=`echo $FIO_size | sed 's/[0-9]//g'` +FIO_sizenumber=`echo $FIO_size | sed 's/[a-z]//ig'` +FIO_offset_increment=`expr $FIO_sizenumber / 4`$FIO_unit +FIO_oldsize=$FIO_size +FIO_size=$FIO_offset_increment + +# test read sequental throughput +echo Testing read seqential ... +FIO_blocksize=1M FIO_queuedepth=4 FIO_readwrite=read FIO_percentage_random=0 FIO_numjobs=4 +FIO_output=$(fio-run) +echo "$FIO_output" | fio-parse +READ_SEQ=`echo "$FIO_output" | fio-getfield 3` + +# test write sequention throughput +echo Testing write seqential ... +FIO_blocksize=1M FIO_queuedepth=4 FIO_readwrite=write FIO_percentage_random=0 FIO_numjobs=4 +FIO_output=$(fio-run) +echo "$FIO_output" | fio-parse +WRITE_SEQ=`echo "$FIO_output" | fio-getfield 6` + + +#output final report +echo +printf "%22s %10s %10s \n" "VolBench Summary" "Reads" "Writes" +echo "---------------------------------------------------------" +printf "%22s: %10s iops %10s iops\n" "I/O operations" ${READ_IOPS} ${WRITE_IOPS} +printf "%22s: %10s iops %10s iops\n" "Mixed I/O" ${READ_MIXED} ${WRITE_MIXED} +printf "%22s: %10s ms %10s ms \n" "Latency" ${READ_LAT} ${WRITE_LAT} +printf "%22s: %10s MB/s %10s MB/s\n" "Random throughput" ${READ_MB} ${WRITE_MB} +printf "%22s: %10s MB/s %10s MB/s\n" "Sequential throughput" ${READ_SEQ} ${WRITE_SEQ} +echo ; echo + +exit diff --git a/volbench.sh b/volbench.sh index e066aa4..6df0737 100755 --- a/volbench.sh +++ b/volbench.sh @@ -86,11 +86,11 @@ then echo # below read and case should be remove when containerized - read -p "Continue with the above values? " answer - case $answer in - [yY] ) echo "Starting $0 with default parameters...";; - [nN] ) exit;; - esac + #read -p "Continue with the above values? " answer + #case $answer in + # [yY] ) echo "Starting $0 with default parameters...";; + # [nN] ) exit;; + #esac fi From dfe2818809914e39df382dc0294ec1144ab5fbc3 Mon Sep 17 00:00:00 2001 From: rovandep Date: Tue, 6 Apr 2021 20:15:38 +0200 Subject: [PATCH 04/26] add container config files to build and run volbench --- container/docker-compose.yaml | 4 +++- container/volbench.sh | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/container/docker-compose.yaml b/container/docker-compose.yaml index 442b4f9..f728fd1 100644 --- a/container/docker-compose.yaml +++ b/container/docker-compose.yaml @@ -7,7 +7,9 @@ services: volumes: - /tmp:/tmp environment: + - FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" - FIO_size=1MB - FIO_ramptime=1 - FIO_runtime=5 - + - FIO_rwmixread=75 + - FIO_fdatasync=0 diff --git a/container/volbench.sh b/container/volbench.sh index c6dce9b..0b8b5a7 100755 --- a/container/volbench.sh +++ b/container/volbench.sh @@ -3,7 +3,7 @@ # originally inspired by https://github.com/leeliu/dbench # specify a space seperated set of files to use as tests. tests are run in paralled across all files -FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" +#FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" # note: the test files are not deleted at the end, to make it easy to run multiple tests # please remember to delete the test files # # specify the size of the test files @@ -13,9 +13,9 @@ FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" # specify a runtime for each test - should be 30s minimum, but 120 is preferred #FIO_runtime=120 # # specify the percentage of read requests in mixed tests -FIO_rwmixread=75 +#FIO_rwmixread=75 # specify how many write i/os before an fdatasync - 0 disables -FIO_fdatasync=0 +#FIO_fdatasync=0 # specify default number of jobs per file - default to 1 (don't change this) FIO_numjobs=1 From 474ef5acfdfe14dfadc22b2251c1aeb8df642ebe Mon Sep 17 00:00:00 2001 From: rovandep Date: Wed, 7 Apr 2021 01:05:17 +0200 Subject: [PATCH 05/26] build and run on k8s 1.20.2 --- container/deployment.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 container/deployment.yaml diff --git a/container/deployment.yaml b/container/deployment.yaml new file mode 100644 index 0000000..97ae35e --- /dev/null +++ b/container/deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + app: benchmark + name: benchmark +spec: + replicas: 1 + selector: + matchLabels: + app: benchmark + strategy: {} + template: + metadata: + creationTimestamp: null + labels: + app: benchmark + spec: + containers: + - image: volbench + name: volbench + resources: {} + imagePullPolicy: Never + env: + - name: FIO_files + value: "/tmp/volbenchtest1 /tmp/volbenchtest2" + - name: FIO_size + value: "1MB" + - name: FIO_ramptime + value: "1" + - name: FIO_runtime + value: "5" + - name: FIO_rwmixread + value: "75" + - name: FIO_fdatasync + value: "0" +status: {} From 2e7cde6d5c8fbd19011dca0893bc016ec60223c6 Mon Sep 17 00:00:00 2001 From: rovandep Date: Wed, 14 Apr 2021 20:36:44 +0200 Subject: [PATCH 06/26] containerized version --- {container => docker}/Dockerfile | 0 {container => docker}/docker-compose.yaml | 0 {container => k8s}/deployment.yaml | 0 {container => k8s}/volbench.sh | 0 k8s/volbench.yaml | 36 +++++++++++++++++++++++ volbench.sh => shell/volbench.sh | 0 6 files changed, 36 insertions(+) rename {container => docker}/Dockerfile (100%) rename {container => docker}/docker-compose.yaml (100%) rename {container => k8s}/deployment.yaml (100%) rename {container => k8s}/volbench.sh (100%) create mode 100644 k8s/volbench.yaml rename volbench.sh => shell/volbench.sh (100%) diff --git a/container/Dockerfile b/docker/Dockerfile similarity index 100% rename from container/Dockerfile rename to docker/Dockerfile diff --git a/container/docker-compose.yaml b/docker/docker-compose.yaml similarity index 100% rename from container/docker-compose.yaml rename to docker/docker-compose.yaml diff --git a/container/deployment.yaml b/k8s/deployment.yaml similarity index 100% rename from container/deployment.yaml rename to k8s/deployment.yaml diff --git a/container/volbench.sh b/k8s/volbench.sh similarity index 100% rename from container/volbench.sh rename to k8s/volbench.sh diff --git a/k8s/volbench.yaml b/k8s/volbench.yaml new file mode 100644 index 0000000..750bf2b --- /dev/null +++ b/k8s/volbench.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: volbench +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: volbenchtemp1 + namespace: volbench +spec: + storageClassName: "fast" + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +--- +apiVersion: v1 +kind: Pod +metadata: + name: volbench-runner + namespace: volbench +spec: + containers: + - name: alpine + image: alpine + command: ["/bin/sh"] + args: ["-c", 'apk update && apk add git fio bash --no-cache; git clone http://github.com/rovandep/volbench.git; /volbench/k8s/volbench.sh; sleep 36000'] + volumeMounts: + - mountPath: /tmp + name: tmp1 + volumes: + - name: tmp1 + persistentVolumeClaim: + claimName: volbenchtemp1 \ No newline at end of file diff --git a/volbench.sh b/shell/volbench.sh similarity index 100% rename from volbench.sh rename to shell/volbench.sh From 726cfc7d03dcdb584f36bb567ef41ff279224469 Mon Sep 17 00:00:00 2001 From: rovandep Date: Wed, 14 Apr 2021 20:47:09 +0200 Subject: [PATCH 07/26] containerized version --- k8s/volbench.sh | 10 +++++----- k8s/volbench.yaml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/k8s/volbench.sh b/k8s/volbench.sh index 0b8b5a7..711964d 100755 --- a/k8s/volbench.sh +++ b/k8s/volbench.sh @@ -7,15 +7,15 @@ # note: the test files are not deleted at the end, to make it easy to run multiple tests # please remember to delete the test files # # specify the size of the test files -#FIO_size=10MB +FIO_size=10MB # specify a ramp time before recording values - this should be around 10 seconds -#FIO_ramptime=10 +FIO_ramptime=10 # specify a runtime for each test - should be 30s minimum, but 120 is preferred -#FIO_runtime=120 +FIO_runtime=10 # # specify the percentage of read requests in mixed tests -#FIO_rwmixread=75 +FIO_rwmixread=75 # specify how many write i/os before an fdatasync - 0 disables -#FIO_fdatasync=0 +FIO_fdatasync=0 # specify default number of jobs per file - default to 1 (don't change this) FIO_numjobs=1 diff --git a/k8s/volbench.yaml b/k8s/volbench.yaml index 750bf2b..73cd300 100644 --- a/k8s/volbench.yaml +++ b/k8s/volbench.yaml @@ -26,7 +26,7 @@ spec: - name: alpine image: alpine command: ["/bin/sh"] - args: ["-c", 'apk update && apk add git fio bash --no-cache; git clone http://github.com/rovandep/volbench.git; /volbench/k8s/volbench.sh; sleep 36000'] + args: ["-c", 'apk update && apk add git fio bash --no-cache; git clone --single-branch --branch containerized http://github.com/rovandep/volbench.git; /volbench/k8s/volbench.sh; sleep 36000'] volumeMounts: - mountPath: /tmp name: tmp1 From 3ce76068cc7394d26e854362f09697e382a922e3 Mon Sep 17 00:00:00 2001 From: rovandep Date: Wed, 14 Apr 2021 20:49:51 +0200 Subject: [PATCH 08/26] containerized version --- k8s/volbench.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s/volbench.sh b/k8s/volbench.sh index 711964d..c33581c 100755 --- a/k8s/volbench.sh +++ b/k8s/volbench.sh @@ -3,7 +3,7 @@ # originally inspired by https://github.com/leeliu/dbench # specify a space seperated set of files to use as tests. tests are run in paralled across all files -#FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" +FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" # note: the test files are not deleted at the end, to make it easy to run multiple tests # please remember to delete the test files # # specify the size of the test files From 7af2f44e52b9b48bb58574dc03938c67bbd4209e Mon Sep 17 00:00:00 2001 From: rovandep Date: Wed, 14 Apr 2021 20:55:26 +0200 Subject: [PATCH 09/26] containerized version --- k8s/volbench.sh | 18 +++++++++--------- k8s/volbench.yaml | 13 +++++++++++++ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/k8s/volbench.sh b/k8s/volbench.sh index c33581c..c2f82b2 100755 --- a/k8s/volbench.sh +++ b/k8s/volbench.sh @@ -3,19 +3,19 @@ # originally inspired by https://github.com/leeliu/dbench # specify a space seperated set of files to use as tests. tests are run in paralled across all files -FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" +#FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" # note: the test files are not deleted at the end, to make it easy to run multiple tests # please remember to delete the test files # # specify the size of the test files -FIO_size=10MB +#FIO_size=10MB # specify a ramp time before recording values - this should be around 10 seconds -FIO_ramptime=10 +#FIO_ramptime=10 # specify a runtime for each test - should be 30s minimum, but 120 is preferred -FIO_runtime=10 +#FIO_runtime=10 # # specify the percentage of read requests in mixed tests -FIO_rwmixread=75 +#FIO_rwmixread=75 # specify how many write i/os before an fdatasync - 0 disables -FIO_fdatasync=0 +#FIO_fdatasync=0 # specify default number of jobs per file - default to 1 (don't change this) FIO_numjobs=1 @@ -78,9 +78,9 @@ function fio-run { sync #if we are root, then drop the kernel caches - if [ $UID -eq 0 ] - then echo 1 > /proc/sys/vm/drop_caches - fi + # if [ $UID -eq 0 ] + # then echo 1 > /proc/sys/vm/drop_caches + # fi #combine the global params and the jobspec and run fio ( fio-global ; fio-job $FIO_files ) | fio --minimal - diff --git a/k8s/volbench.yaml b/k8s/volbench.yaml index 73cd300..ad03360 100644 --- a/k8s/volbench.yaml +++ b/k8s/volbench.yaml @@ -30,6 +30,19 @@ spec: volumeMounts: - mountPath: /tmp name: tmp1 + env: + - name: FIO_files + value: "/tmp/volbenchtest1 /tmp/volbenchtest2" + - name: FIO_size + value: "1MB" + - name: FIO_ramptime + value: "1" + - name: FIO_runtime + value: "5" + - name: FIO_rwmixread + value: "75" + - name: FIO_fdatasync + value: "0" volumes: - name: tmp1 persistentVolumeClaim: From 2f9e77b49842f00ae081882463cb7218b756e09c Mon Sep 17 00:00:00 2001 From: rovandep Date: Wed, 14 Apr 2021 20:56:13 +0200 Subject: [PATCH 10/26] containerized version --- k8s/deployment.yaml | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 k8s/deployment.yaml diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml deleted file mode 100644 index 97ae35e..0000000 --- a/k8s/deployment.yaml +++ /dev/null @@ -1,38 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - creationTimestamp: null - labels: - app: benchmark - name: benchmark -spec: - replicas: 1 - selector: - matchLabels: - app: benchmark - strategy: {} - template: - metadata: - creationTimestamp: null - labels: - app: benchmark - spec: - containers: - - image: volbench - name: volbench - resources: {} - imagePullPolicy: Never - env: - - name: FIO_files - value: "/tmp/volbenchtest1 /tmp/volbenchtest2" - - name: FIO_size - value: "1MB" - - name: FIO_ramptime - value: "1" - - name: FIO_runtime - value: "5" - - name: FIO_rwmixread - value: "75" - - name: FIO_fdatasync - value: "0" -status: {} From 7f0ba7793754201f3ef0673ca9cdc8ffee86e971 Mon Sep 17 00:00:00 2001 From: rovandep Date: Wed, 14 Apr 2021 21:41:58 +0200 Subject: [PATCH 11/26] containerized version --- k8s/README.md | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 k8s/README.md diff --git a/k8s/README.md b/k8s/README.md new file mode 100644 index 0000000..6b565eb --- /dev/null +++ b/k8s/README.md @@ -0,0 +1,83 @@ +# volbench on k8s +Standardized benchmarking for volumes hosted on kubernetes + +## how does it look like +To guarantee the simplest usage possible, the k8s version is composed of two files: +- ```volbench.sh``` which is the actual bash script calling ```fio``` with the relevant benchmarking profile +- ```volbench.yaml``` which is a standard yaml configuration file + +Note: ```volbench.sh``` has very few changes from the CLI version to run smoothly as a pod on k8s. + +## what does ```volbench.yaml``` do +When applying the file towards a k8s cluster, it will create: +- a namespace called ```volbench``` +- a persistent volume claim called ```volbenchtemp1``` linked to the created namespace +- a pod called ```volbench-runner``` within the created namespace consuming the persistent volume + +Here is the full yaml file: +```yaml +apiVersion: v1 +kind: Namespace +metadata: + name: volbench +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: volbenchtemp1 + namespace: volbench +spec: + storageClassName: "fast" + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +--- +apiVersion: v1 +kind: Pod +metadata: + name: volbench-runner + namespace: volbench +spec: + containers: + - name: alpine + image: alpine + command: ["/bin/sh"] + args: ["-c", 'apk update && apk add git fio bash --no-cache; git clone --single-branch --branch containerized http://github.com/rovandep/volbench.git; /volbench/k8s/volbench.sh; sleep 36000'] + volumeMounts: + - mountPath: /tmp + name: tmp1 + env: + - name: FIO_files + value: "/tmp/volbenchtest1 /tmp/volbenchtest2" + - name: FIO_size + value: "1MB" + - name: FIO_ramptime + value: "1" + - name: FIO_runtime + value: "5" + - name: FIO_rwmixread + value: "75" + - name: FIO_fdatasync + value: "0" + volumes: + - name: tmp1 + persistentVolumeClaim: + claimName: volbenchtemp1 +``` + +Note: there are environment variables defined under ```env:``` within the YAML configuration file defining the ```fio``` benchmarking profile. + +Here is an overview of the ones shipped in the configuraiton file that allows a very fast run to check that all is working as expected. + + +## how to use it +In a nutshell, from the above YAML output: +- the ```storageClassName``` might need to be change to match the existing ```storageClassName``` on the targeted k8s. +- the ```env``` field might need to be change to match the desired ```fio``` benchmarking profile. + +Then: +[![asciicast](https://asciinema.org/a/407266.svg)](https://asciinema.org/a/407266) + + \ No newline at end of file From e2ef89739a527d2e89735c2d4559a32636211848 Mon Sep 17 00:00:00 2001 From: rovandep Date: Wed, 14 Apr 2021 21:42:21 +0200 Subject: [PATCH 12/26] containerized version --- k8s/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/k8s/README.md b/k8s/README.md index 6b565eb..2e1f05e 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -78,6 +78,4 @@ In a nutshell, from the above YAML output: - the ```env``` field might need to be change to match the desired ```fio``` benchmarking profile. Then: -[![asciicast](https://asciinema.org/a/407266.svg)](https://asciinema.org/a/407266) - - \ No newline at end of file +[![asciicast](https://asciinema.org/a/407266.svg)](https://asciinema.org/a/407266) \ No newline at end of file From 49bcbc5462fe8cfb438a2bb7186df59e4b607d71 Mon Sep 17 00:00:00 2001 From: rovandep Date: Wed, 14 Apr 2021 21:58:24 +0200 Subject: [PATCH 13/26] containerized version --- README.md | 8 ++++---- cli/README.md | 6 ++++++ {shell => cli}/volbench.sh | 0 docker/Dockerfile | 9 --------- docker/docker-compose.yaml | 15 --------------- k8s/README.md | 18 +++++++++++++++++- 6 files changed, 27 insertions(+), 29 deletions(-) create mode 100644 cli/README.md rename {shell => cli}/volbench.sh (100%) delete mode 100644 docker/Dockerfile delete mode 100644 docker/docker-compose.yaml diff --git a/README.md b/README.md index e4a1e8d..8fd67cf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # volbench -Standardized benchmarking for volumes +Standardized benchmarking for volumes using ```fio``` -Example run: - -![volbench sample run](https://github.com/chira001/volbench/blob/main/images/samplerun.png) +There are two flavors: +- cli; benchmarking disks on a linux (virtual) machine +- k8s; benchmarking persistent volumes on kubernetes cluster diff --git a/cli/README.md b/cli/README.md new file mode 100644 index 0000000..e4a1e8d --- /dev/null +++ b/cli/README.md @@ -0,0 +1,6 @@ +# volbench +Standardized benchmarking for volumes + +Example run: + +![volbench sample run](https://github.com/chira001/volbench/blob/main/images/samplerun.png) diff --git a/shell/volbench.sh b/cli/volbench.sh similarity index 100% rename from shell/volbench.sh rename to cli/volbench.sh diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index cb49531..0000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM bash:latest - -RUN set -eux; \ - apk add --no-cache --virtual .build-deps \ - fio - -COPY volbench.sh / -CMD ["bash","/volbench.sh"] - diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml deleted file mode 100644 index f728fd1..0000000 --- a/docker/docker-compose.yaml +++ /dev/null @@ -1,15 +0,0 @@ -version: '3.1' - -services: - volbench: - container_name: volbench-1 - image: volbench:latest - volumes: - - /tmp:/tmp - environment: - - FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" - - FIO_size=1MB - - FIO_ramptime=1 - - FIO_runtime=5 - - FIO_rwmixread=75 - - FIO_fdatasync=0 diff --git a/k8s/README.md b/k8s/README.md index 2e1f05e..efade3a 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -68,8 +68,24 @@ spec: ``` Note: there are environment variables defined under ```env:``` within the YAML configuration file defining the ```fio``` benchmarking profile. +The following extract from ```volbench.sh``` provides a details about each variables: -Here is an overview of the ones shipped in the configuraiton file that allows a very fast run to check that all is working as expected. +```bash +# specify a space seperated set of files to use as tests. tests are run in paralled across all files +FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" +# note: the test files are not deleted at the end, to make it easy to run multiple tests +# please remember to delete the test files +# # specify the size of the test files +FIO_size=10MB +# specify a ramp time before recording values - this should be around 10 seconds +FIO_ramptime=10 +# specify a runtime for each test - should be 30s minimum, but 120 is preferred +FIO_runtime=10 +# # specify the percentage of read requests in mixed tests +FIO_rwmixread=75 +# specify how many write i/os before an fdatasync - 0 disables +FIO_fdatasync=0 +``` ## how to use it From 8e9f22736d7052e49ad4a44014d00a0dc0688fde Mon Sep 17 00:00:00 2001 From: rovandep Date: Wed, 14 Apr 2021 22:00:52 +0200 Subject: [PATCH 14/26] containerized version --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8fd67cf..45b45b1 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,5 @@ Standardized benchmarking for volumes using ```fio``` There are two flavors: -- cli; benchmarking disks on a linux (virtual) machine -- k8s; benchmarking persistent volumes on kubernetes cluster +- ```cli```; benchmarking disks on a linux (virtual) machine +- ```k8s```; benchmarking persistent volumes on kubernetes cluster From d9d839c20338199d410ada819573c22be0236a01 Mon Sep 17 00:00:00 2001 From: rovandep Date: Thu, 15 Apr 2021 00:05:29 +0200 Subject: [PATCH 15/26] containerized version --- k8s/volbench.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/k8s/volbench.yaml b/k8s/volbench.yaml index ad03360..09cd39c 100644 --- a/k8s/volbench.yaml +++ b/k8s/volbench.yaml @@ -23,16 +23,16 @@ metadata: namespace: volbench spec: containers: - - name: alpine - image: alpine + - name: ubuntu + image: ubuntu:latest command: ["/bin/sh"] - args: ["-c", 'apk update && apk add git fio bash --no-cache; git clone --single-branch --branch containerized http://github.com/rovandep/volbench.git; /volbench/k8s/volbench.sh; sleep 36000'] + args: ["-c", 'apt update; apt install -y fio git; git clone --single-branch --branch containerized http://github.com/rovandep/volbench.git; /volbench/k8s/volbench.sh; sleep 36000'] volumeMounts: - - mountPath: /tmp + - mountPath: /mnt name: tmp1 env: - name: FIO_files - value: "/tmp/volbenchtest1 /tmp/volbenchtest2" + value: "/mnt/volbenchtest1 /mnt/volbenchtest2" - name: FIO_size value: "1MB" - name: FIO_ramptime From b31f260bc4b96ab1ee9c5673f52851af8daa73f8 Mon Sep 17 00:00:00 2001 From: rovandep Date: Thu, 15 Apr 2021 00:08:26 +0200 Subject: [PATCH 16/26] containerized version --- k8s/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/k8s/README.md b/k8s/README.md index efade3a..af3c6c8 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -41,16 +41,16 @@ metadata: namespace: volbench spec: containers: - - name: alpine - image: alpine + - name: ubuntu + image: ubuntu:latest command: ["/bin/sh"] - args: ["-c", 'apk update && apk add git fio bash --no-cache; git clone --single-branch --branch containerized http://github.com/rovandep/volbench.git; /volbench/k8s/volbench.sh; sleep 36000'] + args: ["-c", 'apt update; apt install -y fio git; git clone --single-branch --branch containerized http://github.com/rovandep/volbench.git; /volbench/k8s/volbench.sh; sleep 36000'] volumeMounts: - - mountPath: /tmp + - mountPath: /mnt name: tmp1 env: - name: FIO_files - value: "/tmp/volbenchtest1 /tmp/volbenchtest2" + value: "/mnt/volbenchtest1 /mnt/volbenchtest2" - name: FIO_size value: "1MB" - name: FIO_ramptime @@ -72,7 +72,7 @@ The following extract from ```volbench.sh``` provides a details about each varia ```bash # specify a space seperated set of files to use as tests. tests are run in paralled across all files -FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2" +FIO_files="/mnt/volbenchtest1 /mnt/volbenchtest2" # note: the test files are not deleted at the end, to make it easy to run multiple tests # please remember to delete the test files # # specify the size of the test files From d14ce0483ae0f0342390f2072218651ad2dac9a8 Mon Sep 17 00:00:00 2001 From: rovandep Date: Thu, 15 Apr 2021 00:11:45 +0200 Subject: [PATCH 17/26] containerized version --- k8s/README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/k8s/README.md b/k8s/README.md index af3c6c8..b8fa9e1 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -1,14 +1,14 @@ -# volbench on k8s +## volbench on k8s Standardized benchmarking for volumes hosted on kubernetes -## how does it look like +### how does it look like To guarantee the simplest usage possible, the k8s version is composed of two files: - ```volbench.sh``` which is the actual bash script calling ```fio``` with the relevant benchmarking profile - ```volbench.yaml``` which is a standard yaml configuration file Note: ```volbench.sh``` has very few changes from the CLI version to run smoothly as a pod on k8s. -## what does ```volbench.yaml``` do +### what does ```volbench.yaml``` do When applying the file towards a k8s cluster, it will create: - a namespace called ```volbench``` - a persistent volume claim called ```volbenchtemp1``` linked to the created namespace @@ -87,8 +87,7 @@ FIO_rwmixread=75 FIO_fdatasync=0 ``` - -## how to use it +### how to use it In a nutshell, from the above YAML output: - the ```storageClassName``` might need to be change to match the existing ```storageClassName``` on the targeted k8s. - the ```env``` field might need to be change to match the desired ```fio``` benchmarking profile. From 54942c01b037240e1fb2d5144cdae2739f6174a4 Mon Sep 17 00:00:00 2001 From: rovandep Date: Thu, 15 Apr 2021 00:14:00 +0200 Subject: [PATCH 18/26] containerized version --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 45b45b1..0919504 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,7 @@ Standardized benchmarking for volumes using ```fio``` There are two flavors: - ```cli```; benchmarking disks on a linux (virtual) machine - ```k8s```; benchmarking persistent volumes on kubernetes cluster + +Example run: + +![volbench sample run](https://github.com/chira001/volbench/blob/main/images/samplerun.png) From 6c53132ff72a5e138a9163428e1769d9f4f51de8 Mon Sep 17 00:00:00 2001 From: "Rom;)" <55788733+rovandep@users.noreply.github.com> Date: Tue, 19 Oct 2021 13:17:29 -0700 Subject: [PATCH 19/26] Create volbench_hostpath.yaml --- k8s/volbench_hostpath.yaml | 65 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 k8s/volbench_hostpath.yaml diff --git a/k8s/volbench_hostpath.yaml b/k8s/volbench_hostpath.yaml new file mode 100644 index 0000000..d6f319f --- /dev/null +++ b/k8s/volbench_hostpath.yaml @@ -0,0 +1,65 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: volbench-hp +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: volbench-pv-hp + labels: + type: local +spec: + storageClassName: manual + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/tmp/data" +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: volbench-pvc-claim + namespace: volbench-hp +spec: + storageClassName: manual + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +--- +apiVersion: v1 +kind: Pod +metadata: + name: volbench-runner + namespace: volbench-hp +spec: + containers: + - name: ubuntu + image: ubuntu:latest + command: ["/bin/sh"] + args: ["-c", 'apt update; apt install -y fio git; git clone --single-branch --branch containerized http://github.com/rovandep/volbench.git; /volbench/k8s/volbench.sh; sleep 36000'] + volumeMounts: + - mountPath: /mnt + name: tmp1 + env: + - name: FIO_files + value: "/mnt/volbenchtest1 /mnt/volbenchtest2" + - name: FIO_size + value: "1MB" + - name: FIO_ramptime + value: "1" + - name: FIO_runtime + value: "5" + - name: FIO_rwmixread + value: "75" + - name: FIO_fdatasync + value: "0" + volumes: + - name: tmp1 + persistentVolumeClaim: + claimName: volbench-pvc-claim From 91f93a26f0aa422b47906ae3e978de77e4893607 Mon Sep 17 00:00:00 2001 From: "Rom;)" <55788733+rovandep@users.noreply.github.com> Date: Tue, 19 Oct 2021 13:18:05 -0700 Subject: [PATCH 20/26] Rename volbench.yaml to volbench_storageos.yaml --- k8s/{volbench.yaml => volbench_storageos.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename k8s/{volbench.yaml => volbench_storageos.yaml} (97%) diff --git a/k8s/volbench.yaml b/k8s/volbench_storageos.yaml similarity index 97% rename from k8s/volbench.yaml rename to k8s/volbench_storageos.yaml index 09cd39c..289ae9c 100644 --- a/k8s/volbench.yaml +++ b/k8s/volbench_storageos.yaml @@ -46,4 +46,4 @@ spec: volumes: - name: tmp1 persistentVolumeClaim: - claimName: volbenchtemp1 \ No newline at end of file + claimName: volbenchtemp1 From 1750c321d5ed9b07f7fa15e99e2db982980f81ec Mon Sep 17 00:00:00 2001 From: "Rom;)" <55788733+rovandep@users.noreply.github.com> Date: Tue, 19 Oct 2021 13:19:37 -0700 Subject: [PATCH 21/26] Update README.md --- k8s/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/k8s/README.md b/k8s/README.md index b8fa9e1..164a5c2 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -4,7 +4,8 @@ Standardized benchmarking for volumes hosted on kubernetes ### how does it look like To guarantee the simplest usage possible, the k8s version is composed of two files: - ```volbench.sh``` which is the actual bash script calling ```fio``` with the relevant benchmarking profile -- ```volbench.yaml``` which is a standard yaml configuration file +- ```volbench_storageos.yaml``` which is a standard yaml configuration file using the StorageOS ```fast``` default StorageClass +- ```volbench_hostpath.yaml```which is a standard yaml configuration file using the HostPath (local filesystem) as StorageClass Note: ```volbench.sh``` has very few changes from the CLI version to run smoothly as a pod on k8s. @@ -93,4 +94,4 @@ In a nutshell, from the above YAML output: - the ```env``` field might need to be change to match the desired ```fio``` benchmarking profile. Then: -[![asciicast](https://asciinema.org/a/407266.svg)](https://asciinema.org/a/407266) \ No newline at end of file +[![asciicast](https://asciinema.org/a/407266.svg)](https://asciinema.org/a/407266) From e2758280133b54eebd255add608f764f0d423fa9 Mon Sep 17 00:00:00 2001 From: "Rom;)" <55788733+rovandep@users.noreply.github.com> Date: Tue, 19 Oct 2021 13:20:23 -0700 Subject: [PATCH 22/26] Update volbench_hostpath.yaml --- k8s/volbench_hostpath.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s/volbench_hostpath.yaml b/k8s/volbench_hostpath.yaml index d6f319f..fe7526b 100644 --- a/k8s/volbench_hostpath.yaml +++ b/k8s/volbench_hostpath.yaml @@ -50,11 +50,11 @@ spec: - name: FIO_files value: "/mnt/volbenchtest1 /mnt/volbenchtest2" - name: FIO_size - value: "1MB" + value: "10MB" - name: FIO_ramptime - value: "1" + value: "10" - name: FIO_runtime - value: "5" + value: "60" - name: FIO_rwmixread value: "75" - name: FIO_fdatasync From 89d337cda9d73293ac80eae385ffd4b833f3cbac Mon Sep 17 00:00:00 2001 From: "Rom;)" <55788733+rovandep@users.noreply.github.com> Date: Tue, 19 Oct 2021 13:20:44 -0700 Subject: [PATCH 23/26] Update volbench_storageos.yaml --- k8s/volbench_storageos.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s/volbench_storageos.yaml b/k8s/volbench_storageos.yaml index 289ae9c..1c2528e 100644 --- a/k8s/volbench_storageos.yaml +++ b/k8s/volbench_storageos.yaml @@ -34,11 +34,11 @@ spec: - name: FIO_files value: "/mnt/volbenchtest1 /mnt/volbenchtest2" - name: FIO_size - value: "1MB" + value: "10MB" - name: FIO_ramptime - value: "1" + value: "10" - name: FIO_runtime - value: "5" + value: "60" - name: FIO_rwmixread value: "75" - name: FIO_fdatasync From 641118f205e1557ba520e61836d947c5d81674ca Mon Sep 17 00:00:00 2001 From: "Rom;)" <55788733+rovandep@users.noreply.github.com> Date: Tue, 19 Oct 2021 14:40:05 -0700 Subject: [PATCH 24/26] Update volbench_hostpath.yaml --- k8s/volbench_hostpath.yaml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/k8s/volbench_hostpath.yaml b/k8s/volbench_hostpath.yaml index fe7526b..35da536 100644 --- a/k8s/volbench_hostpath.yaml +++ b/k8s/volbench_hostpath.yaml @@ -1,23 +1,28 @@ ---- +-- apiVersion: v1 -kind: Namespace +kind: StorageClass metadata: - name: volbench-hp + name: volbench-local +provisioner: kubernetes.io/no-provisioner +volumeBindingMode: WaitForFirstConsumer --- apiVersion: v1 kind: PersistentVolume metadata: name: volbench-pv-hp - labels: - type: local spec: - storageClassName: manual + storageClassName: volbench-local capacity: storage: 1Gi accessModes: - ReadWriteOnce - hostPath: - path: "/tmp/data" + local: + path: "/tmp/volbench" +--- +apiVersion: v1 +kind: Namespace +metadata: + name: volbench-hp --- apiVersion: v1 kind: PersistentVolumeClaim @@ -25,7 +30,7 @@ metadata: name: volbench-pvc-claim namespace: volbench-hp spec: - storageClassName: manual + storageClassName: volbench-local accessModes: - ReadWriteOnce resources: From 87c54783b33537101f464a40edbeae675d47b327 Mon Sep 17 00:00:00 2001 From: "Rom;)" <55788733+rovandep@users.noreply.github.com> Date: Tue, 19 Oct 2021 14:41:04 -0700 Subject: [PATCH 25/26] Update volbench_hostpath.yaml --- k8s/volbench_hostpath.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s/volbench_hostpath.yaml b/k8s/volbench_hostpath.yaml index 35da536..2984d87 100644 --- a/k8s/volbench_hostpath.yaml +++ b/k8s/volbench_hostpath.yaml @@ -1,4 +1,4 @@ --- +--- apiVersion: v1 kind: StorageClass metadata: From 8d6932f2a735dfa981b8f3aca7a63f4c5f736687 Mon Sep 17 00:00:00 2001 From: "Rom;)" <55788733+rovandep@users.noreply.github.com> Date: Tue, 19 Oct 2021 14:42:11 -0700 Subject: [PATCH 26/26] Update volbench_hostpath.yaml --- k8s/volbench_hostpath.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s/volbench_hostpath.yaml b/k8s/volbench_hostpath.yaml index 2984d87..c4aff13 100644 --- a/k8s/volbench_hostpath.yaml +++ b/k8s/volbench_hostpath.yaml @@ -1,5 +1,5 @@ --- -apiVersion: v1 +apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: volbench-local