Skip to contentSkip to conversation

reduce normal output lat (nsec/usec/msec) indentation, update latency documentation

PATCH In review Vincent Fu 2 participants 6 messages Aug 14, 2017

lore
Share & tools
lore

Vincent Fu

author
#0 lore raw

cover reduce normal output lat (nsec/usec/msec) indentation, update latency documentation

Jens, please consider this patch series.

The patches reduce the indentation of the normal output lat (nsec/usec/msec) lines and update the description of the latency output in the HOWTO and man page.

The man page changes apply on top of the patches from [email protected].

Vincent

author
#1 lore raw

PATCH 1/3 stat: change indentation of the lat (nsec/usec/msec) section in the normal output

From: Vincent Fu <[email protected]>

With mixed IO the normal output looks like:

$ ./fio --name=test --ioengine=null --time_based --runtime=5s --size=1G --rw=randrw

test: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=null, iodepth=1 fio-2.21-14-ge22fd-dirty
Starting 1 process
Jobs: 1 (f=1): [m(1)][100.0%][r=5749MiB/s,w=5748MiB/s][r=1472k,w=1472k IOPS][eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=16555: Tue Jun 20 16:08:00 2017
read: IOPS=1488k, BW=5814MiB/s (6096MB/s)(28.4GiB/5001msec)
...
write: IOPS=1488k, BW=5812MiB/s (6094MB/s)(28.4GiB/5001msec)
...

    lat (nsec) : 20=15.47%, 50=83.90%, 100=0.49%, 250=0.11%, 500=0.02%
    lat (nsec) : 750=0.01%, 1000=0.01%
    lat (usec) : 2=0.01%, 4=0.01%, 10=0.01%, 20=0.01%, 50=0.01%
    lat (usec) : 100=0.01%, 250=0.01%, 500=0.01%
  cpu          : usr=99.84%, sys=0.00%, ctx=181, majf=0, minf=7
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwt: total=7443094,7440426,0, short=0,0,0, dropped=0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

...

The 'lat (nsec) : 20=15.47%...' section is indented inside the 'write' block, giving the impression that these describe only write latencies when they are actually latencies for all of the IOs in the job.

With this patch the normal output looks like:

$ ./fio --name=test --ioengine=null --time_based --runtime=5s --size=1G --rw=randrw

test: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=null, iodepth=1 fio-2.21-14-g4ed22a-dirty
Starting 1 process
Jobs: 1 (f=1): [m(1)][100.0%][r=5879MiB/s,w=5880MiB/s][r=1505k,w=1505k IOPS][eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=16686: Tue Jun 20 16:12:43 2017
read: IOPS=1523k, BW=5950MiB/s (6239MB/s)(29.1GiB/5001msec)

    clat (nsec): min=15, max=114599, avg=25.38, stdev=139.48
     lat (nsec): min=47, max=257952, avg=58.18, stdev=269.48
    clat percentiles (nsec):
     |  1.00th=[   18],  5.00th=[   19], 10.00th=[   20], 20.00th=[   21],
     | 30.00th=[   22], 40.00th=[   23], 50.00th=[   23], 60.00th=[   24],
     | 70.00th=[   26], 80.00th=[   27], 90.00th=[   27], 95.00th=[   28],
     | 99.00th=[   42], 99.50th=[   45], 99.90th=[  101], 99.95th=[  165],
     | 99.99th=[ 6368]
   bw (  MiB/s): min= 5722, max= 6081, per=0.10%, avg=5950.14, stdev=126.61
  write: IOPS=1523k, BW=5948MiB/s (6236MB/s)(29.0GiB/5001msec)
    clat (nsec): min=15, max=127752, avg=25.56, stdev=158.32
     lat (nsec): min=63, max=230121, avg=79.84, stdev=317.00
    clat percentiles (nsec):
     |  1.00th=[   18],  5.00th=[   19], 10.00th=[   20], 20.00th=[   21],
     | 30.00th=[   22], 40.00th=[   23], 50.00th=[   23], 60.00th=[   25],
     | 70.00th=[   26], 80.00th=[   27], 90.00th=[   27], 95.00th=[   28],
     | 99.00th=[   42], 99.50th=[   46], 99.90th=[  105], 99.95th=[  175],
     | 99.99th=[ 6624]
   bw (  MiB/s): min= 5727, max= 6079, per=0.10%, avg=5947.07, stdev=125.05
  lat (nsec)   : 20=9.40%, 50=90.27%, 100=0.22%, 250=0.08%, 500=0.01%
  lat (nsec)   : 750=0.01%, 1000=0.01%
  lat (usec)   : 2=0.01%, 4=0.01%, 10=0.01%, 20=0.01%, 50=0.01%
  lat (usec)   : 100=0.01%, 250=0.01%
  cpu          : usr=99.84%, sys=0.00%, ctx=150, majf=0, minf=7
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwt: total=7617184,7614394,0, short=0,0,0, dropped=0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
READ: bw=5950MiB/s (6239MB/s), 5950MiB/s-5950MiB/s (6239MB/s-6239MB/s), io=29.1GiB (31.2GB), run=5001-5001msec
WRITE: bw=5948MiB/s (6236MB/s), 5948MiB/s-5948MiB/s (6236MB/s-6236MB/s), io=29.0GiB (31.2GB), run=5001-5001msec

---
 stat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
stat.c +1 -1
index aebd107..4aa9cb8 100644
@@ -520,7 +520,7 @@ static int show_lat(double *io_u_lat, int nr, const char **ranges,
 		if (new_line) {
 			if (line)
 				log_buf(out, "\n");
-			log_buf(out, "    lat (%s) : ", msg);
+			log_buf(out, "  lat (%s)   : ", msg);
 			new_line = 0;
 			line = 0;
 		}
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 2/3 HOWTO: update and clarify description of latencies in normal output

In reply to Vincent Fu

From: Vincent Fu <[email protected]>

1) Add a description for the lat (min, max, avg, stddev) line
2) Use the old 'IO latencies' description for the lat (nsec/usec/msec) section
3) Fix the description of the 'IO latency' section

