Recent changes (master)
The following changes since commit 2b455dbf8038ee5998f9280fac40f8089175adf7:
HOWTO: minor fix and backport from man page (2017-08-01 13:55:09 -0600)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to d4a507c17533f05bcf6d6eeb8d00f3dad1a020a1:
Merge branch 'fio-jsonplus-patches' of https://github.com/vincentkfu/fio (2017-08-07 13:44:01 -0600)
----------------------------------------------------------------
Jens Axboe (1):
Merge branch 'fio-jsonplus-patches' of https://github.com/vincentkfu/fio
Tomohiro Kusumi (4):
man: add proper indentation to "PARAMETER TYPES" section
HOWTO: fix unit type suffix in "Parameter types" section
HOWTO: use proper (or drop wrong usage of) option type =bool move skip_bad= option to engines/mtd.c
Vincent Fu (3):
tools: add fio_jsonplus_clat2csv
HOWTO: add section providing details about json+ output format
man: add section describing json+ output format
HOWTO | 47 +++++++++---- Makefile | 2 +- cconv.c | 2 - engines/mtd.c | 28 +++++++- fio.1 | 139 +++++++++++++++++++++++++++---------- options.c | 11 --- thread_options.h | 2 - tools/fio_jsonplus_clat2csv | 164 ++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 329 insertions(+), 66 deletions(-) create mode 100755 tools/fio_jsonplus_clat2csv
---
Diff of recent changes:
HOWTO +34 -13
@@ -505,19 +505,19 @@ Parameter types prefixes. To specify power-of-10 decimal values defined in the International System of Units (SI): - * *Ki* -- means kilo (K) or 1000 - * *Mi* -- means mega (M) or 1000**2 - * *Gi* -- means giga (G) or 1000**3 - * *Ti* -- means tera (T) or 1000**4 - * *Pi* -- means peta (P) or 1000**5 + * *ki* -- means kilo (K) or 1000 + * *mi* -- means mega (M) or 1000**2 + * *gi* -- means giga (G) or 1000**3 + * *ti* -- means tera (T) or 1000**4 + * *pi* -- means peta (P) or 1000**5 To specify power-of-2 binary values defined in IEC 80000-13: * *k* -- means kibi (Ki) or 1024 - * *M* -- means mebi (Mi) or 1024**2 - * *G* -- means gibi (Gi) or 1024**3 - * *T* -- means tebi (Ti) or 1024**4 - * *P* -- means pebi (Pi) or 1024**5 + * *m* -- means mebi (Mi) or 1024**2 + * *g* -- means gibi (Gi) or 1024**3 + * *t* -- means tebi (Ti) or 1024**4 + * *p* -- means pebi (Pi) or 1024**5 With :option:`kb_base`\=1024 (the default), the unit prefixes are opposite from those specified in the SI and IEC 80000-13 standards to provide
@@ -1392,7 +1392,7 @@ Block size typically won't work with direct I/O, as that normally requires sector alignment. -.. option:: bs_is_seq_rand +.. option:: bs_is_seq_rand=bool If this option is set, fio will use the normal read,write blocksize settings as sequential,random blocksize settings instead. Any random read or write
@@ -2166,7 +2166,7 @@ I/O replay replay, the file needs to be turned into a blkparse binary data file first (``blkparse <device> -o /dev/null -d file_for_fio.bin``). -.. option:: replay_no_stall=int +.. option:: replay_no_stall=bool When replaying I/O with :option:`read_iolog` the default behavior is to attempt to respect the timestamps within the log and replay them with the
@@ -2680,7 +2680,7 @@ Measurements and reporting all jobs in a file will be part of the same reporting group, unless separated by a :option:`stonewall`. -.. option:: stats +.. option:: stats=bool By default, fio collects and shows final output results for all jobs that run. If this option is set to 0, then fio will ignore it in
@@ -2763,7 +2763,7 @@ Measurements and reporting you instead want to log the maximum value, set this option to 1. Defaults to 0, meaning that averaged values are logged. -.. option:: log_offset=int +.. option:: log_offset=bool If this is set, the iolog options will include the byte offset for the I/O entry as well as the other data values. Defaults to 0 meaning that
@@ -3363,6 +3363,27 @@ minimal output v3, separated by semicolons:: terse_version_3;fio_version;jobname;groupid;error;read_kb;read_bandwidth;read_iops;read_runtime_ms;read_slat_min;read_slat_max;read_slat_mean;read_slat_dev;read_clat_min;read_clat_max;read_clat_mean;read_clat_dev;read_clat_pct01;read_clat_pct02;read_clat_pct03;read_clat_pct04;read_clat_pct05;read_clat_pct06;read_clat_pct07;read_clat_pct08;read_clat_pct09;read_clat_pct10;read_clat_pct11;read_clat_pct12;read_clat_pct13;read_clat_pct14;read_clat_pct15;read_clat_pct16;read_clat_pct17;read_clat_pct18;read_clat_pct19;read_clat_pct20;read_tlat_min;read_lat_max;read_lat_mean;read_lat_dev;read_bw_min;read_bw_max;read_bw_agg_pct;read_bw_mean;read_bw_dev;write_kb;write_bandwidth;write_iops;write_runtime_ms;write_slat_min;write_slat_max;write_slat_mean;write_slat_dev;write_clat_min;write_clat_max;write_clat_mean;write_clat_dev;write_clat_pct01;write_clat_pct02;write_clat_pct03;write_clat_pct04;write_clat_pct05;write_clat_pct06;write_clat_pct07;write_clat_pct08;write_clat_pct09;write_clat_pct10 ;write_clat_pct11;write_clat_pct12;write_clat_pct13;write_clat_pct14;write_clat_pct15;write_clat_pct16;write_clat_pct17;write_clat_pct18;write_clat_pct19;write_clat_pct20;write_tlat_min;write_lat_max;write_lat_mean;write_lat_dev;write_bw_min;write_bw_max;write_bw_agg_pct;write_bw_mean;write_bw_dev;cpu_user;cpu_sys;cpu_csw;cpu_mjf;cpu_minf;iodepth_1;iodepth_2;iodepth_4;iodepth_8;iodepth_16;iodepth_32;iodepth_64;lat_2us;lat_4us;lat_10us;lat_20us;lat_50us;lat_100us;lat_250us;lat_500us;lat_750us;lat_1000us;lat_2ms;lat_4ms;lat_10ms;lat_20ms;lat_50ms;lat_100ms;lat_250ms;lat_500ms;lat_750ms;lat_1000ms;lat_2000ms;lat_over_2000ms;disk_name;disk_read_iops;disk_write_iops;disk_read_merges;disk_write_merges;disk_read_ticks;write_ticks;disk_queue_time;disk_util +JSON+ output +------------ + +The `json+` output format is identical to the `json` output format except that it +adds a full dump of the completion latency bins. Each `bins` object contains a +set of (key, value) pairs where keys are latency durations and values count how +many I/Os had completion latencies of the corresponding duration. For example, +consider: + + "bins" : { "87552" : 1, "89600" : 1, "94720" : 1, "96768" : 1, "97792" : 1, "99840" : 1, "100864" : 2, "103936" : 6, "104960" : 534, "105984" : 5995, "107008" : 7529, ... } + +This data indicates that one I/O required 87,552ns to complete, two I/Os required +100,864ns to complete, and 7529 I/Os required 107,008ns to complete. + +Also included with fio is a Python script `fio_jsonplus_clat2csv` that takes +json+ output and generates CSV-formatted latency data suitable for plotting. + +The latency durations actually represent the midpoints of latency intervals. +For details refer to stat.h. + + Trace file format -----------------
Makefile +1 -1
@@ -26,7 +26,7 @@ OPTFLAGS= -g -ffast-math CFLAGS = -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS) -I. -I$(SRCDIR) LIBS += -lm $(EXTLIBS) PROGS = fio -SCRIPTS = $(addprefix $(SRCDIR)/,tools/fio_generate_plots tools/plot/fio2gnuplot tools/genfio tools/fiologparser.py tools/hist/fiologparser_hist.py) +SCRIPTS = $(addprefix $(SRCDIR)/,tools/fio_generate_plots tools/plot/fio2gnuplot tools/genfio tools/fiologparser.py tools/hist/fiologparser_hist.py tools/fio_jsonplus_clat2csv) ifndef CONFIG_FIO_NO_OPT CFLAGS += -O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
cconv.c +0 -2
@@ -283,7 +283,6 @@ void convert_thread_options_to_cpu(struct thread_options *o, o->compress_percentage =le32_to_cpu (top->compress_percentage); o->compress_chunk =le32_to_cpu (top->compress_chunk); o->dedupe_percentage =le32_to_cpu (top->dedupe_percentage); - o->skip_bad =le32_to_cpu (top->skip_bad); o->block_error_hist =le32_to_cpu (top->block_error_hist); o->replay_align =le32_to_cpu (top->replay_align); o->replay_scale =le32_to_cpu (top->replay_scale);
@@ -471,7 +470,6 @@ void convert_thread_options_to_net(struct thread_options_pack *top, top->compress_chunk =cpu_to_le32 (o->compress_chunk); top->dedupe_percentage =cpu_to_le32 (o->dedupe_percentage); top->block_error_hist =cpu_to_le32 (o->block_error_hist); - top->skip_bad =cpu_to_le32 (o->skip_bad); top->replay_align =cpu_to_le32 (o->replay_align); top->replay_scale =cpu_to_le32 (o->replay_scale); top->per_job_logs =cpu_to_le32 (o->per_job_logs);
engines/mtd.c +27 -1
@@ -13,6 +13,7 @@#include <mtd/mtd-user.h> #include "../fio.h" +#include "../optgroup.h" #include "../verify.h" #include "../oslib/libmtd.h"
@@ -22,6 +23,28 @@ struct fio_mtd_data {struct mtd_dev_info info; }; +struct fio_mtd_options { +void *pad;/* avoid off1 == 0 */ +unsigned int skip_bad; +}; + +static struct fio_option options[] = { + { + .name ="skip_bad" , + .lname ="Skip operations against bad blocks" , + .type =FIO_OPT_BOOL , + .off1 = offsetof(struct fio_mtd_options , skip_bad), + .help ="Skip operations against known bad blocks." , + .hide =1 , + .def ="0" , + .category =FIO_OPT_C_ENGINE , + .group =FIO_OPT_G_MTD , + }, + { + .name =NULL , + }, +}; +static int fio_mtd_maybe_mark_bad (struct thread_data *td,struct fio_mtd_data *fmd,struct io_u *io_u,int eb)
@@ -55,6 +78,7 @@ static int fio_mtd_queue(struct thread_data *td, struct io_u *io_u) {struct fio_file *f = io_u->file;struct fio_mtd_data *fmd =FILE_ENG_DATA (f); +struct fio_mtd_options *o = td->eo;int local_offs =0 ;int ret;
@@ -77,7 +101,7 @@ static int fio_mtd_queue(struct thread_data *td, struct io_u *io_u) (int)fmd->info.eb_size - eb_offs);char *buf = ((char *)io_u->buf) + local_offs; -if (td->o.skip_bad) { +if (o->skip_bad) { ret =fio_mtd_is_bad (td, fmd, io_u, eb);if (ret ==-1 )break ;
@@ -190,6 +214,8 @@ static struct ioengine_ops ioengine = { .close_file = fio_mtd_close_file, .get_file_size = fio_mtd_get_file_size, .flags = FIO_SYNCIO | FIO_NOEXTEND, + .options = options, + .option_struct_size = sizeof(struct fio_mtd_options), }; static void fio_init fio_mtd_register(void)
fio.1 +103 -36
228 lines not on this page · raw message
is unsupported since version 1.20-rc3 (March 2008). It will still be described
options.c +0 -11
@@ -4379,17 +4379,6 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .group = FIO_OPT_G_IO_FLOW, }, { - .name = "skip_bad", - .lname = "Skip operations against bad blocks", - .type = FIO_OPT_BOOL, - .off1 = offsetof(struct thread_options, skip_bad), - .help = "Skip operations against known bad blocks.", - .hide = 1, - .def = "0", - .category = FIO_OPT_C_IO, - .group = FIO_OPT_G_MTD, - }, - { .name = "steadystate", .lname = "Steady state threshold", .alias = "ss",
thread_options.h +0 -2
@@ -306,7 +306,6 @@ struct thread_options {fio_fp64_t latency_percentile;unsigned block_error_hist; -unsigned int skip_bad;unsigned int replay_align;unsigned int replay_scale;
@@ -579,7 +578,6 @@ struct thread_options_pack {fio_fp64_t latency_percentile;uint32_t block_error_hist; -uint32_t skip_bad;uint32_t replay_align;uint32_t replay_scale;
tools/fio_jsonplus_clat2csv new file +164 -0
164 lines not on this page · raw message