All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] stat: Modify info for bw and add iops stats
@ 2017-06-23 17:42 Andreas Herrmann
  2017-06-23 17:42 ` [PATCH 1/4] stat: Print one-line iops stat Andreas Herrmann
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Andreas Herrmann @ 2017-06-23 17:42 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

Hi,

this is a resubmission of patches 1 and 2 to add iops statistics and
number of samples for iops and bw stats to normal and json output
formats. Patches are rebased on fio-2.21-26-gcf6b7fb4.

I'd like to see similar information added to terse format. Thus I've
added patches 3 and 4. First to merge terse functions (reducing code
size) and then to add a new terse format 5 where iops stats and number
of samples for bw and iops are displayed.


Regards,

Andreas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/4] stat: Print one-line iops stat
  2017-06-23 17:42 [PATCH v3 0/4] stat: Modify info for bw and add iops stats Andreas Herrmann
@ 2017-06-23 17:42 ` Andreas Herrmann
  2017-06-23 18:26   ` Jens Axboe
  2017-06-23 17:42 ` [PATCH 2/4] stat: Print number of samples in bw and iops stats Andreas Herrmann
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Andreas Herrmann @ 2017-06-23 17:42 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

This adds basic iops statistics (likewise to what we already have for
bandwidth) to normal and json fio output. Example for normal output:

   bw (  KiB/s): min=42192, max=162068, per=0.10%, avg=93236.21, stdev=22180.02
   iops : min=21090, max=81020, avg=46606.84, stdev=11088.40
    lat (usec) : 2=55.13%, 4=21.11%, 10=0.36%, 20=0.03%, 50=23.14%

Signed-off-by: Andreas Herrmann <aherrmann@suse.com>
---
 init.c   |  1 +
 server.c |  1 +
 stat.c   | 16 ++++++++++++++++
 3 files changed, 18 insertions(+)

diff --git a/init.c b/init.c
index 2b7768ab..b8e97f09 100644
--- a/init.c
+++ b/init.c
@@ -1364,6 +1364,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
 		td->ts.slat_stat[i].min_val = ULONG_MAX;
 		td->ts.lat_stat[i].min_val = ULONG_MAX;
 		td->ts.bw_stat[i].min_val = ULONG_MAX;
+		td->ts.iops_stat[i].min_val = ULONG_MAX;
 	}
 	td->ddir_seq_nr = o->ddir_seq_nr;
 
diff --git a/server.c b/server.c
index 8b36e383..e66a5f04 100644
--- a/server.c
+++ b/server.c
@@ -1474,6 +1474,7 @@ void fio_server_send_ts(struct thread_stat *ts, struct group_run_stats *rs)
 		convert_io_stat(&p.ts.slat_stat[i], &ts->slat_stat[i]);
 		convert_io_stat(&p.ts.lat_stat[i], &ts->lat_stat[i]);
 		convert_io_stat(&p.ts.bw_stat[i], &ts->bw_stat[i]);
+		convert_io_stat(&p.ts.iops_stat[i], &ts->iops_stat[i]);
 	}
 
 	p.ts.usr_time		= cpu_to_le64(ts->usr_time);
diff --git a/stat.c b/stat.c
index 50426509..d519ee9e 100644
--- a/stat.c
+++ b/stat.c
@@ -499,6 +499,10 @@ static void show_ddir_status(struct group_run_stats *rs, struct thread_stat *ts,
 		log_buf(out, "   bw (%5s/s): min=%5llu, max=%5llu, per=%3.2f%%, avg=%5.02f, stdev=%5.02f\n",
 			bw_str, min, max, p_of_agg, mean, dev);
 	}