---
 HOWTO | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)
HOWTO +19 -9
index 57d4a39..6ecc0a6 100644
@@ -3133,9 +3133,9 @@ group) the output looks like::
 	     | 99.99th=[78119]
 	   bw (  KiB/s): min=  532, max=  686, per=0.10%, avg=622.87, stdev=24.82, samples=  100
 	   iops        : min=   76, max=   98, avg=88.98, stdev= 3.54, samples=  100
-	    lat (usec) : 250=0.04%, 500=64.11%, 750=4.81%, 1000=2.79%
-	    lat (msec) : 2=4.16%, 4=1.84%, 10=4.90%, 20=11.33%, 50=5.37%
-	    lat (msec) : 100=0.65%
+	  lat (usec)   : 250=0.04%, 500=64.11%, 750=4.81%, 1000=2.79%
+	  lat (msec)   : 2=4.16%, 4=1.84%, 10=4.90%, 20=11.33%, 50=5.37%
+	  lat (msec)   : 100=0.65%
 	  cpu          : usr=0.27%, sys=0.18%, ctx=12072, majf=0, minf=21
 	  IO depths    : 1=85.0%, 2=13.1%, 4=1.8%, 8=0.1%, 16=0.0%, 32=0.0%, >=64=0.0%
 	     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
@@ -3174,6 +3174,10 @@ writes in the example above).  In the order listed, they denote:
 		complete is basically just CPU time (I/O has already been done, see slat
 		explanation).
 
+**lat**
+		Total latency. Same names as slat and clat, this denotes the time from
+		when fio created the I/O unit to completion of the I/O operation.
+
 **bw**
 		Bandwidth statistics based on samples. Same names as the xlat stats,
 		but also includes the number of samples taken (**samples**) and an
@@ -3185,6 +3189,14 @@ writes in the example above).  In the order listed, they denote:
 **iops**
 		IOPS statistics based on samples. Same names as bw.
 
+**lat (nsec/usec/msec)**
+		The distribution of I/O completion latencies. This is the time from when
+		I/O leaves fio and when it gets completed. Unlike the separate
+		read/write/trim sections above, the data here and in the remaining
+		sections apply to all I/Os for the reporting group. 250=0.04% means that
+		0.04% of the I/Os completed in under 250us. 500=64.11% means that 64.11%
+		of the I/Os required 250 to 499us for completion.
+
 **cpu**
 		CPU usage. User and system time, along with the number of context
 		switches this thread went through, usage of system and user time, and
@@ -3215,12 +3227,10 @@ writes in the example above).  In the order listed, they denote:
 		The number of read/write/trim requests issued, and how many of them were
 		short or dropped.
 
-**IO latencies**
-		The distribution of I/O completion latencies. This is the time from when
-		I/O leaves fio and when it gets completed.  The numbers follow the same
-		pattern as the I/O depths, meaning that 2=1.6% means that 1.6% of the
-		I/O completed within 2 msecs, 20=12.8% means that 12.8% of the I/O took
-		more than 10 msecs, but less than (or equal to) 20 msecs.
+**IO latency**
+		These values are for `--latency-target` and related options. When
+		these options are engaged, this section describes the I/O depth required
+		to meet the specified latency target.
 
 ..
 	Example output was based on the following:
Signature · 1 line
2.7.4
author
#3 lore raw

