|author||Dennis Zhou <email@example.com>||2018-09-20 14:08:10 -0400|
|committer||Jens Axboe <firstname.lastname@example.org>||2018-09-20 13:07:40 -0600|
blktrace: add option to iterate over a trace multiple times
Scaling a particular trace may result in different runtimes among the merging traces. By knowing the approximate length of each trace as a user, the overall runtime of each can be tuned to line up by letting certain traces loop multiple times. First, the last timestamp of a trace is recorded at the end of the first iteration to denote the length of a trace. This value is then used to offset subsequent iterations of a trace. Next, the "--merge_blktrace_iters" option is introduced to let the user specify the number of times to loop over each specific trace. This is done by passing a comma separated list that index-wise pairs with the passed files in "--read_iolog". Iteration counts are introduced as well as keeping track of the length of each trace. In an example, given two traces, A and B, each 60s long. If we want to see the impact of trace A issuing IOs twice as fast, the --merge_blktrace_scalars="50:100" can be set and then --merge_blktrace_iters="2:1". This runs trace A at 2x the speed twice for approximately the same runtime as a single run of trace B. Signed-off-by: Dennis Zhou <email@example.com> Signed-off-by: Jens Axboe <firstname.lastname@example.org>
Diffstat (limited to 'HOWTO')
1 files changed, 21 insertions, 0 deletions
@@ -2514,6 +2514,14 @@ I/O replay
:option:`replay_time_scale` which scales the trace during runtime and
does not change the output of the merge unlike this option.
+.. option:: merge_blktrace_iters=float_list
+ This is a whole number option that is index paired with the list of files
+ passed to :option:`read_iolog`. When merging is performed, run each trace
+ for the specified number of iterations. For example,
+ ``--merge_blktrace_iters="2:1"`` runs the first trace for two iterations
+ and the second trace for one iteration.
.. option:: replay_no_stall=bool
When replaying I/O with :option:`read_iolog` the default behavior is to
@@ -3888,6 +3896,19 @@ being slowed down or sped up. :option:`merge_blktrace_scalars` takes in a colon
separated list of percentage scalars. It is index paired with the files passed
+With scaling, it may be desirable to match the running time of all traces.
+This can be done with :option:`merge_blktrace_iters`. It is index paired with
+:option:`read_iolog` just like :option:`merge_blktrace_scalars`.
+In an example, given two traces, A and B, each 60s long. If we want to see
+the impact of trace A issuing IOs twice as fast and repeat trace A over the
+runtime of trace B, the following can be done::
+ $ fio --read_iolog="<trace_a>:"<trace_b>" --merge_blktrace_file"<output_file>" --merge_blktrace_scalars="50:100" --merge_blktrace_iters="2:1"
+This runs trace A at 2x the speed twice for approximately the same runtime as
+a single run of trace B.
CPU idleness profiling