Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zpool status -d (delays) and -p (parseable) #7756

Merged
merged 1 commit into from
Nov 9, 2018

Conversation

tonyhutter
Copy link
Contributor

@tonyhutter tonyhutter commented Jul 30, 2018

Description

This patch adds a new delays (-d) column to zpool status to show IO delays for VDEVs. It also adds a new parsable (-p) flag to display exact values.

 	NAME         STATE     READ WRITE CKSUM DELAY
 	testpool     ONLINE       0     0     0     -
	  mirror-0   ONLINE       0     0     0     -
 	    loop0    ONLINE       0     0     0    20
 	    loop1    ONLINE       0     0     0     0

Motivation and Context

We often see bad disks or bad SAS links throwing up a number of IO delay errors. This allows us to see the number of delays without manually counting them in zpool events.

Also: #6885

How Has This Been Tested?

Added test case

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commit messages are properly formatted and contain Signed-off-by.
  • Change has been approved by a ZFS on Linux member.

@ahrens
Copy link
Member

ahrens commented Jul 31, 2018

This is showing the "delay" latency injected via zinject -D ms:lanes, right? Are you displaying the number of "lanes" (parallel i/os)?

man/man8/zpool.8 Outdated
@@ -2035,6 +2035,8 @@ output. See the
option of
.Nm zpool Cm iostat
for complete details.
.It Fl d
Display the number of leaf VDEV IO delays.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this is talking about zinject -D, I think we could improve this documentation, to refer to that feature and to describe the output more precisely. It isn't clear what "a delay" is, but we could say something like "i/o's are delayed such that they will take at least this many milliseonds to complete". We should also reference the zinject functionality.

@tonyhutter
Copy link
Contributor Author

This is showing the "delay" latency injected via zinject -D ms:lanes, right?
Are you displaying the number of "lanes" (parallel i/os)?

It's actually showing the number of ZIOs that didn't complete due to a timeout. So any ZIOs that don't finish in zio_delay_max amount of time. I'll make it clearer in the documentation.

@tonyhutter tonyhutter force-pushed the delays2 branch 2 times, most recently from 7307f13 to 9a42494 Compare July 31, 2018 19:50
@behlendorf
Copy link
Contributor

It's actually showing the number of ZIOs that didn't complete due to a timeout.

Actually these IO's might have completed successfully, they just took an unreasonably long time.

@tonyhutter
Copy link
Contributor Author

@behlendorf thanks, yea that's a good point. I'll add it to the documentation.

@tonyhutter tonyhutter force-pushed the delays2 branch 3 times, most recently from b65e263 to 9960b16 Compare August 2, 2018 20:37
@tonyhutter
Copy link
Contributor Author

Documentation is updated in latest push.

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see how this information would be useful. But I'm concerned that the mechanism for determining that an IO was delayed is currently too crude to be useful.

What if instead we used the existing latency histrograms to calculate a number of delayed IOs. For example, the total number of IOs which fall outside of 2 (or maybe 3) standard deviations. That would allow us to report a more meaningful delay count regardless of the underlying device performance. What we really want from this number is to be able to easily identify problematic drives which haven't failed in any way, but are not behaving consistently and are degrading overall pool performance.

VERIFY0(nvlist_lookup_nvlist(nv,
ZPOOL_CONFIG_VDEV_STATS_EX, &nvx));
VERIFY0(nvlist_lookup_uint64(nvx,
ZPOOL_CONFIG_VDEV_DELAYS, &delays));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the fnvlist_lookup_nvlist() and fnvlist_lookup_uint64() here. We really shouldn't be calling VERIFY in the command line utilities.

