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

configure zed's diagnosis engine with vdev properties #13805

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

rob-wing
Copy link
Contributor

Currently, zed uses hard-coded values for configuring the thresholds of its diagnosis engine . This patchset
introduces a mechanism to configure these thresholds using vdev properties.

This introduces two new vdev properties, checksum_n and checksum_t. These properties can be used
for tuning the values that are passed into the serd algorithm used by the diagnosis engine. The meaning
of these properties are N <events> in T <seconds>.

Motivation and Context

To allow a user to tune the thresholds of zed's diagnosis engine for testing and/or production purposes.

Description

  • introduce two new vdev properties, checksum_n and checksum_t
  • the default for these properties is UINT64_MAX to represent a 'none' value
  • expose these properties to zed by exporting them in a zfs_event payload

Since vdev properties don't have inheritance, I've added a routine to workaround it. If the
vdev property, checksum_n and/or checksum_t, has not been set on the vdev for the error report
being generated, the parent vdev's will be checked recursively to see if either of the properties have been set.
If these properties are not set in the vdev or any parent vdev, zed will fallback to the original hard-coded default.

How Has This Been Tested?

  • create a mirrored vdev
  • create a spare vdev
  • start zed
  • use zinject to simulate checksum errors
  • set checksum_n and checksum_t to 1
  • read file
  • verify that zed receives 'ereport.fs.zfs.checksum' and solves the fault

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)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@behlendorf behlendorf added Component: ZED ZFS Event Daemon Status: Code Review Needed Ready for review and testing labels Aug 25, 2022
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.

Thanks for picking up this work!

if (checksum_n == UINT64_MAX)
checksum_n = 10;
if (checksum_t == UINT64_MAX)
checksum_t = 600;
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 add #defines for DEFAULT_CHECKSUM_N and DEFAULT_CHECKSUM_T here so this is very clear.

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense. Should we do the same for the other things that use this idiom (filesystem_limits and snapshot_limits)?

include/sys/fm/fs/zfs.h Show resolved Hide resolved
@@ -410,6 +410,12 @@ vdev_prop_init(void)
sfeatures);