+	if (calc_lat(&ts->iops_stat[ddir], &min, &max, &mean, &dev)) {
+		log_buf(out, "   iops : min=%5llu, max=%5llu, avg=%5.02f, "
+			"stdev=%5.02f\n", min, max, mean, dev);
+	}
 }
 
 static int show_lat(double *io_u_lat, int nr, const char **ranges,
@@ -1047,6 +1051,15 @@ static void add_ddir_status_json(struct thread_stat *ts,
 	json_object_add_value_float(dir_object, "bw_agg", p_of_agg);
 	json_object_add_value_float(dir_object, "bw_mean", mean);
 	json_object_add_value_float(dir_object, "bw_dev", dev);
+
+	if (!calc_lat(&ts->iops_stat[ddir], &min, &max, &mean, &dev)) {
+		min = max = 0;
+		mean = dev = 0.0;
+	}
+	json_object_add_value_int(dir_object, "iops_min", min);
+	json_object_add_value_int(dir_object, "iops_max", max);
+	json_object_add_value_float(dir_object, "iops_mean", mean);
+	json_object_add_value_float(dir_object, "iops_stddev", dev);
 }
 
 static void show_thread_status_terse_v2(struct thread_stat *ts,
@@ -1507,6 +1520,7 @@ void sum_thread_stats(struct thread_stat *dst, struct thread_stat *src,
 			sum_stat(&dst->slat_stat[l], &src->slat_stat[l], first);
 			sum_stat(&dst->lat_stat[l], &src->lat_stat[l], first);
 			sum_stat(&dst->bw_stat[l], &src->bw_stat[l], first);
+			sum_stat(&dst->iops_stat[l], &src->iops_stat[l], first);
 
 			dst->io_bytes[l] += src->io_bytes[l];
 
@@ -1517,6 +1531,7 @@ void sum_thread_stats(struct thread_stat *dst, struct thread_stat *src,
 			sum_stat(&dst->slat_stat[0], &src->slat_stat[l], first);
 			sum_stat(&dst->lat_stat[0], &src->lat_stat[l], first);
 			sum_stat(&dst->bw_stat[0], &src->bw_stat[l], first);
+			sum_stat(&dst->iops_stat[0], &src->iops_stat[l], first);
 
 			dst->io_bytes[0] += src->io_bytes[l];
 
@@ -1598,6 +1613,7 @@ void init_thread_stat(struct thread_stat *ts)
 		ts->clat_stat[j].min_val = -1UL;
 		ts->slat_stat[j].min_val = -1UL;
 		ts->bw_stat[j].min_val = -1UL;
+		ts->iops_stat[j].min_val = -1UL;
 	}
 	ts->groupid = -1;
 }
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/4] stat: Print number of samples in bw and iops stats
  2017-06-23 17:42 [PATCH v3 0/4] stat: Modify info for bw and add iops stats Andreas Herrmann
  2017-06-23 17:42 ` [PATCH 1/4] stat: Print one-line iops stat Andreas Herrmann
@ 2017-06-23 17:42 ` Andreas Herrmann
  2017-06-23 17:42 ` [PATCH 3/4] stat: Merge show_thread_status_terse_* functions Andreas Herrmann
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Andreas Herrmann @ 2017-06-23 17:42 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

This adds the actual number of samples for bw and iops stats printed
in normal and json fio output. Example for normal output:

   bw (  MiB/s): min=  120, max= 3304, per=0.10%, avg=2659.34, stdev=1085.25, samples=  109
   iops        : min=102776, max=830416, avg=675639.05, stdev=280619.99, samples=   21

Note: This example was created using options
"--write_bw_log=... --log_avg_msec=100 --runtime=11s" (ie. no iops log
written). That is why number of samples differs for IOPs and BW.

Signed-off-by: Andreas Herrmann <aherrmann@suse.com>
---
 stat.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/stat.c b/stat.c
index d519ee9e..369f9696 100644
--- a/stat.c
+++ b/stat.c
@@ -496,12 +496,15 @@ static void show_ddir_status(struct group_run_stats *rs, struct thread_stat *ts,
 			bw_str = (rs->unit_base == 1 ? "Mibit" : "MiB");
 		}
 
-		log_buf(out, "   bw (%5s/s): min=%5llu, max=%5llu, per=%3.2f%%, avg=%5.02f, stdev=%5.02f\n",
-			bw_str, min, max, p_of_agg, mean, dev);
+		log_buf(out, "   bw (%5s/s): min=%5llu, max=%5llu, per=%3.2f%%, "
+			"avg=%5.02f, stdev=%5.02f, samples=%5lu\n",
+			bw_str, min, max, p_of_agg, mean, dev,
+			(&ts->bw_stat[ddir])->samples);
 	}
 	if (calc_lat(&ts->iops_stat[ddir], &min, &max, &mean, &dev)) {
 		log_buf(out, "   iops : min=%5llu, max=%5llu, avg=%5.02f, "
-			"stdev=%5.02f\n", min, max, mean, dev);
+			"stdev=%5.02f, samples=%5lu\n",
+			min, max, mean, dev, (&ts->iops_stat[ddir])->samples);
 	}
 }
 
@@ -1051,6 +1054,8 @@ static void add_ddir_status_json(struct thread_stat *ts,
 	json_object_add_value_float(dir_object, "bw_agg", p_of_agg);
 	json_object_add_value_float(dir_object, "bw_mean", mean);
 	json_object_add_value_float(dir_object, "bw_dev", dev);
+	json_object_add_value_int(dir_object, "bw_samples",
+				(&ts->bw_stat[ddir])->samples);
 
 	if (!calc_lat(&ts->iops_stat[ddir], &min, &max, &mean, &dev)) {
 		min = max = 0;
@@ -1060,6 +1065,8 @@ static void add_ddir_status_json(struct thread_stat *ts,
 	json_object_add_value_int(dir_object, "iops_max", max);
 	json_object_add_value_float(dir_object, "iops_mean", mean);
 	json_object_add_value_float(dir_object, "iops_stddev", dev);
+	json_object_add_value_int(dir_object, "iops_samples",
+				(&ts->iops_stat[ddir])->samples);
 }
 
 static void show_thread_status_terse_v2(struct thread_stat *ts,
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/4] stat: Merge show_thread_status_terse_* functions
  2017-06-23 17:42 [PATCH v3 0/4] stat: Modify info for bw and add iops stats Andreas Herrmann
  2017-06-23 17:42 ` [PATCH 1/4] stat: Print one-line iops stat Andreas Herrmann
  2017-06-23 17:42 ` [PATCH 2/4] stat: Print number of samples in bw and iops stats Andreas Herrmann
@ 2017-06-23 17:42 ` Andreas Herrmann
  2017-06-23 17:43 ` [PATCH 4/4] stat: Add iops stat and sample number information to terse format Andreas Herrmann
  2017-06-23 18:15 ` [PATCH v3 0/4] stat: Modify info for bw and add iops stats Jens Axboe
  4 siblings, 0 replies; 10+ messages in thread
From: Andreas Herrmann @ 2017-06-23 17:42 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

Merge show_thread_status_terse_v2 and show_thread_status_terse_v3_v4
into new function show_thread_status_terse_all.

Signed-off-by: Andreas Herrmann <aherrmann@suse.com>
---
 stat.c | 88 ++++++++++++------------------------------------------------------
 1 file changed, 15 insertions(+), 73 deletions(-)

diff --git a/stat.c b/stat.c
index 369f9696..1201c35c 100644
--- a/stat.c
+++ b/stat.c
@@ -1069,9 +1069,9 @@ static void add_ddir_status_json(struct thread_stat *ts,
 				(&ts->iops_stat[ddir])->samples);
 }
 
