Commit 8bac3dba authored by Kirill Smelkov's avatar Kirill Smelkov

X neotest/bench-disk: Also benchmark randomly reading 1M blocks

On my disk it gives:

name                                 time/op
deco/disk/randread/direct/4K-min     98.0µs ± 1%
deco/disk/randread/direct/4K-avg      104µs ± 0%
deco/disk/randread/direct/1M-min     2.90ms ±17%
deco/disk/randread/direct/1M-avg     3.55ms ± 0%
deco/disk/randread/pagecache/4K-min   227ns ± 1%
deco/disk/randread/pagecache/4K-avg   629ns ± 0%
deco/disk/randread/pagecache/1M-min  70.8µs ± 7%
deco/disk/randread/pagecache/1M-avg  99.4µs ± 1%
parent 3e0610ce
......@@ -869,6 +869,10 @@ Benchmark$1-avg 1 \\3 \\4/op\
nrun ioping -D -i 0ms -s 4k -S 1024M -w 3s -q -k . |\
ioping2bench "`hostname`/disk/randread/direct/4K"
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
for i in `seq 3`; do
......@@ -877,6 +881,10 @@ Benchmark$1-avg 1 \\3 \\4/op\
nrun ioping -C -i 0ms -s 4k -S 1024M -w 3s -q -k . |\
ioping2bench "`hostname`/disk/randread/pagecache/4K"
echo -e "\n*** disk: random cached 1M-read latency"
nrun ioping -C -i 0ms -s 1M -S 1024M -w 3s -q -k . |\
ioping2bench "`hostname`/disk/randread/pagecache/1M"
}
# hash function to compute via zhash in tests/benchmarks
......
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