/* default numeric properties */
zprop_register_number(VDEV_PROP_CHECKSUM_N, "checksum_n", UINT64_MAX,
PROP_DEFAULT, ZFS_TYPE_VDEV, "<count>", "CHECKSUMN", B_FALSE,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
PROP_DEFAULT, ZFS_TYPE_VDEV, "<count>", "CHECKSUMN", B_FALSE,
PROP_DEFAULT, ZFS_TYPE_VDEV, "<count>", "CK_N", B_FALSE,

...and CK_T would be more consistent with CKERR above. Just not intuitive at all, maybe something like CKSUM_T and CKSUM_N?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, I think CKSUM_T is better

uint64_t objid, intval;
int err = 0;

objid = vd->vdev_top_zap != 0 ? vd->vdev_top_zap : vd->vdev_leaf_zap;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
objid = vd->vdev_top_zap != 0 ? vd->vdev_top_zap : vd->vdev_leaf_zap;
objid = vd->vdev_top_zap != 0 ?: vd->vdev_leaf_zap;

May be more readable.

@behlendorf behlendorf requested a review from a user August 25, 2022 22:02
@tonyhutter
Copy link
Contributor

  1. Regarding adding vdev_io_n and vdev_io_t - are we thinking that users will want to configure IOs thresholds independently of checksum thresholds? If not, it might be easier to have a more general errors_per_time_period and error_time_period?

  2. Along those same lines - are users really going to want to configure different thresholds per-vdev? I would think that the common case would be for all vdevs in the pool to have the same thresholds. Per-pool property maybe?

the default for these properties is UINT64_MAX to represent a 'none' value

So by 'none' do you mean "use the old default values"?

                                /*
			         * UINT64_MAX is the default value of the
				 * checksum_* vdev properties to represent a
				 * 'none' value.
				 */
				if (checksum_n == UINT64_MAX)
					checksum_n = 10;
				if (checksum_t == UINT64_MAX)
					checksum_t = 600;
  1. Please provide a test case

@rob-wing
Copy link
Contributor Author

  1. Regarding adding vdev_io_n and vdev_io_t - are we thinking that users will want to configure IOs thresholds independently of checksum thresholds? If not, it might be easier to have a more general errors_per_time_period and error_time_period?

Given that IO and checksum errors are reported independently, it seems natural to allow configuring these thresholds independently.

  1. Along those same lines - are users really going to want to configure different thresholds per-vdev? I would think that the common case would be for all vdevs in the pool to have the same thresholds. Per-pool property maybe?

I agree that the common case would be for all vdevs to have the same thresholds..and more than likely it'll be the default that the zed provides. Given two vdevs, I wonder if there's any value in having the ability to influence which vdev degrades first..that is, setting different thresholds for each vdev. I imagine that'd be an uncommon scenario though.

the default for these properties is UINT64_MAX to represent a 'none' value

So by 'none' do you mean "use the old default values"?

Indirectly, yes - by 'none', I mean the vdev property has not been set. When zed looks up the property and sees that it hasn't been set (i.e., UINT64_MAX) the zed will use a default value.

4. Please provide a test case

Will do.

@rob-wing
Copy link
Contributor Author

rob-wing commented Aug 26, 2022

Looks like there are failing tests related to this change, I'll dig into it and see what's going on.

I'll update this pull request with review feedback when I get the testing bits sorted out.

@allanjude
Copy link
Contributor

the default for these properties is UINT64_MAX to represent a 'none' value

So by 'none' do you mean "use the old default values"?

Indirectly, yes - by 'none', I mean the vdev property has not been set. When zed looks up the property and sees that it hasn't been set (i.e., UINT64_MAX) the zed will use a default value.

The difference here being: if the leaf vdev is set to none, we check its parent, and recurse all the way up to the root vdev. Basically faking inheritance. And if it is not set anywhere, fall back to the old ZED default

@tonyhutter
Copy link
Contributor

The difference here being: if the leaf vdev is set to none, we check its parent, and recurse all the way up to the root vdev. Basically faking inheritance. And if it is not set anywhere, fall back to the old ZED default

Would that be an issue with the "Properties are NOT inherited from top-level vdevs" line in vdevprops.7?

@allanjude
Copy link
Contributor

The difference here being: if the leaf vdev is set to none, we check its parent, and recurse all the way up to the root vdev. Basically faking inheritance. And if it is not set anywhere, fall back to the old ZED default

Would that be an issue with the "Properties are NOT inherited from top-level vdevs" line in vdevprops.7?

vdev properties are NOT inherited, so we wrote a little function to work around that for ZED's needs.

@rob-wing
Copy link
Contributor Author

@tonyhutter, as requested - I've added a few test cases:

  • with default settings (checksum_n=10,checksum_t=600), verify that a vdev degrades when 10 checksum events are injected in the span of 2.5 seconds
  • with checksum_t=1, verify that a vdev does not degrade when 10 checksum events are injected in the span of 2.5 seconds
  • with checksum_n=1, verify that a vdev degrades when 1 checksum event is injected

@rob-wing
Copy link
Contributor Author

The test I wrote is failing, it looks like either the 'ereport.fs.zfs.checksum' isn't making it to $ZED_DEBUG_LOG, the event is not being triggered or it's taking longer than 30 seconds for the event to hit the log:

23:06:16.14 file_wait_event exceeded 30.064 seconds
23:06:16.14 ERROR: file_wait_event /var/tmp/zed/zed.debug.log ereport.fs.zfs.checksum 30 exited 1

These tests worked on my local machine, anyone spot an obvious error? In the meantime, I'll try to replicate the error by running the tests on a fresh linux box.

In addition my failing test, the following tests failed for these specific instances:

Debian 10 x86_64: fault/auto_spare_shared
CentOS 9 x86_64: mmp/mmp_active_import
CentOS 8 x86_64: l2arc/persist_l2arc_005_pos

These tests didn't fail in the previous test run and it seems odd that the failing tests aren't consistent across the linux instances. Any insight on whether these are familiar failures or related to this PR?

} else if (vd->vdev_leaf_zap != 0) {
objid = vd->vdev_leaf_zap;
} else {
return (EINVAL);
Copy link

Choose a reason for hiding this comment

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

I was wondering if preferring the top over the leaf made sense or if there could be something that is neither top nor leaf, but this matches existing logic below in vdev_prop_get() except for the lack of SET_ERROR().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good question, I think the root vdev is neither top or leaf...and no zap. This function was partially factored out of vdev_prop_get() and I brought this sanity check over with it.

vdev_prop_get() is a bit imperfect as it doesn't handle available spares or cache vdevs correctly since they don't have a top_zap or a leaf_zap (as I understand it).

Comment on lines 834 to 847
/*
* UINT64_MAX is the default value of the
* checksum_* vdev properties to represent a
* 'none' value.
*/
if (checksum_n == UINT64_MAX)
checksum_n = DEFAULT_CHECKSUM_N;
if (checksum_t == UINT64_MAX)
checksum_t = DEFAULT_CHECKSUM_T;

Copy link

Choose a reason for hiding this comment

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

This is a bit awkward. Would it be better to leave these fields out of the payload if they are unset?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea, that is a bit weird....maybe better to leave out when unset, that way the semantics of these internal values don't bleed into userland.

it looks like sys/fs/zfs.h is a common header between ZED, module/zcommon/zpool_prop.c, module/zfs/vdev.c, and module/zfs/zfs_fm.c...although its not explicitly declared in zfs_fm.c but brought in through other includes.

..eh, probably better to just drop these fields from the payload when unset and let ZED define the default - I'll update this PR to reflect your suggestion

@tonyhutter
Copy link
Contributor

I've added a few test cases:

Thanks! 👍

The difference here being: if the leaf vdev is set to none, we check its parent, and recurse all the way up to the root vdev.

@allanjude A leaf vdev's parent is a root vdev, so there's only recursion up one level. This wouldn't recurse all the way to the pool level, if that's what you were thinking.

That said, is there use case for wanting to set thresholds on a root vdev (like mirror-0 or raidz2-0)? I'm just wondering if it's worth the added complexity.

@rob-wing
Copy link
Contributor Author

rob-wing commented Sep 2, 2022

What do folks think about storing these properties in the vdev struct? This would allow reading the properties from memory.

If I understand correctly, the zap_lookup() in the io pipeline path is problematic since it may try to doing sync io.

@tonyhutter
Copy link
Contributor

@allanjude - Sorry, you were right - I got the terminology wrong. It should be:

root vdev (the pool)
| 
top level vdev (mirror-0)
|
leaf vdev

I got tripped up looking at our documentation here:

 For example, the following creates a pool with two root vdevs, each a mirror of two disks:
# zpool create mypool mirror sda sdb mirror sdc sdd

https://openzfs.github.io/openzfs-docs/man/7/zpoolconcepts.7.html

... but this example should say "two top level vdevs".

That said, I'm able to set the values on the vdev and top-level vdev, but not the root-vdev/pool:

$ sudo ./zpool status
  pool: tank
 state: ONLINE
config:

	NAME                                         STATE     READ WRITE CKSUM
	tank                                         ONLINE       0     0     0
	  mirror-0                                   ONLINE       0     0     0
	    /home/hutter/vdev-serd-configure/file1   ONLINE       0     0     0
	    /home/hutter/vdev-serd-configure/file10  ONLINE       0     0     0
	    /home/hutter/vdev-serd-configure/file2   ONLINE       0     0     0
	    /home/hutter/vdev-serd-configure/file3   ONLINE       0     0     0
	    /home/hutter/vdev-serd-configure/file4   ONLINE       0     0     0
	    /home/hutter/vdev-serd-configure/file5   ONLINE       0     0     0
	    /home/hutter/vdev-serd-configure/file6   ONLINE       0     0     0
	    /home/hutter/vdev-serd-configure/file7   ONLINE       0     0     0
	    /home/hutter/vdev-serd-configure/file8   ONLINE       0     0     0
	    /home/hutter/vdev-serd-configure/file9   ONLINE       0     0     0

$ sudo ./zpool set checksum_t=1 tank `pwd`/file1
$ 
$ sudo ./zpool set checksum_t=42 tank mirror-0
$ 
$ sudo ./zpool set checksum_t=4242 tank 
cannot set property for 'tank': invalid property 'checksum_t'

Is there a different syntax I should be using for setting it on the root vdev?

Side note - I notice the usage text for zpool set doesn't include the vdev argument as an option:

$ sudo ./zpool set 
missing property=value argument
usage:
	set <property=value> <pool> 

@allanjude
Copy link
Contributor

@allanjude - Sorry, you were right - I got the terminology wrong. It should be:

root vdev (the pool)
| 
top level vdev (mirror-0)
|
leaf vdev

Yes, we might need to do a pass to clarify the documentation

$ sudo ./zpool set checksum_t=1 tank pwd/file1
$
$ sudo ./zpool set checksum_t=42 tank mirror-0
$
$ sudo ./zpool set checksum_t=4242 tank
cannot set property for 'tank': invalid property 'checksum_t'


Is there a different syntax I should be using for setting it on the root vdev?

Side note - I notice the usage text for `zpool set` doesn't include the vdev argument as an option:

$ sudo ./zpool set
missing property=value argument
usage:
set <property=value>

So, part of this is the way we hijacked the zpool set command.

There are 2 syntaxes:

set a property on a pool:

zpool set property=value pool

set a property on a vdev:

zpool set propery=value pool vdev

And yes, currently there is no way to set a property on the 'root' vdev. Because the way the zpool set command works, it is looking for names that are not pool names, to use as vdevs (so zpool set property=value pool pool doesn't try to interpret the latter parameter as a vdev name). I am thinking we make a reserved keyword like we did got getting the property from all vdevs (all-vdevs) and make root-vdev or something.

@tonyhutter
Copy link
Contributor

@allanjude thanks for the info. I just noticed that zpool get has a special all-vdevs option:

     zpool get [-Hp] [-o field[,field]…] all|property[,property]… pool [all-vdevs|vdev]…
             Retrieves the given list of properties (or all properties if all is used) for the specified vdevs (or all vdevs if all-vdevs is used) in the specified pool.

Would it make sense to just add all-vdevs to zpool set as well? And along with it, remove the "set top level vdev" option (to reduce complexity)? That way, you could easily set these checksum thresholds per-vdev or per-pool.

@allanjude
Copy link
Contributor

@allanjude thanks for the info. I just noticed that zpool get has a special all-vdevs option:

     zpool get [-Hp] [-o field[,field]…] all|property[,property]… pool [all-vdevs|vdev]…
             Retrieves the given list of properties (or all properties if all is used) for the specified vdevs (or all vdevs if all-vdevs is used) in the specified pool.

Would it make sense to just add all-vdevs to zpool set as well? And along with it, remove the "set top level vdev" option (to reduce complexity)? That way, you could easily set these checksum thresholds per-vdev or per-pool.

The issue with doing a set all-vdevs rather than some kind of inheritance, is that the value won't persist through a zpool replace or apply to any newer vdevs.

@tonyhutter
Copy link
Contributor

The issue with doing a set all-vdevs rather than some kind of inheritance, is that the value won't persist through a zpool replace or apply to any newer vdevs.

Hmm... that really diminishes the benefit of making the thresholds per-vdev then. You can't just "set it and forget it" on the vdevs, as would be the natural user expectation. To make the thresholds persistent (the common use case), you would have to set them on top-level-vdevs. If you added a new top-level-vdev, you would have to set thresholds on the new top-level-vdev as well. And the user would have to know that they could set values on the top-level-vdevs, which is non-standard.

With all that in mind, does it make sense to just have the thresholds be per-pool properities?

@allanjude
Copy link
Contributor

The issue with doing a set all-vdevs rather than some kind of inheritance, is that the value won't persist through a zpool replace or apply to any newer vdevs.

Hmm... that really diminishes the benefit of making the thresholds per-vdev then. You can't just "set it and forget it" on the vdevs, as would be the natural user expectation. To make the thresholds persistent (the common use case), you would have to set them on top-level-vdevs. If you added a new top-level-vdev, you would have to set thresholds on the new top-level-vdev as well. And the user would have to know that they could set values on the top-level-vdevs, which is non-standard.

With all that in mind, does it make sense to just have the thresholds be per-pool properities?

This is why we were thinking of the root-vdev property, so you could set a default basically at the pool level, but then still be able to override it at the top-level vdev or individual leaf vdev level.

@tonyhutter
Copy link
Contributor

This is why we were thinking of the root-vdev property, so you could set a default basically at the pool level, but then still be able to override it at the top-level vdev or individual leaf vdev level.

So what would the command be to set thresholds on the root vdev? I tried this earlier without success:

$ sudo ./zpool set checksum_t=4242 tank 
cannot set property for 'tank': invalid property 'checksum_t'

@allanjude
Copy link
Contributor

This is why we were thinking of the root-vdev property, so you could set a default basically at the pool level, but then still be able to override it at the top-level vdev or individual leaf vdev level.

So what would the command be to set thresholds on the root vdev? I tried this earlier without success:

$ sudo ./zpool set checksum_t=4242 tank 
cannot set property for 'tank': invalid property 'checksum_t'

The syntax does not current exist. It would need to be different than that for pool properties, like zpool set checksum_t=4242 tank root-vdev or something

@tonyhutter
Copy link
Contributor

The syntax does not current exist. It would need to be different than that for pool properties, like zpool set checksum_t=4242 tank root-vdev or something

Here's how I would summarize what this PR is proposing:

Checksum thresholds shouldn't be a per-pool property. They should instead be a per-vdev property, which would need to be re-set when a vdev is replaced, or, set on a top-level vdev, which is something we don't currently do, or set per root vdev, which we currently don't have the capability to do, but will be added at a later time, with a syntax different from setting pool properties, even though the effect is conceptually the same.

I think that may be a little too complicated. Assuming Principal Of Least Surprise, I think you could do:

  1. Per-pool property only.
  2. Per-pool property as the default for all vdevs, but vdevs can override it. However, the per-vdev value should persist across vdev replacements.

I would tend to favor 1, unless there's a real-world use case for 2.

@rob-wing
Copy link
Contributor Author

Here's how I would summarize what this PR is proposing:

Checksum thresholds shouldn't be a per-pool property.

Right, allow the user to tune a vdev at a granular level.

They should instead be a per-vdev property, which would need to be re-set when a vdev is replaced, or, set on a top-level vdev, which is something we don't currently do

This isn't entirely correct. It is possible to set this property on a top-level vdev. If one wants this property to persist when replacing a leaf vdev, it would be advised to set the property on the top-level vdev - not on the leaf vdev itself.

or set per root vdev, which we currently don't have the capability to do, but will be added at a later time, with a syntax different from setting pool properties, even though the effect is conceptually the same.

Conceptually the same, sort of. I'd view it as a vdev-wide property as opposed to a pool property.

I think that may be a little too complicated. Assuming Principal Of Least Surprise, I think you could do:

1. Per-pool property only.

In general, I'd steer away from making it a pool property; as it seems logical to maintain a clear line of separation between pool properties and vdev properties - and checksum errors are reported at the vdev level.

2. Per-pool property as the default for all vdevs, but vdevs can override it.

Syntactically, I like this. However, the namespacing is different between pool properties and vdev properties - which would require maintaining the property in two different namespaces.

I would tend to favor 1, unless there's a real-world use case for 2.

I agree it'd be ideal to figure out an intuitive syntax for setting vdev-wide properties. Either using a special keyword root-vdev as Allan suggested or some other way.

To some degree, it'd be nice to abuse the pool name as an alias to the root vdev for setting certain properties at the vdev-wide level - but eh..

Thoughts?

@allanjude
Copy link
Contributor

Based on conversations at the OpenZFS developer summit, we have settled on the syntax:
zpool set vdev_prop=value poolname poolname to reflect the root vdev. This just requires a bit of extra logic in the zpool do_set/do_get code, which currently uses the logic 'is the list all pool names? do pool props, else if the first param is a pool, and the rest are all vdevs, then do vdev properties' (borrowed from zpool iostat).

We will also add an explicit alias, root-vdev for simplicity.

@rob-wing rob-wing force-pushed the vdev-serd-configure branch 4 times, most recently from 8994402 to d234dc3 Compare November 16, 2022 18:33
@rob-wing rob-wing force-pushed the vdev-serd-configure branch 2 times, most recently from 36cc58c to 8e4922f Compare December 5, 2022 04:37
@allanjude
Copy link
Contributor

With the additional parameters added now, this is ready for review.

@tonyhutter
Copy link
Contributor

Please update the man pages to document these new properties (and root-vdev).

@rob-wing
Copy link
Contributor Author

Please update the man pages to document these new properties (and root-vdev).

Hey Tony,

I documented the new properties in vdevprops.7.

Would you find it acceptable for the root-vdev changes to be done in a separate pull request?

@tonyhutter
Copy link
Contributor

Would you find it acceptable for the root-vdev changes to be done in a separate pull request?

Sorry, I was under the mistaken impression they were included in this PR. That's fine if you want to move it to a different PR. Note that if you guys don't plan to use the root-vdev concept, and are content with using the top-level-vdevs only, then I would be fine with that too, and would vote for no follow-on PR for root-vdev.

You will want to further update the docs to make it clear you can set these new values not only on vdevs, but on top level vdevs as well. vdevprops.7 still says "Properties are NOT inherited from top-level vdevs"

You'll also want to update that man page to say that vdev props are not persistent across drive replacements, and maybe add a note to the checksum_* and io_* values suggesting to the user that they assign the value to the top-level vdev so it persists.

@rob-wing
Copy link
Contributor Author

bump

I believe all feedback has been addressed.

Are there any outstanding issues that would prevent this pull request from being merged?

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.

Thanks for iterating on this and incorporating the feedback. The updated version does look ready to go.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jan 17, 2023
@tonyhutter
Copy link
Contributor

I still think the wording in vdevprops.7 is still somewhat contradictory, since the vdev inherits the top-level-vdev's io_* and checksum_* properities if they're not set on the individual vdev:

### vdevprops.7 ###

Properties are NOT inherited from top-level vdevs.
...
If the property is only set on the top-level vdev, this value will be used.

Maybe just re-word it a little?

diff --git a/man/man7/vdevprops.7 b/man/man7/vdevprops.7
index 3244324..4468f4a 100644
--- a/man/man7/vdevprops.7
+++ b/man/man7/vdevprops.7
@@ -43,7 +43,7 @@ section, below.
 .Ss Native Properties
 Every vdev has a set of properties that export statistics about the vdev
 as well as control various behaviors.
-Properties are NOT inherited from top-level vdevs.
+In most cases, properties are not inherited from top-level vdevs.
 .Pp
 The values of numeric properties can be specified using human-readable suffixes
 .Po for example,

@rob-wing
Copy link
Contributor Author

Rebase and clarify that checksum_* and io_* properties can be inherited from a top-level vdev.

Thanks to all for taking the time to review this.

Copy link
Contributor

@tonyhutter tonyhutter 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 sticking with this!

@rob-wing
Copy link
Contributor Author

It appears the saga continues...the zed_io_config test is failing.

I'll update this pull request when I understand what the problem is.

@behlendorf
Copy link
Contributor

When updating this please go ahead and squash the commits as well.

@rob-wing
Copy link
Contributor Author

Alright, will do - I'll be updating this shortly.

I've identified the issue for the failing test which was introduced in Implement uncached prefetch #14243

The test was doing sequential reads which triggered the prefetching and subsequently exceeded the thresholds of the test causing the failure.

I'll write the test to either not do sequential reads or simply turn prefetching off via /sys/module/zfs/parameters/zfs_prefetch_disable. I'm leaning towards the latter.

@behlendorf
Copy link
Contributor

behlendorf commented Jan 20, 2023

I'd also go with disabling prefetch. We needed to do the same thing in the functional/l2arc/l2arc_mfuonly_pos.ksh test.
Also a rebase on the latest master when you update should resolve several of the unrelated CI failures.

Introduce four new vdev properties:
    checksum_n
    checksum_t
    io_n
    io_t

These properties can be used for configuring the thresholds of zed's
diagnosis engine and are interpeted as <N> events in T <seconds>.

When this property is set to a non-default value on a top-level vdev,
those thresholds will also apply to its leaf vdevs. This behavior can be
overridden by explicitly setting the property on the leaf vdev.

Note that, these properties do not persist across vdev replacement. For
this reason, it is advisable to set the property on the top-level vdev
instead of the leaf vdev.

The default values for zed's diagnosis engine (10 events, 600 seconds)
remains unchanged.

Sponsored-by: Seagate Technology LLC
Submitted-by: Klara, Inc.
Signed-off-by: Rob Wing <rob.wing@klarasystems.com>
@behlendorf behlendorf merged commit 69f024a into openzfs:master Jan 23, 2023
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Mar 3, 2023
Introduce four new vdev properties:
    checksum_n
    checksum_t
    io_n
    io_t

These properties can be used for configuring the thresholds of zed's
diagnosis engine and are interpeted as <N> events in T <seconds>.

When this property is set to a non-default value on a top-level vdev,
those thresholds will also apply to its leaf vdevs. This behavior can be
overridden by explicitly setting the property on the leaf vdev.

Note that, these properties do not persist across vdev replacement. For
this reason, it is advisable to set the property on the top-level vdev
instead of the leaf vdev.

The default values for zed's diagnosis engine (10 events, 600 seconds)
remains unchanged.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Rob Wing <rob.wing@klarasystems.com>
Sponsored-by: Seagate Technology LLC
Closes openzfs#13805
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: ZED ZFS Event Daemon Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants