-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
MMP delay logic changes #7068
MMP delay logic changes #7068
Conversation
In mmp_thread(), if the mmp_delay is increasing beyond the fixed mmp_interval, use the longer mmp_delay value when determining if the pool should be suspended. Otherwise, if the system is very busy (but still getting MMP writes to disk) it may incorrectly suspend the pool, even though a peer system would not import it. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Base zfs_multihost_fail_intervals on zfs_multihost_import_intervals by default, so that the number of failed writes for suspending a pool is not larger than the number of intervals a peer will use when checking if it is safe to import the pool. Otherwise, it would be possible (with poorly-set module parameters, fail_interval > import_interval) that the current importer writes MMP updates irregularly but eventually succeeds before mmp_fail_intervals (hence does not suspend the pool), yet the peer system imported the pool after waiting an insufficient number of update intervals. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
I would consider these to be more of a "bug fix" than "new feature", but either way I thought it would be useful to get some feedback sooner rather than later... It needs to add updates to the man/man5/zfs-module-parameters.5 descriptions (I'm working on this already). I was thinking about the issue of |
module/zfs/mmp.c
Outdated
@@ -392,6 +391,30 @@ mmp_thread(void *arg) | |||
else | |||
next_time = start + MSEC2NSEC(MMP_DEFAULT_INTERVAL); | |||
|
|||
/* | |||
* Don't allow fail_intervals larger than import_intervals, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be better implemented in a callback, so you can reject bad values at the time the user tries to set them? One such example is:
- 0582e40 Add callback for zfs_multihost_interval
The two reasons I remember both arise from the fact that pool properties are stored in an object in the pool.
I agree, it would be great not to depend on uniform settings among the nodes. |
What about storing the |
One might end up with different values from different VDEVs, for example if some devices get disconnected from host A but remain connected to host B. But if we take the MAX() of all values found we would still be guaranteed to have a safe value. It wouldn't be a pool property in a sense, but the user would think of it that way. Sort of breaks the model, so I'm not sure how to best cope with that. I agree that storage location for |
Looking into this I see other issues in MMP that are not dangerous but make MMP more likely to suspend the pool than they should be, or more difficult to debug than it need to be. I'm working through those and will be back with more information soon. |
"zfs_multihost_import_interval %u, " | ||
"using smaller value", | ||
zfs_multihost_fail_intervals, | ||
zfs_multihost_import_interval); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zfs_multihost_import_interval -> zfs_multihost_import_intervals ?
I'm going to close out this PR for now. Several of the changes proposed have already been committed as part of other patches. The remaining changes in behavior could benefit for additional discussion in a new PR. |
Description
RFC MMP delay logic changes from @adilger. These are based on the discussion on #7045 and #7048. (I have not tested these but I plan to.)
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.