Commit 44529dbf authored by Kirill Smelkov's avatar Kirill Smelkov

X neotest/bench-disk: Deduplicate code; change 1M -> 2M

So now we are benchmarking disk for sizes 4K and 2M which are the usual
sizes popping up with e.g. wendelin.core.
parent f6816a7c
...@@ -856,7 +856,6 @@ bench_cpu() { ...@@ -856,7 +856,6 @@ bench_cpu() {
bench_disk() { bench_disk() {
# ioping2bench <topic> - converts timings from ioping to std benchmark # ioping2bench <topic> - converts timings from ioping to std benchmark
ioping2bench() { ioping2bench() {
# XXX normalize all units to µs (benchstat treats time and µs as different - XXX better improve benchstat)
# min/avg/max/mdev = 102.2 us / 138.6 us / 403.3 us / 12.2 us # min/avg/max/mdev = 102.2 us / 138.6 us / 403.3 us / 12.2 us
sed -u -e \ sed -u -e \
"s|^min/avg/max/mdev = \([0-9.]\+\) \([^ ]\+\) / \([0-9.]\+\) \([^ ]\+\) / \([0-9.]\+\)\+ \([^ ]\+\) / \([0-9.]\+\) \([^ ]\+\)\$|&\n\ "s|^min/avg/max/mdev = \([0-9.]\+\) \([^ ]\+\) / \([0-9.]\+\) \([^ ]\+\) / \([0-9.]\+\)\+ \([^ ]\+\) / \([0-9.]\+\) \([^ ]\+\)\$|&\n\
...@@ -865,26 +864,27 @@ Benchmark$1-avg 1 \\3 \\4/op\ ...@@ -865,26 +864,27 @@ Benchmark$1-avg 1 \\3 \\4/op\
|" |"
} }
echo -e "\n*** disk: random direct (no kernel cache) 4K-read latency" #sizev="1K 4K 1M 2M"
nrun ioping -D -i 0ms -s 4k -S 1024M -w 3s -q -k . |\ sizev="4K 2M"
ioping2bench "`hostname`/disk/randread/direct/4K" benchtime=3s
for size in $sizev; do
echo -e "\n*** disk: random direct (no kernel cache) $size-read latency"
nrun ioping -D -i 0ms -s $size -S 1024M -w $benchtime -q -k . |\
ioping2bench "`hostname`/disk/randread/direct/$size"
done
echo -e "\n*** disk: random direct (no kernel cache) 1M-read latency"
nrun ioping -D -i 0ms -s 1M -S 1024M -w 3s -q -k . |\
ioping2bench "`hostname`/disk/randread/direct/1M"
echo -e "\n*** disk: random cached 4K-read latency"
# warmup so kernel puts the file into pagecache # warmup so kernel puts the file into pagecache
for i in `seq 3`; do for i in `seq 3`; do
cat ioping.tmp >/dev/null cat ioping.tmp >/dev/null
done done
nrun ioping -C -i 0ms -s 4k -S 1024M -w 3s -q -k . |\ for size in $sizev; do
ioping2bench "`hostname`/disk/randread/pagecache/4K" echo -e "\n*** disk: random cached $size-read latency"
nrun ioping -C -i 0ms -s $size -S 1024M -w $benchtime -q -k . |\
echo -e "\n*** disk: random cached 1M-read latency" ioping2bench "`hostname`/disk/randread/pagecache/$size"
nrun ioping -C -i 0ms -s 1M -S 1024M -w 3s -q -k . |\ done
ioping2bench "`hostname`/disk/randread/pagecache/1M"
} }
# hash function to compute via zhash in tests/benchmarks # hash function to compute via zhash in tests/benchmarks
...@@ -1023,7 +1023,6 @@ cmd_bench-cluster() { ...@@ -1023,7 +1023,6 @@ cmd_bench-cluster() {
# ping2bench <topic> - converts timings from ping to std benchmark format # ping2bench <topic> - converts timings from ping to std benchmark format
ping2bench() { ping2bench() {
# rtt min/avg/max/mdev = 0.028/0.031/0.064/0.007 ms, ipg/ewma 0.038/0.032 ms # rtt min/avg/max/mdev = 0.028/0.031/0.064/0.007 ms, ipg/ewma 0.038/0.032 ms
# XXX normalize to µs
sed -u -e \ sed -u -e \
"s|^rtt min/avg/max/mdev = \([0-9.]\+\)/\([0-9.]\+\)/\([0-9.]\+\)/\([0-9.]\+\) ms.*\$|&\n\ "s|^rtt min/avg/max/mdev = \([0-9.]\+\)/\([0-9.]\+\)/\([0-9.]\+\)/\([0-9.]\+\) ms.*\$|&\n\
Benchmark$1-min 1 \\1 ms/op\n\ Benchmark$1-min 1 \\1 ms/op\n\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment