louwrentius / fio-plot

Create charts from FIO storage benchmark tool output
BSD 3-Clause "New" or "Revised" License
370 stars 87 forks source link

Decreasing --runtime``` (time duration per test) does not decrease total time of bench_fio run #60

Closed eksklawa closed 2 years ago

eksklawa commented 3 years ago

I have run following command that took ~12 minutes - with default --runtime (60)

~/fio-plot/benchmark_script/bench_fio --target /tmp/testdir --type directory --mode randread randwrite --output . --iodepth 1 2 4 8 16 32 64 128 256 512 1024 2048 --numjobs 1 2 3 4 5 6 7 8 9 10 -s 20M -j ~/fio-plot/benchmark_script/fio-job-template.fio
                                +++ Fio Benchmark Script +++

Estimated duration            : 4:00:00
Test target                   : /tmp/testdir
Job template                  : /root/fio-plot/benchmark_script/fio-job-template.fio
I/O Engine                    : libaio
Test mode (read/write)        : randread randwrite
IOdepth to be tested          : 1 2 4 8 16 32 64 128 256 512 1024 2048
NumJobs to be tested          : 1 2 3 4 5 6 7 8 9 10
Block size                    : 4k
Direct I/O                    : 1
Specified test data size      : 20M
Precondition template         : precondition.fio
Time duration per test (s)    : 60
Benchmark loops               : 1
Log interval of perf data (ms): 500
Invalidate buffer cache       : 1
Target type                   : directory
Output folder                 : .
Number of benchmarks          : 240

███████████████████████████████████████████████████████████████████████████████████████████████
 100% |█████████████████████████|   [0:11:32, 0:00:00]-]

Next, I run the same command with --runtime 10 (10 seconds)

Shouldn't it take less time than in first test which was run with default 60 seconds per test? Why it estimates the same time to end with 10 seconds --runtime?

Command in test2: ~/fio-plot/benchmark_script/bench_fio --target /tmp/testdir --type directory --mode randread randwrite --output . --iodepth 1 2 4 8 16 32 64 128 256 512 1024 2048 --numjobs 1 2 3 4 5 6 7 8 9 10 -s 20M -j ~/fio-plot/benchmark_script/fio-job-template.fio --runtime 10


Estimated duration            : 0:40:00
Test target                   : /tmp/testdir
Job template                  : /root/fio-plot/benchmark_script/fio-job-template.fio
I/O Engine                    : libaio
Test mode (read/write)        : randread randwrite
IOdepth to be tested          : 1 2 4 8 16 32 64 128 256 512 1024 2048
NumJobs to be tested          : 1 2 3 4 5 6 7 8 9 10
Block size                    : 4k
Direct I/O                    : 1
Specified test data size      : 20M
Precondition template         : precondition.fio
Time duration per test (s)    : 10
Benchmark loops               : 1
Log interval of perf data (ms): 500
Invalidate buffer cache       : 1
Target type                   : directory
Output folder                 : .
Number of benchmarks          : 240

███████████████████████████████████████████████████████████████████████████████████████████████
   9% |██▎                      | | [0:01:10, 0:11:37]-]
louwrentius commented 3 years ago

Hi, I will investigate but I am quite busy at work at the moment so it may take some time

louwrentius commented 2 years ago

The overall estimated duration at the top is sound. It's purely about the progress bar. That is code I just stole from the internet and I'm not sure what's going on. May have to investigate later.

louwrentius commented 2 years ago

After one year I realised why your benchmarks took such a short time. Your data size 20M which takes less time to cover with random IO than the Time duration of 10s (probably <1s). You should have used the time-based parameter to enforce the 10 seconds of testing.