PATCH 3/3 man: update description of normal output latencies

In reply to Vincent Fu

From: Vincent Fu <[email protected]>

1) Describe lat (min, max, avg, stddev) line
2) Use IO latencies description for lat (nsec/usec/msec) lines
3) Fix IO latency description

---
 fio.1 | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)
fio.1 +19 -9
index 74eae8a..31d0a3b 100644
@@ -2793,9 +2793,9 @@ group) the output looks like:
 		     | 99.99th=[78119]
 		   bw (  KiB/s): min=  532, max=  686, per=0.10%, avg=622.87, stdev=24.82, samples=  100
 		   iops        : min=   76, max=   98, avg=88.98, stdev= 3.54, samples=  100
-		    lat (usec) : 250=0.04%, 500=64.11%, 750=4.81%, 1000=2.79%
-		    lat (msec) : 2=4.16%, 4=1.84%, 10=4.90%, 20=11.33%, 50=5.37%
-		    lat (msec) : 100=0.65%
+		  lat (usec)   : 250=0.04%, 500=64.11%, 750=4.81%, 1000=2.79%
+		  lat (msec)   : 2=4.16%, 4=1.84%, 10=4.90%, 20=11.33%, 50=5.37%
+		  lat (msec)   : 100=0.65%
 		  cpu          : usr=0.27%, sys=0.18%, ctx=12072, majf=0, minf=21
 		  IO depths    : 1=85.0%, 2=13.1%, 4=1.8%, 8=0.1%, 16=0.0%, 32=0.0%, >=64=0.0%
 		     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
@@ -2836,6 +2836,10 @@ usually be equal (or very close) to 0, as the time from submit to
 complete is basically just CPU time (I/O has already been done, see slat
 explanation).
 .TP
+.B lat
+Total latency. Same names as slat and clat, this denotes the time from
+when fio created the I/O unit to completion of the I/O operation.
+.TP
 .B bw
 Bandwidth statistics based on samples. Same names as the xlat stats,
 but also includes the number of samples taken (\fIsamples\fR) and an
@@ -2847,6 +2851,14 @@ are then competing for disk access.
 .B iops
 IOPS statistics based on samples. Same names as \fBbw\fR.
 .TP
+.B lat (nsec/usec/msec)
+The distribution of I/O completion latencies. This is the time from when
+I/O leaves fio and when it gets completed. Unlike the separate
+read/write/trim sections above, the data here and in the remaining
+sections apply to all I/Os for the reporting group. 250=0.04% means that
+0.04% of the I/Os completed in under 250us. 500=64.11% means that 64.11%
+of the I/Os required 250 to 499us for completion.
+.TP
 .B cpu
 CPU usage. User and system time, along with the number of context
 switches this thread went through, usage of system and user time, and
@@ -2877,12 +2889,10 @@ Like the above \fBsubmit\fR number, but for completions instead.
 The number of \fBread/write/trim\fR requests issued, and how many of them were
 short or dropped.
 .TP
-.B IO latencies
-The distribution of I/O completion latencies. This is the time from when
-I/O leaves fio and when it gets completed. The numbers follow the same
-pattern as the I/O \fBdepths\fR, meaning that 2=1.6% means that 1.6% of the
-I/O completed within 2 msecs, 20=12.8% means that 12.8% of the I/O took
-more than 10 msecs, but less than (or equal to) 20 msecs.
+.B IO latency
+These values are for \fBlatency-target\fR and related options. When
+these options are engaged, this section describes the I/O depth required
+to meet the specified latency target.
 .RE
 .P
 After each client has been listed, the group statistics are printed. They
Signature · 1 line
2.7.4
#4 lore raw
In reply to Vincent Fu
Quoted 5 lines · Vincent Fu

Jens, please consider this patch series.

The patches reduce the indentation of the normal output lat (nsec/usec/msec) lines and update the description of the latency output in the HOWTO and man page.

The man page changes apply on top of the patches from [email protected].

But those aren't in yet, since they don't apply to the current tree. I have applied 1-2, I'll check #3 once Tomohiro resends his series. Or you can resend when that happens.

Signature · 1 line
Jens Axboe
#5 lore raw
Quoted 10 lines · Jens Axboe
Quoted 5 lines · Vincent Fu

Jens, please consider this patch series.

The patches reduce the indentation of the normal output lat (nsec/usec/msec) lines and update the description of the latency output in the HOWTO and man page.

The man page changes apply on top of the patches from [email protected].

But those aren't in yet, since they don't apply to the current tree. I have applied 1-2, I'll check #3 once Tomohiro resends his series. Or you can resend when that happens.

I missed the v3 update - I have applied that, and your #3 as well. Thanks!

Signature · 1 line
Jens Axboe