This commit / feature adds completion latency histogram output to fio, piggybacking
authorKarl Cronburg <kcronbur@redhat.com>
Fri, 5 Aug 2016 18:45:00 +0000 (14:45 -0400)
committerKarl Cronburg <kcronbur@redhat.com>
Sat, 6 Aug 2016 22:25:17 +0000 (18:25 -0400)
commit1e613c9c23932006263dd8334007865f32891a0c
tree7fa5a62282e556d7465a6e05145d1e4b93b02108
parent059b61f219b15db434eddc2207b876c6a0bad6c0
This commit / feature adds completion latency histogram output to fio, piggybacking
on the existing histograms recorded by stat.c and adding the following command
line options:

- log_hist_msec operates like log_avg_msec does, but produces files
  named *_clat_hist*
- write_hist_log has the same semantics as write_lat_log but for histograms.
- log_hist_coarseness changes how many bins are logged.

The more substantial contribution is a post-processor for digesting these log files,
located in fio/tools/hist/fiologparser_hist.py, which computes min/max/avg/percentile
statistics.

To compare the accuracy of the statistics produced by fiologparser_hist.py,
a reference implementation is located here:

https://github.com/cronburg/fio/blob/histograms/tools/hist/fiologparser_numpy.py

for computing the same statistics from the *_clat.* files fio already produces.
A comparison can be viewed here:

https://cronburg.com/fio/demo/latency.html

The reference implementation is excluded from this commit, as I'm still working
with Mark (markhpc) on getting it into the branch where he's working on fiologparser.
Also I'd eventually like to make FIO_IO_U_PLAT_GROUP_NR in stat.h
configurable (allowing for a larger maximum histogram latency value than 17
seconds), but haven't added it to keep the changes to fio minimal for now.

A more detailed description of the motivation behind this feature, and explanation
of the design process and algorithms used in the post-processor can be found here:

https://cronburg.com/fio/cloud-latency-problem-measurement/
13 files changed:
HOWTO
cconv.c
fio.1
fio.h
init.c
iolog.c
iolog.h
options.c
stat.c
thread_options.h
tools/hist/.gitignore [new file with mode: 0644]
tools/hist/fiologparser_hist.py [new file with mode: 0755]
tools/hist/half-bins.py [new file with mode: 0755]