-static void show_thread_status_terse_v2(struct thread_stat *ts,
-					struct group_run_stats *rs,
-					struct buf_output *out)
+static void show_thread_status_terse_all(struct thread_stat *ts,
+					 struct group_run_stats *rs, int ver,
+					 struct buf_output *out)
 {
 	double io_u_dist[FIO_IO_U_MAP_NR];
 	double io_u_lat_u[FIO_IO_U_LAT_U_NR];
@@ -1080,77 +1080,18 @@ static void show_thread_status_terse_v2(struct thread_stat *ts,
 	int i;
 
 	/* General Info */
-	log_buf(out, "2;%s;%d;%d", ts->name, ts->groupid, ts->error);
-	/* Log Read Status */
-	show_ddir_status_terse(ts, rs, DDIR_READ, out);
-	/* Log Write Status */
-	show_ddir_status_terse(ts, rs, DDIR_WRITE, out);
-	/* Log Trim Status */
-	show_ddir_status_terse(ts, rs, DDIR_TRIM, out);
-
-	/* CPU Usage */
-	if (ts->total_run_time) {
-		double runt = (double) ts->total_run_time;
-
-		usr_cpu = (double) ts->usr_time * 100 / runt;
-		sys_cpu = (double) ts->sys_time * 100 / runt;
-	} else {
-		usr_cpu = 0;
-		sys_cpu = 0;
-	}
-
-	log_buf(out, ";%f%%;%f%%;%llu;%llu;%llu", usr_cpu, sys_cpu,
-						(unsigned long long) ts->ctx,
-						(unsigned long long) ts->majf,
-						(unsigned long long) ts->minf);
-
-	/* Calc % distribution of IO depths, usecond, msecond latency */
-	stat_calc_dist(ts->io_u_map, ddir_rw_sum(ts->total_io_u), io_u_dist);
-	stat_calc_lat_nu(ts, io_u_lat_u);
-	stat_calc_lat_m(ts, io_u_lat_m);
-
-	/* Only show fixed 7 I/O depth levels*/
-	log_buf(out, ";%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%",
-			io_u_dist[0], io_u_dist[1], io_u_dist[2], io_u_dist[3],
-			io_u_dist[4], io_u_dist[5], io_u_dist[6]);
-
-	/* Microsecond latency */
-	for (i = 0; i < FIO_IO_U_LAT_U_NR; i++)
-		log_buf(out, ";%3.2f%%", io_u_lat_u[i]);
-	/* Millisecond latency */
-	for (i = 0; i < FIO_IO_U_LAT_M_NR; i++)
-		log_buf(out, ";%3.2f%%", io_u_lat_m[i]);
-	/* Additional output if continue_on_error set - default off*/
-	if (ts->continue_on_error)
-		log_buf(out, ";%llu;%d", (unsigned long long) ts->total_err_count, ts->first_error);
-	log_buf(out, "\n");
-
-	/* Additional output if description is set */
-	if (strlen(ts->description))
-		log_buf(out, ";%s", ts->description);
-
-	log_buf(out, "\n");
-}
-
-static void show_thread_status_terse_v3_v4(struct thread_stat *ts,
-					   struct group_run_stats *rs, int ver,
-					   struct buf_output *out)
-{
-	double io_u_dist[FIO_IO_U_MAP_NR];
-	double io_u_lat_u[FIO_IO_U_LAT_U_NR];
-	double io_u_lat_m[FIO_IO_U_LAT_M_NR];
-	double usr_cpu, sys_cpu;
-	int i;
+	if (ver == 2)
+		log_buf(out, "2;%s;%d;%d", ts->name, ts->groupid, ts->error);
+	else
+		log_buf(out, "%d;%s;%s;%d;%d", ver, fio_version_string,
+			ts->name, ts->groupid, ts->error);
 
-	/* General Info */
-	log_buf(out, "%d;%s;%s;%d;%d", ver, fio_version_string,
-					ts->name, ts->groupid, ts->error);
 	/* Log Read Status */
 	show_ddir_status_terse(ts, rs, DDIR_READ, out);
 	/* Log Write Status */
 	show_ddir_status_terse(ts, rs, DDIR_WRITE, out);
 	/* Log Trim Status */
-	if (ver == 4)
+	if (ver == 2 || ver == 4)
 		show_ddir_status_terse(ts, rs, DDIR_TRIM, out);
 
 	/* CPU Usage */
@@ -1187,11 +1128,14 @@ static void show_thread_status_terse_v3_v4(struct thread_stat *ts,
 		log_buf(out, ";%3.2f%%", io_u_lat_m[i]);
 
 	/* disk util stats, if any */
-	show_disk_util(1, NULL, out);
+	if (ver >= 3)
+		show_disk_util(1, NULL, out);
 
 	/* Additional output if continue_on_error set - default off*/
 	if (ts->continue_on_error)
 		log_buf(out, ";%llu;%d", (unsigned long long) ts->total_err_count, ts->first_error);
+	if (ver == 2)
+		log_buf(out, "\n");
 
 	/* Additional output if description is set */
 	if (strlen(ts->description))
@@ -1432,10 +1376,8 @@ static void show_thread_status_terse(struct thread_stat *ts,
 				     struct group_run_stats *rs,
 				     struct buf_output *out)
 {
-	if (terse_version == 2)
-		show_thread_status_terse_v2(ts, rs, out);
-	else if (terse_version == 3 || terse_version == 4)
-		show_thread_status_terse_v3_v4(ts, rs, terse_version, out);
+	if (terse_version >= 2 && terse_version <= 4)
+		show_thread_status_terse_all(ts, rs, terse_version, out);
 	else
 		log_err("fio: bad terse version!? %d\n", terse_version);
 }
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/4] stat: Add iops stat and sample number information to terse format
  2017-06-23 17:42 [PATCH v3 0/4] stat: Modify info for bw and add iops stats Andreas Herrmann
                   ` (2 preceding siblings ...)
  2017-06-23 17:42 ` [PATCH 3/4] stat: Merge show_thread_status_terse_* functions Andreas Herrmann
@ 2017-06-23 17:43 ` Andreas Herrmann
  2017-06-23 18:15 ` [PATCH v3 0/4] stat: Modify info for bw and add iops stats Jens Axboe
  4 siblings, 0 replies; 10+ messages in thread
From: Andreas Herrmann @ 2017-06-23 17:43 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

This is inserted beyond bandwidth information. It required creation
of a new terse version (v5).

Updated man page and HOWTO accordingly.

Signed-off-by: Andreas Herrmann <aherrmann@suse.com>
---
 HOWTO  |  2 +-
 fio.1  |  2 +-
 init.c |  3 +--
 stat.c | 28 +++++++++++++++++++++-------
 4 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/HOWTO b/HOWTO
index 22c5a5b8..1fd96efe 100644
--- a/HOWTO
+++ b/HOWTO
@@ -127,7 +127,7 @@ Command line options
 
 .. option:: --terse-version=type
 
-	Set terse version output format (default 3, or 2 or 4).
+	Set terse version output format (default 3, or 2 or 4 or 5).
 
 .. option:: --version
 
diff --git a/fio.1 b/fio.1
index 96eceafb..7fe175ee 100644
--- a/fio.1
+++ b/fio.1
@@ -43,7 +43,7 @@ Deprecated, use \-\-output-format instead to select multiple formats.
 Display version information and exit.
 .TP
 .BI \-\-terse\-version \fR=\fPversion
-Set terse version output format (default 3, or 2 or 4)
+Set terse version output format (default 3, or 2, 4, 5)
 .TP
 .B \-\-help
 Display usage information and exit.
diff --git a/init.c b/init.c
index b8e97f09..2cf47d31 100644
--- a/init.c
+++ b/init.c
@@ -2404,8 +2404,7 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
 			break;
 		case 'V':
 			terse_version = atoi(optarg);
-			if (!(terse_version == 2 || terse_version == 3 ||
-			     terse_version == 4)) {
+			if (!(terse_version >= 2 && terse_version <= 5)) {
 				log_err("fio: bad terse version format\n");
 				exit_val = 1;
 				do_exit++;
diff --git a/stat.c b/stat.c
index 1201c35c..c8a1f8d8 100644
--- a/stat.c
+++ b/stat.c
@@ -863,13 +863,13 @@ static void show_thread_status_normal(struct thread_stat *ts,
 
 static void show_ddir_status_terse(struct thread_stat *ts,
 				   struct group_run_stats *rs, int ddir,
-				   struct buf_output *out)
+				   int ver, struct buf_output *out)
 {
 	unsigned long long min, max, minv, maxv, bw, iops;
 	unsigned long long *ovals = NULL;
 	double mean, dev;
 	unsigned int len;
-	int i;
+	int i, bw_stat;
 
 	assert(ddir_rw(ddir));
 
@@ -919,7 +919,8 @@ static void show_ddir_status_terse(struct thread_stat *ts,
 	if (ovals)
 		free(ovals);
 
-	if (calc_lat(&ts->bw_stat[ddir], &min, &max, &mean, &dev)) {
+	bw_stat = calc_lat(&ts->bw_stat[ddir], &min, &max, &mean, &dev);
+	if (bw_stat) {
 		double p_of_agg = 100.0;
 
 		if (rs->agg[ddir]) {
@@ -931,6 +932,19 @@ static void show_ddir_status_terse(struct thread_stat *ts,
 		log_buf(out, ";%llu;%llu;%f%%;%f;%f", min, max, p_of_agg, mean, dev);
 	} else
 		log_buf(out, ";%llu;%llu;%f%%;%f;%f", 0ULL, 0ULL, 0.0, 0.0, 0.0);
+
+	if (ver == 5) {
+		if (bw_stat)
+			log_buf(out, ";%lu", (&ts->bw_stat[ddir])->samples);
+		else
+			log_buf(out, ";%lu", 0UL);
+
+		if (calc_lat(&ts->iops_stat[ddir], &min, &max, &mean, &dev))
+			log_buf(out, ";%llu;%llu;%f;%f;%lu", min, max,
+				mean, dev, (&ts->iops_stat[ddir])->samples);
+		else
+			log_buf(out, ";%llu;%llu;%f;%f;%lu", 0ULL, 0ULL, 0.0, 0.0, 0UL);
+	}
 }
 
 static void add_ddir_status_json(struct thread_stat *ts,
@@ -1087,12 +1101,12 @@ static void show_thread_status_terse_all(struct thread_stat *ts,
 			ts->name, ts->groupid, ts->error);
 
 	/* Log Read Status */
-	show_ddir_status_terse(ts, rs, DDIR_READ, out);
+	show_ddir_status_terse(ts, rs, DDIR_READ, ver, out);
 	/* Log Write Status */
-	show_ddir_status_terse(ts, rs, DDIR_WRITE, out);
+	show_ddir_status_terse(ts, rs, DDIR_WRITE, ver, out);
 	/* Log Trim Status */
 	if (ver == 2 || ver == 4)
-		show_ddir_status_terse(ts, rs, DDIR_TRIM, out);
+		show_ddir_status_terse(ts, rs, DDIR_TRIM, ver, out);
 
 	/* CPU Usage */
 	if (ts->total_run_time) {
@@ -1376,7 +1390,7 @@ static void show_thread_status_terse(struct thread_stat *ts,
 				     struct group_run_stats *rs,
 				     struct buf_output *out)
 {
-	if (terse_version >= 2 && terse_version <= 4)
+	if (terse_version >= 2 && terse_version <= 5)
 		show_thread_status_terse_all(ts, rs, terse_version, out);
 	else
 		log_err("fio: bad terse version!? %d\n", terse_version);
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/4] stat: Modify info for bw and add iops stats
  2017-06-23 17:42 [PATCH v3 0/4] stat: Modify info for bw and add iops stats Andreas Herrmann
                   ` (3 preceding siblings ...)
  2017-06-23 17:43 ` [PATCH 4/4] stat: Add iops stat and sample number information to terse format Andreas Herrmann
@ 2017-06-23 18:15 ` Jens Axboe
  2017-06-23 19:45   ` Andreas Herrmann
  4 siblings, 1 reply; 10+ messages in thread
From: Jens Axboe @ 2017-06-23 18:15 UTC (permalink / raw)
  To: Andreas Herrmann; +Cc: fio

On 06/23/2017 11:42 AM, Andreas Herrmann wrote:
> Hi,
> 
> this is a resubmission of patches 1 and 2 to add iops statistics and
> number of samples for iops and bw stats to normal and json output
> formats. Patches are rebased on fio-2.21-26-gcf6b7fb4.
> 
> I'd like to see similar information added to terse format. Thus I've
> added patches 3 and 4. First to merge terse functions (reducing code
> size) and then to add a new terse format 5 where iops stats and number
> of samples for bw and iops are displayed.

Looks good, I like it. Patch #4 needs an explanation of version 5
of the terse format, though. Care to add that?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/4] stat: Print one-line iops stat
  2017-06-23 17:42 ` [PATCH 1/4] stat: Print one-line iops stat Andreas Herrmann
@ 2017-06-23 18:26   ` Jens Axboe
  2017-06-23 19:47     ` Andreas Herrmann
  0 siblings, 1 reply; 10+ messages in thread
From: Jens Axboe @ 2017-06-23 18:26 UTC (permalink / raw)
  To: Andreas Herrmann; +Cc: fio

On 06/23/2017 11:42 AM, Andreas Herrmann wrote:
> This adds basic iops statistics (likewise to what we already have for
> bandwidth) to normal and json fio output. Example for normal output:
> 
>    bw (  KiB/s): min=42192, max=162068, per=0.10%, avg=93236.21, stdev=22180.02
>    iops : min=21090, max=81020, avg=46606.84, stdev=11088.40
>     lat (usec) : 2=55.13%, 4=21.11%, 10=0.36%, 20=0.03%, 50=23.14%
> 
> Signed-off-by: Andreas Herrmann <aherrmann@suse.com>
> ---
>  init.c   |  1 +
>  server.c |  1 +
>  stat.c   | 16 ++++++++++++++++
>  3 files changed, 18 insertions(+)
> 
> diff --git a/init.c b/init.c
> index 2b7768ab..b8e97f09 100644
> --- a/init.c
> +++ b/init.c
> @@ -1364,6 +1364,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
>  		td->ts.slat_stat[i].min_val = ULONG_MAX;
>  		td->ts.lat_stat[i].min_val = ULONG_MAX;
>  		td->ts.bw_stat[i].min_val = ULONG_MAX;
> +		td->ts.iops_stat[i].min_val = ULONG_MAX;
>  	}
>  	td->ddir_seq_nr = o->ddir_seq_nr;
>  
> diff --git a/server.c b/server.c
> index 8b36e383..e66a5f04 100644
> --- a/server.c
> +++ b/server.c
> @@ -1474,6 +1474,7 @@ void fio_server_send_ts(struct thread_stat *ts, struct group_run_stats *rs)
>  		convert_io_stat(&p.ts.slat_stat[i], &ts->slat_stat[i]);
>  		convert_io_stat(&p.ts.lat_stat[i], &ts->lat_stat[i]);
>  		convert_io_stat(&p.ts.bw_stat[i], &ts->bw_stat[i]);
> +		convert_io_stat(&p.ts.iops_stat[i], &ts->iops_stat[i]);
>  	}
>  
>  	p.ts.usr_time		= cpu_to_le64(ts->usr_time);

You're missing the equivelant client conversion. Also, you need to bump
the server version with this change.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/4] stat: Modify info for bw and add iops stats
  2017-06-23 18:15 ` [PATCH v3 0/4] stat: Modify info for bw and add iops stats Jens Axboe
@ 2017-06-23 19:45   ` Andreas Herrmann
  2017-06-23 19:56     ` Jens Axboe
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Herrmann @ 2017-06-23 19:45 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

On Fri, Jun 23, 2017 at 12:15:34PM -0600, Jens Axboe wrote:
> On 06/23/2017 11:42 AM, Andreas Herrmann wrote:
> > Hi,
> > 
> > this is a resubmission of patches 1 and 2 to add iops statistics and
> > number of samples for iops and bw stats to normal and json output
> > formats. Patches are rebased on fio-2.21-26-gcf6b7fb4.
> > 
> > I'd like to see similar information added to terse format. Thus I've
> > added patches 3 and 4. First to merge terse functions (reducing code
> > size) and then to add a new terse format 5 where iops stats and number
> > of samples for bw and iops are displayed.
> 
> Looks good, I like it. Patch #4 needs an explanation of version 5
> of the terse format, though. Care to add that?

You mean for the commit message or for the man-page or both? For the
latter I think the differences between the different terse versions
should be described. (Maybe I missed it but I think that is not in the
man-page).


Andreas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/4] stat: Print one-line iops stat
  2017-06-23 18:26   ` Jens Axboe
@ 2017-06-23 19:47     ` Andreas Herrmann
  0 siblings, 0 replies; 10+ messages in thread
From: Andreas Herrmann @ 2017-06-23 19:47 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

On Fri, Jun 23, 2017 at 12:26:23PM -0600, Jens Axboe wrote:
> On 06/23/2017 11:42 AM, Andreas Herrmann wrote:
> > This adds basic iops statistics (likewise to what we already have for
> > bandwidth) to normal and json fio output. Example for normal output:
> > 
> >    bw (  KiB/s): min=42192, max=162068, per=0.10%, avg=93236.21, stdev=22180.02
> >    iops : min=21090, max=81020, avg=46606.84, stdev=11088.40
> >     lat (usec) : 2=55.13%, 4=21.11%, 10=0.36%, 20=0.03%, 50=23.14%
> > 
> > Signed-off-by: Andreas Herrmann <aherrmann@suse.com>
> > ---
> >  init.c   |  1 +
> >  server.c |  1 +
> >  stat.c   | 16 ++++++++++++++++
> >  3 files changed, 18 insertions(+)
> > 
> > diff --git a/init.c b/init.c
> > index 2b7768ab..b8e97f09 100644
> > --- a/init.c
> > +++ b/init.c
> > @@ -1364,6 +1364,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
> >  		td->ts.slat_stat[i].min_val = ULONG_MAX;
> >  		td->ts.lat_stat[i].min_val = ULONG_MAX;
> >  		td->ts.bw_stat[i].min_val = ULONG_MAX;
> > +		td->ts.iops_stat[i].min_val = ULONG_MAX;
> >  	}
> >  	td->ddir_seq_nr = o->ddir_seq_nr;
> >  
> > diff --git a/server.c b/server.c
> > index 8b36e383..e66a5f04 100644
> > --- a/server.c
> > +++ b/server.c
> > @@ -1474,6 +1474,7 @@ void fio_server_send_ts(struct thread_stat *ts, struct group_run_stats *rs)
> >  		convert_io_stat(&p.ts.slat_stat[i], &ts->slat_stat[i]);
> >  		convert_io_stat(&p.ts.lat_stat[i], &ts->lat_stat[i]);
> >  		convert_io_stat(&p.ts.bw_stat[i], &ts->bw_stat[i]);
> > +		convert_io_stat(&p.ts.iops_stat[i], &ts->iops_stat[i]);
> >  	}
> >  
> >  	p.ts.usr_time		= cpu_to_le64(ts->usr_time);
> 
> You're missing the equivelant client conversion. Also, you need to bump
> the server version with this change.

Ok. Will fix it.


Andreas


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/4] stat: Modify info for bw and add iops stats
  2017-06-23 19:45   ` Andreas Herrmann
@ 2017-06-23 19:56     ` Jens Axboe
  0 siblings, 0 replies; 10+ messages in thread
From: Jens Axboe @ 2017-06-23 19:56 UTC (permalink / raw)
  To: Andreas Herrmann; +Cc: fio

On 06/23/2017 01:45 PM, Andreas Herrmann wrote:
> On Fri, Jun 23, 2017 at 12:15:34PM -0600, Jens Axboe wrote:
>> On 06/23/2017 11:42 AM, Andreas Herrmann wrote:
>>> Hi,
>>>
>>> this is a resubmission of patches 1 and 2 to add iops statistics and
>>> number of samples for iops and bw stats to normal and json output
>>> formats. Patches are rebased on fio-2.21-26-gcf6b7fb4.
>>>
>>> I'd like to see similar information added to terse format. Thus I've
>>> added patches 3 and 4. First to merge terse functions (reducing code
>>> size) and then to add a new terse format 5 where iops stats and number
>>> of samples for bw and iops are displayed.
>>
>> Looks good, I like it. Patch #4 needs an explanation of version 5
>> of the terse format, though. Care to add that?
> 
> You mean for the commit message or for the man-page or both? For the
> latter I think the differences between the different terse versions
> should be described. (Maybe I missed it but I think that is not in the
> man-page).

The HOWTO and man page seem to have up to version 3, but doesn't
include information that v4 is just v3 + a trim section.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-06-23 19:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 17:42 [PATCH v3 0/4] stat: Modify info for bw and add iops stats Andreas Herrmann
2017-06-23 17:42 ` [PATCH 1/4] stat: Print one-line iops stat Andreas Herrmann
2017-06-23 18:26   ` Jens Axboe
2017-06-23 19:47     ` Andreas Herrmann
2017-06-23 17:42 ` [PATCH 2/4] stat: Print number of samples in bw and iops stats Andreas Herrmann
2017-06-23 17:42 ` [PATCH 3/4] stat: Merge show_thread_status_terse_* functions Andreas Herrmann
2017-06-23 17:43 ` [PATCH 4/4] stat: Add iops stat and sample number information to terse format Andreas Herrmann
2017-06-23 18:15 ` [PATCH v3 0/4] stat: Modify info for bw and add iops stats Jens Axboe
2017-06-23 19:45   ` Andreas Herrmann
2017-06-23 19:56     ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.