-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40e58bc
commit e1af5c6
Showing
9 changed files
with
237 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
output="./results_bandwidth" | ||
iterations=3 | ||
mount_dir=$1 | ||
|
||
rm -rf ./blobfuse2.log | ||
rm -rf ${output} | ||
mkdir -p ${output} | ||
chmod 777 ${output} | ||
|
||
./blobfuse2 unmount all | ||
|
||
run_fio_job() { | ||
job_file=$1 | ||
bench_file=$2 | ||
log_dir=$4 | ||
|
||
job_name=$(basename "${job_file}") | ||
job_name="${job_name%.*}" | ||
|
||
echo -n "Running job ${job_name} for ${iterations} iterations... " | ||
|
||
for i in $(seq 1 $iterations); | ||
do | ||
echo -n "${i};" | ||
set +e | ||
timeout 300s fio --thread \ | ||
--output=${output}/${job_name}_iter${i}.json \ | ||
--output-format=json \ | ||
--directory=${mount_dir} \ | ||
--filename=${bench_file} \ | ||
--eta=never \ | ||
${job_file} | ||
job_status=$? | ||
set -e | ||
if [ $job_status -ne 0 ]; then | ||
echo "Job ${job_name} failed : ${job_status}" | ||
exit 1 | ||
fi | ||
done | ||
|
||
jq -n 'reduce inputs.jobs[] as $job (null; .name = $job.jobname | .len += 1 | .value += (if ($job."job options".rw == "read") | ||
then $job.read.bw / 1024 | ||
elif ($job."job options".rw == "randread") then $job.read.bw / 1024 | ||
elif ($job."job options".rw == "randwrite") then $job.write.bw / 1024 | ||
else $job.write.bw / 1024 end)) | {name: .name, value: (.value / .len), unit: "MiB/s"}' ${output}/${job_name}_iter*.json | tee ${output}/${job_name}_parsed.json | ||
} | ||
|
||
read_benchmark () { | ||
jobs_dir=./benchmark/fio_read_config | ||
|
||
for job_file in "${jobs_dir}"/*.fio; do | ||
job_name=$(basename "${job_file}") | ||
job_name="${job_name%.*}" | ||
|
||
echo "Running Read benchmark for ${job_name}" | ||
set +e | ||
./blobfuse2 mount ${mount_dir} --config-file=./config.yaml | ||
mount_status=$? | ||
set -e | ||
if [ $mount_status -ne 0 ]; then | ||
echo "Failed to mount file system" | ||
exit 1 | ||
fi | ||
sleep 3 | ||
|
||
run_fio_job $job_file ${job_name}.dat | ||
|
||
./blobfuse2 unmount all | ||
sleep 5 | ||
done | ||
} | ||
|
||
write_benchmark () { | ||
jobs_dir=./benchmark/fio_write_config | ||
|
||
for job_file in "${jobs_dir}"/*.fio; do | ||
job_name=$(basename "${job_file}") | ||
job_name="${job_name%.*}" | ||
|
||
echo "Running Write benchmark for ${job_name}" | ||
|
||
set +e | ||
./blobfuse2 mount ${mount_dir} --config-file=./config.yaml | ||
mount_status=$? | ||
set -e | ||
if [ $mount_status -ne 0 ]; then | ||
echo "Failed to mount file system" | ||
exit 1 | ||
fi | ||
sleep 3 | ||
|
||
run_fio_job $job_file ${job_name}.dat | ||
|
||
./blobfuse2 unmount all | ||
sleep 5 | ||
done | ||
} | ||
|
||
write_benchmark | ||
read_benchmark | ||
|
||
# combine all bench results into one json file | ||
jq -n '[inputs]' ${output}/*_parsed.json | tee ./benchmark/results.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[global] | ||
name=fs_bench | ||
bs=256k | ||
runtime=30s | ||
time_based | ||
group_reporting | ||
|
||
[random_read] | ||
size=10G | ||
rw=randread | ||
ioengine=sync | ||
fallocate=none | ||
startdelay=30s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[global] | ||
name=fs_bench | ||
bs=256k | ||
runtime=30s | ||
time_based | ||
group_reporting | ||
|
||
[random_read_small_file] | ||
size=5m | ||
rw=randread | ||
ioengine=sync | ||
fallocate=none | ||
startdelay=30s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[global] | ||
name=fs_bench | ||
bs=256k | ||
runtime=30s | ||
time_based | ||
group_reporting | ||
|
||
[sequential_read] | ||
size=10G | ||
rw=read | ||
ioengine=sync | ||
fallocate=none | ||
startdelay=30s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[global] | ||
name=fs_bench | ||
bs=256k | ||
runtime=30s | ||
time_based | ||
group_reporting | ||
|
||
[sequential_read_four_threads] | ||
size=10G | ||
rw=read | ||
ioengine=sync | ||
fallocate=none | ||
numjobs=4 | ||
startdelay=30s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[global] | ||
name=fs_bench | ||
bs=256k | ||
runtime=30s | ||
time_based | ||
group_reporting | ||
|
||
[sequential_read_small_file] | ||
size=5m | ||
rw=read | ||
ioengine=sync | ||
fallocate=none | ||
startdelay=30s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[global] | ||
name=fs_bench | ||
bs=256k | ||
runtime=30s | ||
time_based | ||
group_reporting | ||
|
||
[sequential_write] | ||
size=10G | ||
rw=write | ||
ioengine=sync | ||
fallocate=none | ||
startdelay=30s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
logging: | ||
level: log_err | ||
file-path: "./blobfuse2.log" | ||
type: base | ||
|
||
components: | ||
- libfuse | ||
- block_cache | ||
- attr_cache | ||
- azstorage | ||
|
||
libfuse: | ||
attribute-expiration-sec: 120 | ||
entry-expiration-sec: 120 | ||
negative-entry-expiration-sec: 240 | ||
ignore-open-flags: true | ||
|
||
block_cache: | ||
block-size-mb: 16 | ||
mem-size-mb: 102400 | ||
prefetch: 200 | ||
parallelism: 300 | ||
prefetch-on-open: true | ||
|
||
attr_cache: | ||
timeout-sec: 7200 | ||
|
||
azstorage: | ||
mode: key |