From 3e61601b8c2f080bc0a048e153033a1aeb568fc3 Mon Sep 17 00:00:00 2001 From: "Harper, Jason M" Date: Sat, 8 Nov 2025 09:23:30 -0800 Subject: [PATCH 1/4] refactor: update StorageBenchmarkScript to use libaio Signed-off-by: Harper, Jason M --- internal/script/script_defs.go | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/internal/script/script_defs.go b/internal/script/script_defs.go index c506d3a..b55633e 100644 --- a/internal/script/script_defs.go +++ b/internal/script/script_defs.go @@ -1142,21 +1142,24 @@ avx-turbo --min-threads=1 --max-threads=$num_cores_per_socket --test scalar_iadd StorageBenchmarkScriptName: { Name: StorageBenchmarkScriptName, ScriptTemplate: ` -numjobs=1 +numjobs=1 # number of parallel jobs to run file_size_g=5 space_needed_k=$(( (file_size_g + 1) * 1024 * 1024 * numjobs )) # space needed in kilobytes: (file_size_g + 1) GB per job ramp_time=5s -runtime=120s -ioengine=sync +runtime=30s +ioengine=libaio +iodepth=64 +iodepth_batch_submit=64 # must be less than or equal to iodepth +iodepth_batch_complete_max=64 # must be less than or equal to iodepth # check if .StorageDir is a directory if [[ ! -d "{{.StorageDir}}" ]]; then - echo "ERROR: {{.StorageDir}} does not exist" - exit 1 + echo "ERROR: {{.StorageDir}} does not exist" + exit 1 fi # check if .StorageDir is writeable if [[ ! -w "{{.StorageDir}}" ]]; then - echo "ERROR: {{.StorageDir}} is not writeable" - exit 1 + echo "ERROR: {{.StorageDir}} is not writeable" + exit 1 fi # check if .StorageDir has enough space # example output for df -P /tmp: @@ -1164,19 +1167,20 @@ fi # /dev/sdd 1055762868 196668944 805390452 20% / available_space=$(df -P "{{.StorageDir}}" | awk 'NR==2 {print $4}') if [[ $available_space -lt $space_needed_k ]]; then - echo "ERROR: {{.StorageDir}} has ${available_space}K available space. A minimum of ${space_needed_k}K is required to run this benchmark." - exit 1 + echo "ERROR: {{.StorageDir}} has ${available_space}K available space. A minimum of ${space_needed_k}K is required to run this benchmark." + exit 1 fi # create temporary directory for fio test test_dir=$(mktemp -d --tmpdir="{{.StorageDir}}") sync /sbin/sysctl -w vm.drop_caches=3 || true -# single-threaded read & write bandwidth test +# read & write bandwidth test fio --name=bandwidth --directory=$test_dir --numjobs=$numjobs \ --size="$file_size_g"G --time_based --runtime=$runtime --ramp_time=$ramp_time --ioengine=$ioengine \ ---direct=1 --verify=0 --bs=1M --iodepth=64 --rw=rw \ ---group_reporting=1 --iodepth_batch_submit=64 \ ---iodepth_batch_complete_max=64 +--direct=1 --verify=0 --bs=1M --iodepth=$iodepth --rw=rw \ +--group_reporting=1 --iodepth_batch_submit=$iodepth_batch_submit \ +--iodepth_batch_complete_max=$iodepth_batch_complete_max +# cleanup rm -rf $test_dir `, Superuser: true, From 9401eb618dd6cbeeeba715b55c49c82751ec313c Mon Sep 17 00:00:00 2001 From: "Harper, Jason M" Date: Sat, 8 Nov 2025 17:35:00 -0800 Subject: [PATCH 2/4] fix: improve comments in StorageBenchmarkScript for clarity Signed-off-by: Harper, Jason M --- internal/script/script_defs.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/script/script_defs.go b/internal/script/script_defs.go index b55633e..e138d8f 100644 --- a/internal/script/script_defs.go +++ b/internal/script/script_defs.go @@ -1142,13 +1142,13 @@ avx-turbo --min-threads=1 --max-threads=$num_cores_per_socket --test scalar_iadd StorageBenchmarkScriptName: { Name: StorageBenchmarkScriptName, ScriptTemplate: ` -numjobs=1 # number of parallel jobs to run -file_size_g=5 +numjobs=1 # number of parallel jobs to run +file_size_g=5 # each job will use a file of this size in GB space_needed_k=$(( (file_size_g + 1) * 1024 * 1024 * numjobs )) # space needed in kilobytes: (file_size_g + 1) GB per job ramp_time=5s runtime=30s ioengine=libaio -iodepth=64 +iodepth=64 # parallel operations per job iodepth_batch_submit=64 # must be less than or equal to iodepth iodepth_batch_complete_max=64 # must be less than or equal to iodepth # check if .StorageDir is a directory From 6af4fcfcf2d879740140c84e0c37cd8b3c3101f5 Mon Sep 17 00:00:00 2001 From: "Harper, Jason M" Date: Sat, 8 Nov 2025 09:23:30 -0800 Subject: [PATCH 3/4] refactor: update StorageBenchmarkScript to use libaio Signed-off-by: Harper, Jason M --- internal/script/script_defs.go | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/internal/script/script_defs.go b/internal/script/script_defs.go index c506d3a..b55633e 100644 --- a/internal/script/script_defs.go +++ b/internal/script/script_defs.go @@ -1142,21 +1142,24 @@ avx-turbo --min-threads=1 --max-threads=$num_cores_per_socket --test scalar_iadd StorageBenchmarkScriptName: { Name: StorageBenchmarkScriptName, ScriptTemplate: ` -numjobs=1 +numjobs=1 # number of parallel jobs to run file_size_g=5 space_needed_k=$(( (file_size_g + 1) * 1024 * 1024 * numjobs )) # space needed in kilobytes: (file_size_g + 1) GB per job ramp_time=5s -runtime=120s -ioengine=sync +runtime=30s +ioengine=libaio +iodepth=64 +iodepth_batch_submit=64 # must be less than or equal to iodepth +iodepth_batch_complete_max=64 # must be less than or equal to iodepth # check if .StorageDir is a directory if [[ ! -d "{{.StorageDir}}" ]]; then - echo "ERROR: {{.StorageDir}} does not exist" - exit 1 + echo "ERROR: {{.StorageDir}} does not exist" + exit 1 fi # check if .StorageDir is writeable if [[ ! -w "{{.StorageDir}}" ]]; then - echo "ERROR: {{.StorageDir}} is not writeable" - exit 1 + echo "ERROR: {{.StorageDir}} is not writeable" + exit 1 fi # check if .StorageDir has enough space # example output for df -P /tmp: @@ -1164,19 +1167,20 @@ fi # /dev/sdd 1055762868 196668944 805390452 20% / available_space=$(df -P "{{.StorageDir}}" | awk 'NR==2 {print $4}') if [[ $available_space -lt $space_needed_k ]]; then - echo "ERROR: {{.StorageDir}} has ${available_space}K available space. A minimum of ${space_needed_k}K is required to run this benchmark." - exit 1 + echo "ERROR: {{.StorageDir}} has ${available_space}K available space. A minimum of ${space_needed_k}K is required to run this benchmark." + exit 1 fi # create temporary directory for fio test test_dir=$(mktemp -d --tmpdir="{{.StorageDir}}") sync /sbin/sysctl -w vm.drop_caches=3 || true -# single-threaded read & write bandwidth test +# read & write bandwidth test fio --name=bandwidth --directory=$test_dir --numjobs=$numjobs \ --size="$file_size_g"G --time_based --runtime=$runtime --ramp_time=$ramp_time --ioengine=$ioengine \ ---direct=1 --verify=0 --bs=1M --iodepth=64 --rw=rw \ ---group_reporting=1 --iodepth_batch_submit=64 \ ---iodepth_batch_complete_max=64 +--direct=1 --verify=0 --bs=1M --iodepth=$iodepth --rw=rw \ +--group_reporting=1 --iodepth_batch_submit=$iodepth_batch_submit \ +--iodepth_batch_complete_max=$iodepth_batch_complete_max +# cleanup rm -rf $test_dir `, Superuser: true, From b1d7b1c03a812331db7931af02aff1fc61218fb5 Mon Sep 17 00:00:00 2001 From: "Harper, Jason M" Date: Sat, 8 Nov 2025 17:35:00 -0800 Subject: [PATCH 4/4] fix: improve comments in StorageBenchmarkScript for clarity Signed-off-by: Harper, Jason M --- internal/script/script_defs.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/script/script_defs.go b/internal/script/script_defs.go index b55633e..e138d8f 100644 --- a/internal/script/script_defs.go +++ b/internal/script/script_defs.go @@ -1142,13 +1142,13 @@ avx-turbo --min-threads=1 --max-threads=$num_cores_per_socket --test scalar_iadd StorageBenchmarkScriptName: { Name: StorageBenchmarkScriptName, ScriptTemplate: ` -numjobs=1 # number of parallel jobs to run -file_size_g=5 +numjobs=1 # number of parallel jobs to run +file_size_g=5 # each job will use a file of this size in GB space_needed_k=$(( (file_size_g + 1) * 1024 * 1024 * numjobs )) # space needed in kilobytes: (file_size_g + 1) GB per job ramp_time=5s runtime=30s ioengine=libaio -iodepth=64 +iodepth=64 # parallel operations per job iodepth_batch_submit=64 # must be less than or equal to iodepth iodepth_batch_complete_max=64 # must be less than or equal to iodepth # check if .StorageDir is a directory