cmd/zpool/zpool_main.c Show resolved Hide resolved
module/zfs/zfs_fm.c Outdated Show resolved Hide resolved
@@ -1029,6 +1032,8 @@ typedef struct vdev_stat_ex {
uint64_t vsx_agg_histo[ZIO_PRIORITY_NUM_QUEUEABLE]
[VDEV_RQ_HISTO_BUCKETS];

uint64_t vsx_delays;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be moved in to vdev_stat_t since it's a single uint64_t which will pack nicely in to the nvlist uint64 array passed to user space.

@behlendorf behlendorf added the Status: Work in Progress Not yet ready for general review label Aug 19, 2018
@tonyhutter
Copy link
Contributor Author

@behlendorf -

I can see how this information would be useful. But I'm concerned that the mechanism for
determining that an IO was delayed is currently too crude to be useful.

What if instead we used the existing latency histrograms to calculate a number of delayed IOs.

For reference, the current logic is "mark any IOs longer than zio_delay_max" as delayed, with
zio_delay_max defaulting to 30 seconds. Even at this crude default timeout, I've found the delay
event counts to be useful. I'll see the delay counts start spiking when hitting multipath
errors, for example.

I think we should get this patch in first using the existing zio_delay_max code. It's less
disruptive, and makes the test case really simple. Then, if we want to later change it to
work on standard deviations of latency, we'll have the working zpool status -d code already
in place to test it. I'm also a little hesitant to include the standard deviation code now,
since I don't know how it will it will work all hardware, especially on super low-latency devices
like 3d xpoint and nvdimm.

I'm working on fixing your other changes.

@tonyhutter tonyhutter force-pushed the delays2 branch 2 times, most recently from 58d325e to c9008f9 Compare August 29, 2018 00:16
@ahrens
Copy link
Member

ahrens commented Aug 29, 2018

I think it's confusing to call these "delays" or "delayed i/os". I think we should change the terminology to "slow i/os" or something similar (including renaming zio_delay_max and the other variables in the source code).

While we're at it, the units in which zio_delay_max are defined is a bit confusing:
#define ZIO_DELAY_MAX (30 * MILLISEC)
So the delay looks like 30 milliseconds, and there are no comments explaining otherwise, but you said above that it's actually 30 seconds. I think something like NSEC2MSEC(SEC2NSEC(30)) would make more sense (or better yet, define it in nanoseconds and use SEC2NSEC(30)).

@tonyhutter
Copy link
Contributor Author

@behlendorf I incorporated all your changes and rebased
@ahrens I'm fine with the rename, I'll make the changes.

@tonyhutter
Copy link
Contributor Author

@ahrens do you want me to rename the 'delay' event to 'slow_io' as well? Or keep it as 'delay' for compatibility?

@ahrens
Copy link
Member

ahrens commented Aug 29, 2018

@tonyhutter I think slow_io would be a better name for the event but I'll leave it to you and Brian if you think it's OK to rename the existing user-visible event.

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this event name is user visible renaming it to slow_io may to cause problems. For example, the ZEDs diagnosis engine currently ignores these events. Changing the event name would result in FMA cases being opened when there's a mismatched kernel/user space. Though I do like the name better, I think compatibility needs to win out this time.

Let's just update the zfs-events(5) man page to make it clear. While reading the man page I also noticed the zio_delay entry under PAYLOADS needs to be updated. The value returned in the payload is in nanoseconds not ticks.

#define ZIO_DELAY_MAX (30 * MILLISEC)

As for renaming the module option, changing it to zfs_slow_io_ms would be consistent with the others. There are 9 other module options expressed as milliseconds and non as nanoseconds. So let's leave this units here as-is, and simply redefine this internally as ZIO_SLOW_IO_MS 30000 which is consistent with the style used for the other module options.

I'm OK with refining what is considered a slow IO in a future patch.

cmd/zpool/zpool_main.c Outdated Show resolved Hide resolved
@@ -16,6 +16,7 @@ SUBDIRS = \
cp_files \
ctime \
deadman \
delays \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not add another top level directory for this one test. Can you move it in to functional/cli_root/zpool_status/ with the other similar test cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was the original plan, but I need to run my test as root, and functional/cli_root/zpool_status/* runs as a unprivileged user:

[tests/functional/cli_root/zpool_status]
tests = ['zpool_status_001_pos', 'zpool_status_002_pos','zpool_status_003_pos',
    'zpool_status_-c_disable', 'zpool_status_-c_homedir',
    'zpool_status_-c_searchpath']
user =
tags = ['functional', 'cli_root', 'zpool_status']

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, that makes sense. What do you think about moving it to functional/fault/zpool_status_-d then?

echo $OLD_DELAY > /sys/module/zfs/parameters/zio_delay_max

DELAYS=$(zpool status -dp | grep "$DISK" | awk '{print $6}')
if [ "$DELAYS" -gt "0" ] ; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite right, -gt won't work correctly when comparing strings instead of integers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works for me:

# ksh
$ 
$ DELAYS=5 && if [ "$DELAYS" -gt "0" ] ; then echo "greater" ; fi
greater
$ DELAYS=5 && if [ "$DELAYS" -gt "6" ] ; then echo "greater" ; fi
$ 

I'm fine with unquoting it though.

@behlendorf behlendorf added Status: Code Review Needed Ready for review and testing and removed Status: Work in Progress Not yet ready for general review labels Sep 25, 2018
@tonyhutter tonyhutter force-pushed the delays2 branch 2 times, most recently from f409b94 to fa1a953 Compare October 4, 2018 16:57
@tonyhutter
Copy link
Contributor Author

Reviewers - can you please take another look at this? I think the test failures are unrelated.

Also, I decided to keep these named "delays" rather than "slow IOs" to not break compatibility. We log all zed events to splunk, and it would be a pain to have two event names for the same event. I'd also like to keep the naming consistent between events names and our variable names.


zfs_ereport_start(&ereport, &detector, subclass, spa, vd,
rc = zfs_ereport_start(&ereport, &detector, subclass, spa, vd,
zb, zio, stateoroffset, size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this could result in 1 being returned since zfs_ereport_start() doesn't return errnos. How about:

        int error = zfs_ereport_start(&ereport, &detector, subclass,
 	    spa, vd, zb, zio, stateoroffset, size);
        if (error)
                return (SET_ERROR(EINVAL));


/* Cleanup is handled by the callback function */
zfs_zevent_post(ereport, detector, zfs_zevent_post_cb);
if (zfs_zevent_post(ereport, detector, zfs_zevent_post_cb) != 0)
return (EINVAL);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than suppress the zfs_zevent_post() errno can we also return it.

#ifdef _KERNEL
nvlist_t *ereport = NULL;
nvlist_t *detector = NULL;

if (zfs_is_ratelimiting_event(subclass, vd))
return;
return (EBUSY);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like SET_ERROR() should be used for some of these errnos.

/*
* Return 0 if the event was actually posted, return 1 if not.
*/
static int
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making the return type a boolean_t would be less misleading if we only care about success and failure. Otherwise with a return code of 0 I'd expect an errno to be returned on failure.

zfs_ereport_start(&ereport, &detector, FM_EREPORT_ZFS_CHECKSUM,
spa, vd, zb, zio, offset, length);

if (ereport == NULL)
return;
return (1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not mix errno return values with values like 1 (1 = EPERM).

@codecov
Copy link

codecov bot commented Oct 23, 2018

Codecov Report

Merging #7756 into master will decrease coverage by 0.05%.
The diff coverage is 92.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7756      +/-   ##
==========================================
- Coverage   78.44%   78.38%   -0.06%     
==========================================
  Files         381      381              
  Lines      114550   114581      +31     
==========================================
- Hits        89854    89819      -35     
- Misses      24696    24762      +66
Flag Coverage Δ
#kernel 78.7% <89.13%> (-0.04%) ⬇️
#user 67.29% <76.31%> (+0.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9569292...793d569. Read the comment docs.

\fBzio_delta\fR this does not include any vdev queuing time and is therefore
solely a measure of the block layer performance. On most modern Linux systems
HZ is defined as 1000 making a tick equivalent to 1 millisecond.
solely a measure of the block layer performance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I understand correctly that you are actually not changing the meaning of the zio_delay payload, becuase it was in nanoseconds before, but the documentation was wrong so you're updating it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct. See comment: #7756 (review)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm being thrown off by the word required, I think because there's no concept of a requirement here. I think this would be more clear as something like The time elapsed (in nanoseconds) waiting for the block layer to complete the I/O.

@ahrens
Copy link
Member

ahrens commented Oct 23, 2018

Also, I decided to keep these named "delays" rather than "slow IOs" to not break compatibility. We log all zed events to splunk, and it would be a pain to have two event names for the same event. I'd also like to keep the naming consistent between events names and our variable names.

The new functionality in zpool status elevates this concept to a much broader user base, compared to zed events. I would like to see us use a more precise name in zpool status and related documentation. Even if we need to retain a different event name for backwards compatibility.

The zfs-module-parameters manpage has a great example of the potential for confusion around the term delay:

       zfs_delay_min_dirty_percent (int)
                   Start to delay each transaction once there is  this  amount
                   of    dirty    data,   expressed   as   a   percentage   of
                   zfs_dirty_data_max. ...

       zfs_delay_scale (int)
                   This controls how quickly the transaction delay  approaches
                   infinity.   Larger  values  cause longer delays for a given
                   amount of dirty data.

                   See the section "ZFS TRANSACTION DELAY".

       zfs_delays_per_second (int)
                   Rate limit IO delay events to this many per second.
...
ZFS TRANSACTION DELAY
       We delay transactions when we've determined that  the  backend  storage
       isn't able to accommodate the rate of incoming writes.

One could easily misunderstand this as saying that we zfs_delays_per_second limits how frequently ZFS will "delay transactions". I realize we may be stuck with this term for the ZED events, but I think that many more people will interact with zpool status -d than with zed, so I think it's worth trying to contain this confusing terminology to only where it's really needed for backward compatibility.

@tonyhutter
Copy link
Contributor Author

@ahrens I think you bring up a good point regarding slow IO 'delays' getting confused with TXG delays. I've pushed an additional commit that basically renames delays to slow IOs, with the exception of delay events. I also changed the flag from -d to -s for slow IOs. Can you let me know if this new rename commit is what you're looking for? If so, I'll squash it.

Copy link
Member

@ahrens ahrens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the terminology change @tonyhutter!

module/zfs/zio.c Outdated
@@ -77,7 +77,7 @@ uint64_t zio_buf_cache_allocs[SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT];
uint64_t zio_buf_cache_frees[SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT];
#endif

int zio_delay_max = ZIO_DELAY_MAX;
int zio_slow_io_ms = ZIO_DELAY_MAX;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also rename the macro?

module/zfs/zio.c Outdated
MODULE_PARM_DESC(zio_delay_max, "Max zio millisec delay before posting event");
module_param(zio_slow_io_ms, int, 0644);
MODULE_PARM_DESC(zio_slow_io_ms,
"Max zio completion time (milliseconds) before posting a delay event");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this also controls when we count a slow io in zpool status. Maybe we should also mention the zpool status impact, since that may impact more uses.

module_param(zfs_delays_per_second, uint, 0644);
MODULE_PARM_DESC(zfs_delays_per_second, "Rate limit delay events to this many "
module_param(zfs_slow_ios_per_second, uint, 0644);
MODULE_PARM_DESC(zfs_slow_ios_per_second, "Rate limit delay events to this many "
"IO delays per second");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would you think about renaming this to indicate that it's a limit on the events? e.g. zfs_slow_io_events_per_second_max? Or is that too verbose?

Presumably this does not limit the rate at which we count slow i/os for zpool status. I wonder if it would be helpful to clarify that anywhere?

@@ -95,7 +95,7 @@ information regarding "hung" I/O detection and configuration.
.ad
.RS 12n
Issued when a completed I/O exceeds the maximum allowed time specified
by the \fBzio_delay_max\fR module option. This can be an indicator of
by the \fBzio_slow_io_ms\fR module option. This can be an indicator of
problems with the underlying storage device.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also mention the rate limiting here?

A zevent will be logged if a ZIO operation takes more than N milliseconds to
complete. Note that this is only a logging facility, not a timeout on
A delay zevent will be logged if a ZIO operation takes more than N milliseconds
to complete. Note that this is only a logging facility, not a timeout on
operations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mention the zpool status -s implications too?

@tonyhutter
Copy link
Contributor Author

@ahrens my latest commit has all your recommended fixes, plus a few other ones:

  1. Rename test case from zpool_status_-d to zpool_status_-s to match the -d to -s rename.
  2. Check for delay events in the test case.
  3. Fix it so the slow_io counters still increment when delay events are being ratelimited.

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there, only a few comments. And I think the new zfs_ereport_is_valid() function helped clean this up a lot, good idea.

man/man5/zfs-module-parameters.5 Outdated Show resolved Hide resolved
module/zfs/zfs_fm.c Outdated Show resolved Hide resolved
module/zfs/zfs_fm.c Show resolved Hide resolved
module/zfs/zio.c Outdated Show resolved Hide resolved
cmd/zpool/zpool_main.c Outdated Show resolved Hide resolved
man/man8/zpool.8 Outdated Show resolved Hide resolved
cmd/zpool/zpool_main.c Outdated Show resolved Hide resolved
include/sys/spa.h Outdated Show resolved Hide resolved
man/man8/zpool.8 Outdated Show resolved Hide resolved
module/zfs/vdev.c Outdated Show resolved Hide resolved
module/zfs/zfs_fm.c Outdated Show resolved Hide resolved
module/zfs/zfs_fm.c Outdated Show resolved Hide resolved
tests/zfs-tests/tests/functional/fault/zpool_status_-s.ksh Outdated Show resolved Hide resolved
tests/zfs-tests/tests/functional/fault/zpool_status_-s.ksh Outdated Show resolved Hide resolved
@tonyhutter
Copy link
Contributor Author

@behlendorf thanks, those are really good clean-ups you suggested. I've fixed them in my latest push: 733a3ca

@tonyhutter
Copy link
Contributor Author

I'll squash these commits after buildbot finishes

@behlendorf
Copy link
Contributor

@tonyhutter sounds good, I'd suggest rebasing too. @ahrens this should be ready for another review.

return (gettext("\tstatus [-c [script1,script2,...]] [-gLPvxD]"
"[-T d|u] [pool] ... \n"
return (gettext("\tstatus [-c [script1,script2,...]] "
"[-dgLpPvxD] [-T d|u] [pool] ... \n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d -> s

@@ -7138,6 +7164,9 @@ status_callback(zpool_handle_t *zhp, void *data)
cbp->cb_namewidth, "NAME", "STATE", "READ", "WRITE",
"CKSUM");

if (cbp->cb_print_slow_ios)
(void) printf(gettext(" SLOW"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be easier to see that this is correctly aligned if we did " %5s", like we do with the other headers, and when printing the value

@@ -161,7 +161,7 @@ enum zio_encrypt {
/*
* Default Linux timeout for a sd device.
*/
#define ZIO_DELAY_MAX (30 * MILLISEC)
#define ZIO_SLOW_IO_MAX (30 * MILLISEC)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we use a macro for this, rather than initializing int zio_slow_io_ms = 30 * MILLISEC;? I'm not seeing the value in this additional indirection.

I think wherever 30 * MILLISEC appears, we'll want a comment saying that it's 30 seconds. (as opposed to assuming that 30 * MILLISEC means 30 milliseconds).

\fBzio_delta\fR this does not include any vdev queuing time and is therefore
solely a measure of the block layer performance. On most modern Linux systems
HZ is defined as 1000 making a tick equivalent to 1 millisecond.
solely a measure of the block layer performance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm being thrown off by the word required, I think because there's no concept of a requirement here. I think this would be more clear as something like The time elapsed (in nanoseconds) waiting for the block layer to complete the I/O.

complete. Note that this is only a logging facility, not a timeout on
operations.
When an I/O operation takes more than \fBzio_slow_io_ms\fR milliseconds to
complete is marked as a slow I/O. Each slow I/O causes a delay zevent. Slow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This talks about delay zevent, and zfs_slow_ios_per_second talks about slow I/O (delay) events. I think these are talking about the same thing, so we should use the same term in both places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're close to the same thing. "slow" refers to IOs, "delay" to the event. So an IO is marked as "slow" which in turn causes a "delay event". Technically zfs_slow_ios_per_second should be called zfs_delays_per_second, since it's rate-limiting the events, but we wanted to avoid confusing it with TXG delays, so I kept it as zfs_slow_ios_per_second.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both of these are referring to events (not the i/o itself). I would suggest you change the zfs_slow_ios_per_second description to say:

Rate limit delay zevents (which report slow i/os) to this many per second.

That way both places are using the term delay zevents to refer to the event.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works, I'll make the change

man/man8/zpool.8 Outdated
@@ -2214,6 +2216,11 @@ Display a histogram of deduplication statistics, showing the allocated
and referenced
.Pq logically referenced in the pool
block counts and sizes by reference count.
.It Fl s
Display the number of leaf VDEV slow IOs. This is the number of IOs that
didn't complete in \fBzio_slow_io_ms\fR milliseconds. This does not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we mention the default value here?

This patch adds a new slow I/Os (-s) column to zpool status to show the
number of VDEV slow I/Os. This is the number of I/Os that didn't
complete in zio_slow_io_ms milliseconds. It also adds a new parsable
(-p) flag to display exact values.

 	NAME         STATE     READ WRITE CKSUM  SLOW
 	testpool     ONLINE       0     0     0     -
	  mirror-0   ONLINE       0     0     0     -
 	    loop0    ONLINE       0     0     0    20
 	    loop1    ONLINE       0     0     0     0

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes: openzfs#6885
@tonyhutter
Copy link
Contributor Author

Commits squashed and rebased. I also changed the commit message to say "slow IOs" instead of "delays".

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Nov 9, 2018
@behlendorf behlendorf merged commit ad796b8 into openzfs:master Nov 9, 2018
GregorKopka pushed a commit to GregorKopka/zfs that referenced this pull request Jan 7, 2019
This patch adds a new slow I/Os (-s) column to zpool status to show the
number of VDEV slow I/Os. This is the number of I/Os that didn't
complete in zio_slow_io_ms milliseconds. It also adds a new parsable
(-p) flag to display exact values.

 	NAME         STATE     READ WRITE CKSUM  SLOW
 	testpool     ONLINE       0     0     0     -
	  mirror-0   ONLINE       0     0     0     -
 	    loop0    ONLINE       0     0     0    20
 	    loop1    ONLINE       0     0     0     0

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes openzfs#7756
Closes openzfs#6885
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants