Skip to content
Snippets Groups Projects
Commit 29e3b785 authored by Zach Brown's avatar Zach Brown
Browse files

- require iozone with the -+o patch

- simplify iozone file cleanup a little
- scale each thread's io contribution based on the number of threads
- fix sloppy shell arg passing that accidentally worked
parent b6695884
No related branches found
No related tags found
No related merge requests found
...@@ -268,6 +268,10 @@ ext2_iozone_prepare() { ...@@ -268,6 +268,10 @@ ext2_iozone_prepare() {
echo "iozone binary not found in PATH" echo "iozone binary not found in PATH"
return 1 return 1
fi fi
if ! iozone -i 0 -w -+o -s 1k -r 1k -f /dev/null > /dev/null; then
echo "iozone doesn't support -+o"
return 1
fi
if ! which mke2fs; then if ! which mke2fs; then
echo "mke2fs binary not found in PATH" echo "mke2fs binary not found in PATH"
return 1 return 1
...@@ -312,12 +316,12 @@ ext2_iozone_start() { ...@@ -312,12 +316,12 @@ ext2_iozone_start() {
case "$wor" in case "$wor" in
w) args="-i 0 -w" ;; w) args="-i 0 -w" ;;
r) args="-i 1 -w" ;; r) args="-i 1" ;;
*) die "asked to do io with $wor?" *) die "asked to do io with $wor?"
esac esac
echo iozone "$args -r ${iosize}k -s $(($io_len / $threads))k \ echo iozone "$args -r ${iosize}k -s $(($io_len / $threads))k \
-t $threads -x -I -f $f" -t $threads -+o -x -I -f $f"
} }
ext2_iozone_result() { ext2_iozone_result() {
local output=$1 local output=$1
...@@ -339,15 +343,8 @@ ext2_iozone_result() { ...@@ -339,15 +343,8 @@ ext2_iozone_result() {
{print $'$(($field + 2))'}' $output` / 1024 {print $'$(($field + 2))'}' $output` / 1024
} }
ext2_iozone_cleanup() { ext2_iozone_cleanup() {
local id=$1 # the final read w/o -w removed the file
local wor=$2 local nothing=0
local f="$tmpdir/mount_$id/iozone"
case "$wor" in
w) ;;
r) rm -f $f ;;
*) die "asked to do io with $wor?"
esac
} }
ext2_iozone_finish() { ext2_iozone_finish() {
local index=$1 local index=$1
...@@ -509,7 +506,7 @@ echo_filter_start() { ...@@ -509,7 +506,7 @@ echo_filter_start() {
local id=$4 local id=$4
local name="echo_$id" local name="echo_$id"
local len_pages=$(($io_len / $(($page_size / 1024)) )) local len_pages=$(($io_len / $(($page_size / 1024)) / $threads ))
local size_pages=$(($iosize / $(($page_size / 1024)) )) local size_pages=$(($iosize / $(($page_size / 1024)) ))
case "$wor" in case "$wor" in
...@@ -519,7 +516,7 @@ echo_filter_start() { ...@@ -519,7 +516,7 @@ echo_filter_start() {
esac esac
echo lctl --threads $threads v "\$"$name \ echo lctl --threads $threads v "\$"$name \
test_brw 1 $wor v $len_pages t${running_oids[$i]} p$size_pages test_brw 1 $wor v $len_pages t${running_oids[$id]} p$size_pages
} }
echo_filter_result() { echo_filter_result() {
local output=$1 local output=$1
...@@ -543,8 +540,8 @@ echo_filter_cleanup() { ...@@ -543,8 +540,8 @@ echo_filter_cleanup() {
*) die "asked to do io with $wor?" *) die "asked to do io with $wor?"
esac esac
lctl --device "\$"$name destroy ${running_oids[$i]} $threads lctl --device "\$"$name destroy ${running_oids[$id]} $threads
unset running_oids[$i] unset running_oids[$id]
} }
echo_filter_finish() { echo_filter_finish() {
local index=$1 local index=$1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment