Skip to content

Commit

Permalink
fxmark: add ssd support
Browse files Browse the repository at this point in the history
Signed-off-by: Li Zhijian <[email protected]>
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
zhijianli88 authored and rli9 committed Nov 6, 2017
1 parent f199037 commit 248da4f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
6 changes: 6 additions & 0 deletions jobs/fxmark-1hdd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<< : jobs/fxmark.yaml

disk:
- 1HDD

media: hdd
6 changes: 6 additions & 0 deletions jobs/fxmark-1ssd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<< : jobs/fxmark.yaml

disk:
- 1SSD

media: ssd
4 changes: 0 additions & 4 deletions jobs/fxmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ suite: fxmark
testcase: fxmark
category: benchmark

disk:
- 1HDD

fxmark:
test:
- DWAL
Expand All @@ -32,7 +29,6 @@ fxmark:
- DRBH
- DRBM
- DRBL
media: hdd
fstype:
- ext4
- ext4_no_jnl
Expand Down
29 changes: 25 additions & 4 deletions tests/fxmark
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,32 @@
cd $BENCHMARK_ROOT/$testcase || die "can not enter $BENCHMARK_ROOT/$testcase"

# fxmark can not be run until we change the source to fit the target machine
# TODO: support more media type: ssd,nvme,mem
# TODO: support more media type: nvme,mem
# after setup_config, the changes are like:
# $ git diff
# diff --git a/bin/run-fxmark.py b/bin/run-fxmark.py
# index 2df42a5..ec3b5df 100755
# --- a/bin/run-fxmark.py
# +++ b/bin/run-fxmark.py
# @@ -528,6 +528,9 @@ if __name__ == "__main__":
# # ("*", "*", "*", str(cpupol.PHYSICAL_CHIPS * cpupol.CORE_PER_CHIP), "*"))
# ]
#
# + Runner.HDDDEV="/dev/sdc"
# + Runner.SSDDEV="/dev/sdc"
# + run_config = [(Runner.CORE_FINE_GRAIN, PerfMon.LEVEL_LOW, ("hdd", "ext4", "DWAL", "*", "bufferedio")),]
# confirm_media_path()
# for c in run_config:
# runner = Runner(c[0], c[1], c[2])
setup_config()
{
partition="${partitions%% *}"
sed -i "s#HDDDEV.*=.*#HDDDEV = \"$partition\"#" bin/run-fxmark.py
sed -i "/ confirm_media_path()/i\ run_config = [(Runner.CORE_FINE_GRAIN, PerfMon.LEVEL_LOW, (\"$media\", \"$fstype\", \"$test\", \"*\", \"$directio\")),]" bin/run-fxmark.py
[ "$partition" ] || return

sed -i "/ confirm_media_path()/i\\
Runner.HDDDEV = \"$partition\"\n\
Runner.SSDDEV = \"$partition\"\n\
run_config = [(Runner.CORE_FINE_GRAIN, PerfMon.LEVEL_LOW, (\"$media\", \"$fstype\", \"$test\", \"*\", \"$directio\")),]" bin/run-fxmark.py
}

do_backup()
Expand All @@ -31,9 +51,10 @@ run()
{
echo -e "Y\nY" | ./bin/run-fxmark.py
}

do_backup

setup_config
setup_config || die "failed to setup configuration"

run

Expand Down

0 comments on commit 248da4f

Please sign in to comment.