Improve logging accuracy
authorJens Axboe <axboe@fb.com>
Fri, 6 May 2016 17:14:19 +0000 (11:14 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 6 May 2016 17:14:19 +0000 (11:14 -0600)
commita47591e4923fb8faef18e1cd5125a50429282089
tree2c3bcbed99b708f197abc60f449c1a16fd631088
parent604577f1329b617d724d6712868d344a5adf5251
Improve logging accuracy

If we do windowed logging (over a period of time), then we can
take the logging out of the IO worker fast path, and just have
our helper thread do it. This means we'll reduce the overhead
for the IO worker (which is important), and that we'll be able
to provide better accuracy of when we log. Before this change,
we'd log when we had exceeded the window of time at a completion
even. This means that if you had a logging time of 500 msec,
you'd always exceed that and even tend to skew it to being much
later. With this change, logging should be very accurate time
wise:

$ ./fio --inflate-log=fsrandW4-8-iopslog_iops.1.log.fz | head -n10
500, 470, 0, 0
1000, 492, 0, 0
1500, 484, 0, 0
2000, 492, 0, 0
2500, 454, 0, 0
3000, 462, 0, 0
3500, 480, 0, 0
4000, 462, 0, 0
4500, 472, 0, 0
5000, 496, 0, 0

and not exhibit any drift at all.

Signed-off-by: Jens Axboe <axboe@fb.com>
15 files changed:
HOWTO
backend.c
diskutil.c
fio.1
fio.h
fio_time.h
init.c
io_u.c
iolog.c
iolog.h
libfio.c
stat.c
stat.h
time.c
workqueue.c