]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Increase default zfs_multihost_fail_intervals and import_intervals
authorOlaf Faaland <faaland1@llnl.gov>
Wed, 13 Mar 2019 16:50:48 +0000 (09:50 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 13 Mar 2019 16:50:48 +0000 (09:50 -0700)
By default, when multihost is enabled for a pool, the pool is
suspended if (zfs_multihost_fail_intervals*zfs_multihost_interval) ms
pass without a successful MMP write.  This is the recommended
configuration.

The default value for zfs_multihost_fail_intervals has been 5, and the
default value for zfs_multihost_interval has been 1000, so pool
suspension occurred at 5 seconds.

There have been multiple cases where a single misbehaving device in a
pool triggered a SCSI reset, and all I/O paused for 5-6 seconds.  This
in turn caused MMP to suspend the pool.

In the cases observed, the rest of the devices were healthy and the
pool was otherwise correctly performing I/O.  The reset was handled
correctly by ZFS, and by suspending the pool MMP made replacing the
device more difficult as well as forcing the host to be rebooted.

Increase the default value of zfs_multihost_fail_intervals to 10, so
that MMP tolerates up to 10 seconds of failed MMP writes before
suspending the pool.

Increase the default value of zfs_multihost_import_intervals to 20, to
maintain the 2:1 safety factor.  This results in a force import taking
approximately 20 seconds when MMP is enabled, with default values.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Andreas Dilger <andreas.dilger@whamcloud.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #7709
Closes #8495

include/sys/mmp.h
man/man5/zfs-module-parameters.5

index edb0d434709f0a0fa16f8782f9957bded9a43460..6f4672a387f4299d6e66e94ccf6b4254a7f7613e 100644 (file)
@@ -29,8 +29,8 @@ extern "C" {
 
 #define        MMP_MIN_INTERVAL                100     /* ms */
 #define        MMP_DEFAULT_INTERVAL            1000    /* ms */
-#define        MMP_DEFAULT_IMPORT_INTERVALS    10
-#define        MMP_DEFAULT_FAIL_INTERVALS      5
+#define        MMP_DEFAULT_IMPORT_INTERVALS    20
+#define        MMP_DEFAULT_FAIL_INTERVALS      10
 
 typedef struct mmp_thread {
        kmutex_t        mmp_thread_lock; /* protect thread mgmt fields */
index c783a1e9b9b335639c56c8153538dbacd01040f6..2a0f5f81d7e4441ed5897ba7d5029f59651fae03 100644 (file)
@@ -1879,7 +1879,7 @@ the risk of failing to detect an active pool.  The total activity check time is
 never allowed to drop below one second.  A value of 0 is ignored and treated as
 if it was set to 1
 .sp
-Default value: \fB10\fR.
+Default value: \fB20\fR.
 .RE
 
 .sp
@@ -1900,7 +1900,7 @@ will cause the pool to be suspended.  This occurs when
 passed since the last successful multihost write.  This guarantees the activity test
 will see multihost writes if the pool is imported.
 .sp
-Default value: \fB5\fR.
+Default value: \fB10\fR.
 .RE
 
 .sp