multipath-tools: intermittent IO error accounting to improve reliability
v4 cover multipath-tools: intermittent IO error accounting to improve reliability
Hi ALL,
This patchset add a new method of path state checking based on accounting IO error. This is useful in many scenarios such as intermittent IO error an a path due to network congestion, or a shaky link.
PATCH 1/2 implements the algorithm that sends a couple of continuous IOs at a fix rate of 10 Hz.
PATCH 2/2 discard the original algorithm because of this:
the detect sample interval of that path checkers is so big/coarse that it doesn't see what happens in the middle of the sample interval. We have the PATCH 1/2 as a better method.
Changes from V3:
* discard the
* fail the path in the kernel before enqueueing the path for checking rather than after knowing the checking result to make it more reliable. (Martin)
* use posix_memalign instead of manual alignment for direct IO buffer. (Martin)
* use PATH_MAX to avoid certain compiler warning when opening file rather than FILE_NAME_SIZE. (Martin)
* discard unnecessary sanity check when getting block size (Martin)
* do not return 0 in send_each_aync_io if io_starttime of a path is not set(Martin)
* Wait 10ms instead of 60 second if every path is down. (Martin)
* rename handle_async_io_timeout to poll_async_io_timeout and use polling method because io_getevents does not return 0 if there are timeout IO and normal IO.
* rename hit_io_err_recover_time ro hit_io_err_recheck_time
* modify the multipath.conf.5 and commit comments to keep sync with the above changes
Changes from V2:
* fix uncondistional rescedule forverver
* use script/checkpatch.pl in Linux to cleanup informal coding style
* fix "continous" and "internel" typos
Changes from V1:
* send continous IO instead of a single IO in a sample interval (Martin)
* when recover time expires, we reschedule the checking process (Hannes)
* Use the error rate threshold as a permillage instead of IO number(Martin)
* Use a common io_context for libaio for all paths (Martin)
* Other small fixes (Martin)
Junxiong Guan (2):
multipath-tools: intermittent IO error accounting to improve
reliability
multipath-tools: discard san_path_err_XXX feature
libmultipath/Makefile | 5 +- libmultipath/config.c | 3 - libmultipath/config.h | 18 +- libmultipath/configure.c | 6 +- libmultipath/dict.c | 74 ++--- libmultipath/io_err_stat.c | 743 +++++++++++++++++++++++++++++++++++++++++++++ libmultipath/io_err_stat.h | 15 + libmultipath/propsel.c | 54 ++-- libmultipath/propsel.h | 6 +- libmultipath/structs.h | 14 +- libmultipath/uevent.c | 32 ++ libmultipath/uevent.h | 2 + multipath/multipath.conf.5 | 62 ++-- multipathd/main.c | 130 ++++---- 14 files changed, 971 insertions(+), 193 deletions(-) create mode 100644 libmultipath/io_err_stat.c create mode 100644 libmultipath/io_err_stat.h
Signature · 1 line
2.11.1
PATCH v4 1/2 multipath-tools: intermittent IO error accounting to improve reliability
This patch adds a new method of path state checking based on accounting IO error. This is useful in many scenarios such as intermittent IO error an a path due to network congestion, or a shaky link.
Three parameters are added for the admin: "path_io_err_sample_time", "path_io_err_rate_threshold" and "path_io_err_recovery_time". If path_io_err_sample_time are set no less than 120 and path_io_err_recovery_time are set to a value greater than 0, when path failing events occur twice in 60 second due to an IO error, multipathd will fail the path and enqueue this path into a queue of which each member is sent a couple of continuous direct reading asynchronous io at a fixed sample rate of 10HZ. The IO accounting process for a path will last for path_io_err_sample_time. If the IO error rate on a particular path is greater than the path_io_err_rate_threshold, then the path will not reinstate for recover_time seconds unless there is only one active path.
If recover_time expires, we will reschedule this IO error checking process. If the path is good enough, we will claim it good.
This helps us place the path in delayed state if we hit a lot of intermittent IO errors on a particular path due to network/target issues and isolate such degraded path and allow the admin to rectify the errors on a path.
--- libmultipath/Makefile | 5 +- libmultipath/config.h | 9 + libmultipath/configure.c | 3 + libmultipath/dict.c | 41 +++ libmultipath/io_err_stat.c | 743 +++++++++++++++++++++++++++++++++++++++++++++ libmultipath/io_err_stat.h | 15 + libmultipath/propsel.c | 53 ++++ libmultipath/propsel.h | 3 + libmultipath/structs.h | 7 + libmultipath/uevent.c | 32 ++ libmultipath/uevent.h | 2 + multipath/multipath.conf.5 | 65 ++++ multipathd/main.c | 56 ++++ 13 files changed, 1032 insertions(+), 2 deletions(-) create mode 100644 libmultipath/io_err_stat.c create mode 100644 libmultipath/io_err_stat.h
libmultipath/Makefile +3 -2
@@ -9,7 +9,7 @@ LIBS = $(DEVLIB).$(SONAME) CFLAGS += $(LIB_CFLAGS) -I$(mpathcmddir) -LIBDEPS += -lpthread -ldl -ldevmapper -ludev -L$(mpathcmddir) -lmpathcmd -lurcu +LIBDEPS += -lpthread -ldl -ldevmapper -ludev -L$(mpathcmddir) -lmpathcmd -lurcu -laio ifdef SYSTEMD CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD)
@@ -42,7 +42,8 @@ OBJS = memory.o parser.o vector.o devmapper.o callout.o \ pgpolicies.o debug.o defaults.o uevent.o time-util.o \ switchgroup.o uxsock.o print.o alias.o log_pthread.o \ log.o configure.o structs_vec.o sysfs.o prio.o checkers.o \ - lock.o waiter.o file.o wwids.o prioritizers/alua_rtpg.o + lock.o waiter.o file.o wwids.o prioritizers/alua_rtpg.o \ + io_err_stat.o all: $(LIBS)
libmultipath/config.h +9 -0
@@ -75,6 +75,9 @@ struct hwentry {int san_path_err_threshold;int san_path_err_forget_rate;int san_path_err_recovery_time; +int path_io_err_sample_time; +int path_io_err_rate_threshold; +int path_io_err_recovery_time;int skip_kpartx;int max_sectors_kb;char * bl_product;
@@ -106,6 +109,9 @@ struct mpentry {int san_path_err_threshold;int san_path_err_forget_rate;int san_path_err_recovery_time; +int path_io_err_sample_time; +int path_io_err_rate_threshold; +int path_io_err_recovery_time;int skip_kpartx;int max_sectors_kb;uid_t uid;
@@ -155,6 +161,9 @@ struct config {int san_path_err_threshold;int san_path_err_forget_rate;int san_path_err_recovery_time; +int path_io_err_sample_time; +int path_io_err_rate_threshold; +int path_io_err_recovery_time;int uxsock_timeout;int strict_timing;int retrigger_tries;
libmultipath/configure.c +3 -0
@@ -298,6 +298,9 @@ int setup_map(struct multipath *mpp, char *params, int params_size)select_san_path_err_threshold (conf, mpp);select_san_path_err_forget_rate (conf, mpp);select_san_path_err_recovery_time (conf, mpp); +select_path_io_err_sample_time (conf, mpp); +select_path_io_err_rate_threshold (conf, mpp); +select_path_io_err_recovery_time (conf, mpp);select_skip_kpartx (conf, mpp);select_max_sectors_kb (conf, mpp);
libmultipath/dict.c +41 -0
71 lines not on this page · raw message
libmultipath/io_err_stat.c new file +743 -0
743 lines not on this page · raw message
libmultipath/io_err_stat.h new file +15 -0
@@ -0,0 +1,15 @@ +#ifndef _IO_ERR_STAT_H +#define _IO_ERR_STAT_H + +#include "vector.h" +#include "lock.h" + + +extern pthread_attr_t io_err_stat_attr; + +int start_io_err_stat_thread (void *data); +void stop_io_err_stat_thread (void ); +int io_err_stat_handle_pathfail (struct path *path); +int hit_io_err_recheck_time (struct path *pp); + +#endif /* _IO_ERR_STAT_H */
libmultipath/propsel.c +53 -0
71 lines not on this page · raw message
libmultipath/propsel.h +3 -0
@@ -28,6 +28,9 @@ int select_max_sectors_kb (struct config *conf, struct multipath * mp);int select_san_path_err_forget_rate (struct config *conf,struct multipath *mp);int select_san_path_err_threshold (struct config *conf,struct multipath *mp);int select_san_path_err_recovery_time (struct config *conf,struct multipath *mp); +int select_path_io_err_sample_time (struct config *conf,struct multipath *mp); +int select_path_io_err_rate_threshold (struct config *conf,struct multipath *mp); +int select_path_io_err_recovery_time (struct config *conf,struct multipath *mp);void reconcile_features_with_options (const char *id,char **features,int * no_path_retry,int *retain_hwhandler);
libmultipath/structs.h +7 -0
@@ -235,6 +235,10 @@ struct path {time_t dis_reinstate_time;int disable_reinstate;int san_path_err_forget_rate; +time_t io_err_dis_reinstate_time; +int io_err_disable_reinstate; +int io_err_pathfail_cnt; +int io_err_pathfail_starttime;/* configlet pointers */ struct hwentry * hwe; };
@@ -269,6 +273,9 @@ struct multipath {int san_path_err_threshold;int san_path_err_forget_rate;int san_path_err_recovery_time; +int path_io_err_sample_time; +int path_io_err_rate_threshold; +int path_io_err_recovery_time;int skip_kpartx;int max_sectors_kb;int force_readonly;
libmultipath/uevent.c +32 -0
@@ -913,3 +913,35 @@ char *uevent_get_dm_name(struct uevent *uev) }return p; } + +char *uevent_get_dm_path (struct uevent *uev) +{ +char *p =NULL ; +int i; + +for (i =0 ; uev->envp[i] !=NULL ; i++) { +if (!strncmp (uev->envp[i],"DM_PATH" ,7 ) && +strlen (uev->envp[i]) >8 ) { + p =MALLOC (strlen (uev->envp[i] +8 ) +1 ); +strcpy (p, uev->envp[i] +8 ); +break ; + } + } +return p; +} + +char *uevent_get_dm_action (struct uevent *uev) +{ +char *p =NULL ; +int i; + +for (i =0 ; uev->envp[i] !=NULL ; i++) { +if (!strncmp (uev->envp[i],"DM_ACTION" ,9 ) && +strlen (uev->envp[i]) >10 ) { + p =MALLOC (strlen (uev->envp[i] +10 ) +1 ); +strcpy (p, uev->envp[i] +10 ); +break ; + } + } +return p; +}
libmultipath/uevent.h +2 -0
@@ -37,5 +37,7 @@ int uevent_get_major(struct uevent *uev);int uevent_get_minor (struct uevent *uev);int uevent_get_disk_ro (struct uevent *uev);char *uevent_get_dm_name (struct uevent *uev); +char *uevent_get_dm_path (struct uevent *uev); +char *uevent_get_dm_action (struct uevent *uev);#endif /* _UEVENT_H */
multipath/multipath.conf.5 +65 -0
89 lines not on this page · raw message
multipathd/main.c +56 -0
110 lines not on this page · raw message
Signature · 1 line
2.11.1
Hi Guan,
This a good effort for detecting the intermittent IO error accounting to improve reliability. Your new algorithm is mutually exclusive with san_path_err_XXX.
It resolved the below issue which you have mentioned .
Quoted 2 lines
Quoted 2 lines
Even the
san_path_err_threshold,san_path_err_forget_rateandsan_path_err_recovery_timeis turned on,
the detect sample interval of that path checkers is so big/coarse that it doesn't see what happens in the middle of the sample interval.
But I have some concerns.
Correct me if my understanding on the below line is correct
Quoted 2 lines
Quoted 2 lines
On a particular path when a path failing events occur twice in 60 second due to an IO error, multipathd will fail the path and enqueue this path into a queue of which each member is sent a couple of continuous direct reading asynchronous io at a fixed sample rate of 10HZ.
Once we hit the above condition (2 errors in 60 secs) for a path_io_err_sample_time we keeps on injecting the asynchronous io at a fixed sample rate of 10HZ. And during this path_io_err_sample_time if we hit the the path_io_err_rate_threshold then we will not reinstantate this path for a path_io_err_recovery_time. Is this understanding correct?
If the above understanding is correct then my concern is :
1) On a particular path if we are seeing continuous errors but not within 60 secs (may be for every 120 secs) of duration how do we handle this. Still this a shaky link. This is what our customers are pointing out.
And if iam not wrong the new algorithm will comes into place only if a path failing events occur twice in 60 seconds.
Then this will not solve the intermittent IO error issue which we are seeing as the data is still going on the shaky path . I think this is the place where we need to pull in in san_path_err_forget_rate .
Our main intention to bring the san_path_err_XXX patch was ,if we are hitting i/o errors on a path which are exceeding san_path_err_threshold within a san_path_err_forget_rate then
We are not supposed to reinstate the path for san_path_err_recovery_time.
path_io_err_sample_time should be a sub window of san_path_err_forget_rate.
If the errors are not happening within 60 secs duration, still we need to keep track of the number of errors and if the error threshold is hit within san_path_err_forget_rate then the path will not reinstate for recover_time seconds. With the combination of these two we can find the shaky path within path_io_err_sample_time / san_path_err_forget_rate.
Regards,
Muneendra.
-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Sunday, September 17, 2017 9:11 AM
To: [email protected]; [email protected]; [email protected]
Cc: Muneendra Kumar M <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliability
This patch adds a new method of path state checking based on accounting IO error. This is useful in many scenarios such as intermittent IO error an a path due to network congestion, or a shaky link.
Three parameters are added for the admin: "path_io_err_sample_time", "path_io_err_rate_threshold" and "path_io_err_recovery_time".
If path_io_err_sample_time are set no less than 120 and path_io_err_recovery_time are set to a value greater than 0, when path failing events occur twice in 60 second due to an IO error, multipathd will fail the path and enqueue this path into a queue of which each member is sent a couple of continuous direct reading asynchronous io at a fixed sample rate of 10HZ. The IO accounting process for a path will last for path_io_err_sample_time. If the IO error rate on a particular path is greater than the path_io_err_rate_threshold, then the path will not reinstate for recover_time seconds unless there is only one active path.
If recover_time expires, we will reschedule this IO error checking process. If the path is good enough, we will claim it good.
This helps us place the path in delayed state if we hit a lot of intermittent IO errors on a particular path due to network/target issues and isolate such degraded path and allow the admin to rectify the errors on a path.
--- libmultipath/Makefile | 5 +- libmultipath/config.h | 9 + libmultipath/configure.c | 3 + libmultipath/dict.c | 41 +++ libmultipath/io_err_stat.c | 743 +++++++++++++++++++++++++++++++++++++++++++++ libmultipath/io_err_stat.h | 15 + libmultipath/propsel.c | 53 ++++ libmultipath/propsel.h | 3 + libmultipath/structs.h | 7 + libmultipath/uevent.c | 32 ++ libmultipath/uevent.h | 2 + multipath/multipath.conf.5 | 65 ++++ multipathd/main.c | 56 ++++ 13 files changed, 1032 insertions(+), 2 deletions(-) create mode 100644 libmultipath/io_err_stat.c create mode 100644 libmultipath/io_err_stat.h
libmultipath/Makefile +2 -1
@@ -9,7 +9,7 @@ LIBS = $(DEVLIB).$(SONAME) CFLAGS += $(LIB_CFLAGS) -I$(mpathcmddir) -LIBDEPS += -lpthread -ldl -ldevmapper -ludev -L$(mpathcmddir) -lmpathcmd -lurcu +LIBDEPS += -lpthread -ldl -ldevmapper -ludev -L$(mpathcmddir) +-lmpathcmd -lurcu -laio ifdef SYSTEMD
CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD)
@@ -42,7 +42,8 @@ OBJS = memory.o parser.o vector.o devmapper.o callout.o \
pgpolicies.o debug.o defaults.o uevent.o time-util.o \
switchgroup.o uxsock.o print.o alias.o log_pthread.o \
log.o configure.o structs_vec.o sysfs.o prio.o checkers.o \
- lock.o waiter.o file.o wwids.o prioritizers/alua_rtpg.o
+ lock.o waiter.o file.o wwids.o prioritizers/alua_rtpg.o \
+ io_err_stat.o
all: $(LIBS)
libmultipath/config.h +9 -0
@@ -75,6 +75,9 @@ struct hwentry {int san_path_err_threshold;int san_path_err_forget_rate;int san_path_err_recovery_time; +int path_io_err_sample_time; +int path_io_err_rate_threshold; +int path_io_err_recovery_time;int skip_kpartx;int max_sectors_kb;char * bl_product;
@@ -106,6 +109,9 @@ struct mpentry {int san_path_err_threshold;int san_path_err_forget_rate;int san_path_err_recovery_time; +int path_io_err_sample_time; +int path_io_err_rate_threshold; +int path_io_err_recovery_time;int skip_kpartx;int max_sectors_kb;uid_t uid;
@@ -155,6 +161,9 @@ struct config {int san_path_err_threshold;int san_path_err_forget_rate;int san_path_err_recovery_time; +int path_io_err_sample_time; +int path_io_err_rate_threshold; +int path_io_err_recovery_time;int uxsock_timeout;int strict_timing;int retrigger_tries;
libmultipath/configure.c +3 -0
@@ -298,6 +298,9 @@ int setup_map(struct multipath *mpp, char *params, int params_size)select_san_path_err_threshold (conf, mpp);select_san_path_err_forget_rate (conf, mpp);select_san_path_err_recovery_time (conf, mpp); +select_path_io_err_sample_time (conf, mpp); +select_path_io_err_rate_threshold (conf, mpp); +select_path_io_err_recovery_time (conf, mpp);select_skip_kpartx (conf, mpp);select_max_sectors_kb (conf, mpp);
libmultipath/dict.c +30 -0
@@ -1108,6 +1108,35 @@ declare_hw_handler(san_path_err_recovery_time, set_off_int_undef) declare_hw_snprint(san_path_err_recovery_time, print_off_int_undef) declare_mp_handler(san_path_err_recovery_time, set_off_int_undef) declare_mp_snprint(san_path_err_recovery_time, print_off_int_undef) +declare_def_handler(path_io_err_sample_time, set_off_int_undef) +declare_def_snprint_defint (path_io_err_sample_time, print_off_int_undef, + DEFAULT_ERR_CHECKS) +declare_ovr_handler(path_io_err_sample_time, set_off_int_undef) +declare_ovr_snprint(path_io_err_sample_time, print_off_int_undef) +declare_hw_handler(path_io_err_sample_time, set_off_int_undef) +declare_hw_snprint(path_io_err_sample_time, print_off_int_undef) +declare_mp_handler(path_io_err_sample_time, set_off_int_undef) +declare_mp_snprint(path_io_err_sample_time, print_off_int_undef) +declare_def_handler(path_io_err_rate_threshold, set_off_int_undef) +declare_def_snprint_defint (path_io_err_rate_threshold, print_off_int_undef, + DEFAULT_ERR_CHECKS) +declare_ovr_handler(path_io_err_rate_threshold, set_off_int_undef) +declare_ovr_snprint(path_io_err_rate_threshold, print_off_int_undef) +declare_hw_handler(path_io_err_rate_threshold, set_off_int_undef) +declare_hw_snprint(path_io_err_rate_threshold, print_off_int_undef) +declare_mp_handler(path_io_err_rate_threshold, set_off_int_undef) +declare_mp_snprint(path_io_err_rate_threshold, print_off_int_undef) +declare_def_handler(path_io_err_recovery_time, set_off_int_undef) +declare_def_snprint_defint (path_io_err_recovery_time, print_off_int_undef, + DEFAULT_ERR_CHECKS) +declare_ovr_handler(path_io_err_recovery_time, set_off_int_undef) +declare_ovr_snprint(path_io_err_recovery_time, print_off_int_undef) +declare_hw_handler(path_io_err_recovery_time, set_off_int_undef) +declare_hw_snprint(path_io_err_recovery_time, print_off_int_undef) +declare_mp_handler(path_io_err_recovery_time, set_off_int_undef) +declare_mp_snprint(path_io_err_recovery_time, print_off_int_undef) + +static int def_uxsock_timeout_handler(struct config *conf, vector strvec) { @@ -1443,6 +1472,9 @@ init_keywords(vector keywords)install_keyword ("san_path_err_threshold" , &def_san_path_err_threshold_handler, &snprint_def_san_path_err_threshold);install_keyword ("san_path_err_forget_rate" , &def_san_path_err_forget_rate_handler, &snprint_def_san_path_err_forget_rate);install_keyword ("san_path_err_recovery_time" , &def_san_path_err_recovery_time_handler, &snprint_def_san_path_err_recovery_time); +install_keyword ("path_io_err_sample_time" , &def_path_io_err_sample_time_handler, &snprint_def_path_io_err_sample_time);
+ install_keyword("path_io_err_rate_threshold", &def_path_io_err_rate_threshold_handler, &snprint_def_path_io_err_rate_threshold);
+ install_keyword("path_io_err_recovery_time",
+&def_path_io_err_recovery_time_handler,
+&snprint_def_path_io_err_recovery_time);
install_keyword("find_multipaths", &def_find_multipaths_handler, &snprint_def_find_multipaths); install_keyword("uxsock_timeout", &def_uxsock_timeout_handler, &snprint_def_uxsock_timeout); @@ -1530,6 +1562,9 @@ init_keywords(vector keywords) install_keyword("san_path_err_threshold", &hw_san_path_err_threshold_handler, &snprint_hw_san_path_err_threshold); install_keyword("san_path_err_forget_rate", &hw_san_path_err_forget_rate_handler, &snprint_hw_san_path_err_forget_rate); install_keyword("san_path_err_recovery_time", &hw_san_path_err_recovery_time_handler, &snprint_hw_san_path_err_recovery_time);
+ install_keyword("path_io_err_sample_time", &hw_path_io_err_sample_time_handler, &snprint_hw_path_io_err_sample_time);
+ install_keyword("path_io_err_rate_threshold", &hw_path_io_err_rate_threshold_handler, &snprint_hw_path_io_err_rate_threshold);
+ install_keyword("path_io_err_recovery_time",
+&hw_path_io_err_recovery_time_handler,
+&snprint_hw_path_io_err_recovery_time);
install_keyword("skip_kpartx", &hw_skip_kpartx_handler, &snprint_hw_skip_kpartx);
install_keyword("max_sectors_kb", &hw_max_sectors_kb_handler, &snprint_hw_max_sectors_kb);
install_sublevel_end();
@@ -1563,6 +1598,9 @@ init_keywords(vector keywords)
install_keyword("san_path_err_threshold", &ovr_san_path_err_threshold_handler, &snprint_ovr_san_path_err_threshold); install_keyword("san_path_err_forget_rate", &ovr_san_path_err_forget_rate_handler, &snprint_ovr_san_path_err_forget_rate); install_keyword("san_path_err_recovery_time", &ovr_san_path_err_recovery_time_handler, &snprint_ovr_san_path_err_recovery_time);
+ install_keyword("path_io_err_sample_time", &ovr_path_io_err_sample_time_handler, &snprint_ovr_path_io_err_sample_time);
+ install_keyword("path_io_err_rate_threshold", &ovr_path_io_err_rate_threshold_handler, &snprint_ovr_path_io_err_rate_threshold);
+ install_keyword("path_io_err_recovery_time",
+&ovr_path_io_err_recovery_time_handler,
+&snprint_ovr_path_io_err_recovery_time);
install_keyword("skip_kpartx", &ovr_skip_kpartx_handler, &snprint_ovr_skip_kpartx);
install_keyword("max_sectors_kb", &ovr_max_sectors_kb_handler, &snprint_ovr_max_sectors_kb); @@ -1595,6 +1633,9 @@ init_keywords(vector keywords) install_keyword("san_path_err_threshold", &mp_san_path_err_threshold_handler, &snprint_mp_san_path_err_threshold); install_keyword("san_path_err_forget_rate", &mp_san_path_err_forget_rate_handler, &snprint_mp_san_path_err_forget_rate); install_keyword("san_path_err_recovery_time", &mp_san_path_err_recovery_time_handler, &snprint_mp_san_path_err_recovery_time);
+ install_keyword("path_io_err_sample_time", &mp_path_io_err_sample_time_handler, &snprint_mp_path_io_err_sample_time);
+ install_keyword("path_io_err_rate_threshold", &mp_path_io_err_rate_threshold_handler, &snprint_mp_path_io_err_rate_threshold);
+ install_keyword("path_io_err_recovery_time",
+&mp_path_io_err_recovery_time_handler,
+&snprint_mp_path_io_err_recovery_time);
install_keyword("skip_kpartx", &mp_skip_kpartx_handler, &snprint_mp_skip_kpartx);
install_keyword("max_sectors_kb", &mp_max_sectors_kb_handler, &snprint_mp_max_sectors_kb);
install_sublevel_end();
libmultipath/io_err_stat.c new file +720 -0
720 lines not on this page · raw message
libmultipath/io_err_stat.h new file +14 -0
@@ -0,0 +1,15 @@ +#ifndef _IO_ERR_STAT_H +#define _IO_ERR_STAT_H + +#include "vector.h" +#include "lock.h" + + +extern pthread_attr_t io_err_stat_attr; + +int start_io_err_stat_thread (void *data);void +stop_io_err_stat_thread (void );int io_err_stat_handle_pathfail (struct +path *path);int hit_io_err_recheck_time (struct path *pp); + +#endif /* _IO_ERR_STAT_H */
libmultipath/propsel.c +53 -0
68 lines not on this page · raw message
libmultipath/propsel.h +5 -0
@@ -28,6 +28,9 @@ int select_max_sectors_kb (struct config *conf, struct multipath * mp); int select_san_path_err_forget_rate(struct config *conf, struct multipath *mp); int select_san_path_err_threshold(struct config *conf, struct multipath *mp); int select_san_path_err_recovery_time(struct config *conf, struct multipath *mp); +int select_path_io_err_sample_time (struct config *conf,struct +multipath *mp);int select_path_io_err_rate_threshold (struct config +*conf,struct multipath *mp);int +select_path_io_err_recovery_time (struct config *conf,struct multipath +*mp);void reconcile_features_with_options (const char *id,char **features,int * no_path_retry,int *retain_hwhandler);
libmultipath/structs.h +7 -0
@@ -235,6 +235,10 @@ struct path {time_t dis_reinstate_time;int disable_reinstate;int san_path_err_forget_rate; +time_t io_err_dis_reinstate_time; +int io_err_disable_reinstate; +int io_err_pathfail_cnt; +int io_err_pathfail_starttime;/* configlet pointers */ struct hwentry * hwe; };
@@ -269,6 +273,9 @@ struct multipath {int san_path_err_threshold;int san_path_err_forget_rate;int san_path_err_recovery_time; +int path_io_err_sample_time; +int path_io_err_rate_threshold; +int path_io_err_recovery_time;int skip_kpartx;int max_sectors_kb;int force_readonly;
libmultipath/uevent.c +30 -0
@@ -913,3 +913,35 @@ char *uevent_get_dm_name(struct uevent *uev) }return p; } + +char *uevent_get_dm_path (struct uevent *uev) { +char *p =NULL ; +int i; + +for (i =0 ; uev->envp[i] !=NULL ; i++) { +if (!strncmp (uev->envp[i],"DM_PATH" ,7 ) && +strlen (uev->envp[i]) >8 ) { + p =MALLOC (strlen (uev->envp[i] +8 ) +1 ); +strcpy (p, uev->envp[i] +8 ); +break ; + } + } +return p; +} + +char *uevent_get_dm_action (struct uevent *uev) { +char *p =NULL ; +int i; + +for (i =0 ; uev->envp[i] !=NULL ; i++) { +if (!strncmp (uev->envp[i],"DM_ACTION" ,9 ) && +strlen (uev->envp[i]) >10 ) { + p =MALLOC (strlen (uev->envp[i] +10 ) +1 ); +strcpy (p, uev->envp[i] +10 ); +break ; + } + } +return p; +}
libmultipath/uevent.h +2 -0
@@ -37,5 +37,7 @@ int uevent_get_major(struct uevent *uev); int uevent_get_minor(struct uevent *uev); int uevent_get_disk_ro(struct uevent *uev); char *uevent_get_dm_name(struct uevent *uev); +char *uevent_get_dm_path (struct uevent *uev);char +*uevent_get_dm_action (struct uevent *uev);#endif /* _UEVENT_H */
multipath/multipath.conf.5 +47 -0
53 lines not on this page · raw message
.TP
+.B path_io_err_sample_time
+.TP
+.B path_io_err_rate_threshold
+.TP
+.B path_io_err_recovery_time
+.TP
.B delay_watch_checks
.TP
.B delay_wait_checks
@@ -1246,6 +1299,12 @@ section:
.TP
.B san_path_err_recovery_time
.TP
+.B path_io_err_sample_time
+.TP
+.B path_io_err_rate_threshold
+.TP
+.B path_io_err_recovery_time
+.TP
.B delay_watch_checks
.TP
.B delay_wait_checks
@@ -1318,6 +1377,12 @@ the values are taken from the \fIdevices\fR or \fIdefaults\fR sections:
.TP
.B san_path_err_recovery_time
.TP
+.B path_io_err_sample_time
+.TP
+.B path_io_err_rate_threshold
+.TP
+.B path_io_err_recovery_time
+.TP
.B delay_watch_checks
.TP
.B delay_wait_checks
multipathd/main.c +36 -0
@@ -84,6 +84,7 @@ int uxsock_timeout;#include "cli_handlers.h" #include "lock.h" #include "waiter.h" +#include "io_err_stat.h" #include "wwids.h" #include "../third-party/valgrind/drd.h"
@@ -1050,6 +1051,41 @@ out: }static int +uev_pathfail_check (struct uevent *uev,struct vectors *vecs) { +char *action =NULL , *devt =NULL ; +struct path *pp; +int r; + + action =uevent_get_dm_action (uev); +if (!action) +return 1 ; +if (strncmp (action,"PATH_FAILED" ,11 )) + goto out; + devt =uevent_get_dm_path (uev); +if (!devt) { +condlog (3 ,"%s: No DM_PATH in uevent" , uev->kernel); + goto out; + } + +pthread_cleanup_push (cleanup_lock, &vecs->lock); +lock (&vecs->lock); +pthread_testcancel (); + pp =find_path_by_devt (vecs->pathvec, devt); + r =io_err_stat_handle_pathfail (pp); +lock_cleanup_pop (vecs->lock); + +if (r) +condlog (3 ,"io_err_stat: fails to enqueue %s" , pp->dev); +FREE (devt); +FREE (action); +return 0 ; +out: +FREE (action); +return 1 ; +} + +static int map_discovery (struct vectors * vecs) {struct multipath * mpp;
@@ -1134,6 +1170,7 @@ uev_trigger (struct uevent * uev, void * trigger_data)if (!strncmp (uev->kernel,"dm-" ,3 )) {if (!strncmp (uev->action,"change" ,6 )) { r =uev_add_map (uev, vecs); +uev_pathfail_check (uev, vecs); goto out; } if (!strncmp(uev->action, "remove", 6)) { @@ -1553,6 +1590,7 @@ static int check_path_reinstate_state(struct path * pp) {
condlog(2, "%s : hit error threshold. Delaying path reinstatement", pp->dev); pp->dis_reinstate_time = curr_time.tv_sec; pp->disable_reinstate = 1;
+
return 1;
} else {
return 0;
@@ -1684,6 +1722,16 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)
return 1;
}
+ if (pp->io_err_disable_reinstate && hit_io_err_recheck_time(pp)) {
+ pp->state = PATH_DELAYED;
+ /*
+ * to reschedule as soon as possible,so that this path can
+ * be recoverd in time
+ */
+ pp->tick = 1;
+ return 1;
+ }
+
if ((newstate == PATH_UP || newstate == PATH_GHOST) &&
pp->wait_checks > 0) {
if (pp->mpp->nr_active > 0) {
@@ -2377,6 +2425,7 @@ child (void * param)
setup_thread_attr(&misc_attr, 64 * 1024, 0); setup_thread_attr(&uevent_attr, DEFAULT_UEVENT_STACKSIZE * 1024, 0); setup_thread_attr(&waiter_attr, 32 * 1024, 1);
+ setup_thread_attr(&io_err_stat_attr, 32 * 1024, 1);
if (logsink == 1) {
setup_thread_attr(&log_attr, 64 * 1024, 0); @@ -2499,6 +2548,10 @@ child (void * param)
/*
* start threads
*/
+ rc = start_io_err_stat_thread(vecs);
+ if (rc)
+ goto failed;
+
if ((rc = pthread_create(&check_thr, &misc_attr, checkerloop, vecs))) {
condlog(0,"failed to create checker loop thread: %d", rc);
goto failed;
@@ -2548,6 +2601,8 @@ child (void * param)
remove_maps_and_stop_waiters(vecs);
unlock(&vecs->lock);
+ stop_io_err_stat_thread();
+
pthread_cancel(check_thr);
pthread_cancel(uevent_thr);
pthread_cancel(uxlsnr_thr);
@@ -2593,6 +2648,7 @@ child (void * param)
udev_unref(udev);
udev = NULL;
pthread_attr_destroy(&waiter_attr);
+ pthread_attr_destroy(&io_err_stat_attr);
#ifdef _DEBUG_
dbg_free_final(NULL);
#endif
--
2.11.1
Hi Muneendra,
Thanks for you feedback. My comments are incline below.
Quoted 9 lines · Muneendra Kumar M
Hi Guan,
This a good effort for detecting the intermittent IO error accounting to improve reliability. Your new algorithm is mutually exclusive withsan_path_err_XXX.
It resolved the below issue which you have mentioned .Quoted 2 lines
Quoted 2 lines
Even the
san_path_err_threshold,san_path_err_forget_rateandsan_path_err_recovery_timeis turned on,
the detect sample interval of that path checkers is so big/coarse that it doesn't see what happens in the middle of the sample interval.But I have some concerns.
Quoted 8 lines
Correct me if my understanding on the below line is correct
Quoted 2 lines
Quoted 2 lines
On a particular path when a path failing events occur twice in 60 second due to an IO error, multipathd will fail the path and enqueue this path into a queue of which each member is sent a couple of continuous direct reading asynchronous io at a fixed sample rate of 10HZ.
Once we hit the above condition (2 errors in 60 secs) for a
path_io_err_sample_timewe keeps on injecting the asynchronous io at a fixed sample rate of 10HZ. And during thispath_io_err_sample_timeif we hit the thepath_io_err_rate_thresholdthen we will not reinstantate this path for apath_io_err_recovery_time. Is this understanding correct?
Partial correct.
If we hit the above condition (2 errors in 60 secs), we will fail the path first before injecting a couple of asynchronous IOs to keep the testing not affected by other IOs. And after this path_io_err_sample_time :
(1) if we hit the the path_io_err_rate_threshold, the failed path will keep unchanged and then after the path_io_err_recovery_time
(which is confusing, sorry, I will rename it to "recheck"), we will reschedule this IO error checking process again.
(2) if we do NOT hit the path_io_err_rate_threshold, the failed path will reinstated by path checking thread in a tick (1 second) ASAP.
Quoted 8 lines
If the above understanding is correct then my concern is :
1) On a particular path if we are seeing continuous errors but not within 60 secs (may be for every 120 secs) of duration how do we handle this. Still this a shaky link. This is what our customers are pointing out.
And if i am not wrong the new algorithm will comes into place only if a path failing events occur twice in 60 seconds.Then this will not solve the intermittent IO error issue which we are seeing as the data is still going on the shaky path . I think this is the place where we need to pull in in
san_path_err_forget_rate.
Yes . I have thought about using some adjustable parameters such as san_path_err_pre_check_time and san_path_err_threshold to cover ALL the scenarios the user encounters. In the above fixed example,san_path_err_pre_check_time is set to 60 seconds, san_path_err_threshold is set 2.
However, if I adopt this, we have 5 parameters (san_path_err_pre_check_time and san_path_err_threshold + 3 path_io_err_XXXs ) to support this feature. You know, mulitpath.conf configuration is becoming more and more daunting as Martin pointed in the V1 of this patch.
But now, maybe it is acceptable for users to use the 5 parameters if we set san_path_err_pre_check_time and san_path_err_threshold to some default values such as 60 second and 2 respectively. **Martin** , **Muneendra**, how about this a little compromising method? If it is OK , I will update in next version of patch.
Quoted 5 lines
Our main intention to bring the
san_path_err_XXXpatch was ,if we are hitting i/o errors on a path which are exceedingsan_path_err_thresholdwithin asan_path_err_forget_ratethen
We are not supposed to reinstate the path forsan_path_err_recovery_time.
path_io_err_sample_timeshould be a sub window ofsan_path_err_forget_rate.
No, path_io_err_sample_time take effects after san_path_err_forget_rate(equal to the above san_path_err_pre_check_time). They are conditionally in sequence.
Quoted 6 lines
If the errors are not happening within 60 secs duration, still we need to keep track of the number of errors and if the error threshold is hit within
san_path_err_forget_ratethen the path will not reinstate forrecover_timeseconds. With the combination of these two we can find the shaky path withinpath_io_err_sample_time/san_path_err_forget_rate.Regards,
Muneendra.
san_path_err_forget_rate is hard to understand, shall we use san_path_err_pre_check_time instead?
Best Wishes
Guan
Quoted 37 lines
-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Sunday, September 17, 2017 9:11 AM
To: [email protected]; [email protected]; [email protected]
Cc: Muneendra Kumar M <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliabilityThis patch adds a new method of path state checking based on accounting IO error. This is useful in many scenarios such as intermittent IO error an a path due to network congestion, or a shaky link.
Three parameters are added for the admin: "
path_io_err_sample_time", "path_io_err_rate_threshold" and "path_io_err_recovery_time".
Ifpath_io_err_sample_timeare set no less than 120 andpath_io_err_recovery_timeare set to a value greater than 0, when path failing events occur twice in 60 second due to an IO error, multipathd will fail the path and enqueue this path into a queue of which each member is sent a couple of continuous direct reading asynchronous io at a fixed sample rate of 10HZ. The IO accounting process for a path will last forpath_io_err_sample_time. If the IO error rate on a particular path is greater than thepath_io_err_rate_threshold, then the path will not reinstate forrecover_timeseconds unless there is only one active path.If
recover_timeexpires, we will reschedule this IO error checking process. If the path is good enough, we will claim it good.This helps us place the path in delayed state if we hit a lot of intermittent IO errors on a particular path due to network/target issues and isolate such degraded path and allow the admin to rectify the errors on a path.
Signed-off-by Junxiong Guan <[email protected]>--- libmultipath/Makefile | 5 +- libmultipath/config.h | 9 + libmultipath/configure.c | 3 + libmultipath/dict.c | 41 +++ libmultipath/io_err_stat.c | 743 +++++++++++++++++++++++++++++++++++++++++++++ libmultipath/io_err_stat.h | 15 + libmultipath/propsel.c | 53 ++++ libmultipath/propsel.h | 3 + libmultipath/structs.h | 7 + libmultipath/uevent.c | 32 ++ libmultipath/uevent.h | 2 + multipath/multipath.conf.5 | 65 ++++ multipathd/main.c | 56 ++++ 13 files changed, 1032 insertions(+), 2 deletions(-) create mode 100644 libmultipath/io_err_stat.c create mode 100644 libmultipath/io_err_stat.hlibmultipath/Makefile +0
-0
Quoted 73 lines · Guan Junxiong
Hi Muneendra,
Thanks for you feedback. My comments are incline below.
Quoted 21 lines · Muneendra Kumar M
Hi Guan,
This a good effort for detecting the intermittent IO error accounting to improve reliability.
Your new algorithm is mutually exclusive withsan_path_err_XXX. It resolved the below issue which you have mentioned .Quoted 5 lines
Quoted 5 lines
Even the
san_path_err_threshold,san_path_err_forget_rateandsan_path_err_recovery_timeis turned on,
the detect sample interval of that path checkers is so big/coarse that it doesn't see what happens in the middle of the sample interval.But I have some concerns.
Correct me if my understanding on the below line is correct
Quoted 6 lines
Quoted 6 lines
On a particular path when a path failing events occur twice in 60 second due to an IO error, multipathd will fail the path and enqueue
this path into a queue of which each member is sent a couple of continuous direct reading asynchronous io at a fixed sample rate of 10HZ.Quoted 8 lines
Once we hit the above condition (2 errors in 60 secs) for a
path_io_err_sample_timewe keeps on injecting the asynchronous io at a fixed sample rate of 10HZ.
And during thispath_io_err_sample_timeif we hit the thepath_io_err_rate_thresholdthen we will not reinstantate this path for apath_io_err_recovery_time.
Is this understanding correct?Partial correct.
If we hit the above condition (2 errors in 60 secs), we will fail the path first before injecting a couple of asynchronous IOs to keep the testing not affected by other IOs.
And after thispath_io_err_sample_time:
(1) if we hit the thepath_io_err_rate_threshold, the failed path will keep unchanged and then after thepath_io_err_recovery_time(which is confusing, sorry, I will rename it to "recheck"), we will reschedule this IO error checking process again.
(2) if we do NOT hit thepath_io_err_rate_threshold, the failed path will reinstated by path checking thread in a tick (1 second) ASAP.Quoted 8 lines
If the above understanding is correct then my concern is :
1) On a particular path if we are seeing continuous errors but not within 60 secs (may be for every 120 secs) of duration how do we handle this. Still this a shaky link.
This is what our customers are pointing out.
And if i am not wrong the new algorithm will comes into place only if a path failing events occur twice in 60 seconds.Quoted 5 lines
Then this will not solve the intermittent IO error issue which we are seeing as the data is still going on the shaky path . I think this is the place where we need to pull in in
san_path_err_forget_rate.Yes . I have thought about using some adjustable parameters such as
san_path_err_pre_check_timeandsan_path_err_thresholdto cover ALL the scenarios the user encounters.
In the above fixed example,san_path_err_pre_check_time is set to 60 seconds,san_path_err_thresholdis set 2.
However, if I adopt this, we have 5 parameters (san_path_err_pre_check_timeandsan_path_err_threshold+ 3path_io_err_XXXs) to support this feature. You know, mulitpath.conf configuration is becoming more and more daunting as Martin pointed in the V1 of this patch.
Quoted 5 lines
But now, maybe it is acceptable for users to use the 5 parameters if we set
san_path_err_pre_check_timeandsan_path_err_thresholdto some default values such as 60 second and 2 respectively. **Martin** , **Muneendra**, how about this a little compromising method? If it is OK , I will update in next version of patch.
Hm, that sounds a lot like san_path_err_threshold and san_path_err_forget_rate, which you were about to remove.
Maybe we can simplify the algorithm by checking paths which fail in a given time interval after they've been reinstated? That would be one less additional parameter.
The big question is: how do administrators derive appropriate values for these parameters for their environment? IIUC the values don't depend on the storage array, but rather on the environment as a whole; all kinds of things like switches, cabling, or even network load can affect the behavior, so multipathd's hwtable will not help us provide good defaults. Yet we have to assume that a very high percentage of installations will just use default or vendor-recommended values. Even if the documentation of the algorithm and its parameters was perfect (which it currently isn't), most admins won't have a clue how to set them. AFAICS we don't even have a test procedure to derive the optimal settings experimentally, thus guesswork is going to be applied, with questionable odds for success.
IOW: the whole stuff is basically useless without good default values. It would be up to you hardware guys to come up with them.
Quoted 2 lines
san_path_err_forget_rateis hard to understand, shall we use Regardssan_path_err_pre_check_time
A 'rate' would be something which is measured in Hz, which is not the case here. Calling it a 'time' is more accurate. If we go with my proposal above, we might call it "san_path_double_fault_time".
Regards
Martin
Signature · 8 lines
Dr. Martin Wilck <[email protected]>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/dm-devel
Quoted 80 lines · Martin Wilck
Quoted 73 lines · Guan Junxiong
Hi Muneendra,
Thanks for you feedback. My comments are incline below.
Quoted 21 lines · Muneendra Kumar M
Hi Guan,
This a good effort for detecting the intermittent IO error accounting to improve reliability.
Your new algorithm is mutually exclusive withsan_path_err_XXX. It resolved the below issue which you have mentioned .Quoted 5 lines
Quoted 5 lines
Even the
san_path_err_threshold,san_path_err_forget_rateandsan_path_err_recovery_timeis turned on,
the detect sample interval of that path checkers is so big/coarse that it doesn't see what happens in the middle of the sample interval.But I have some concerns.
Correct me if my understanding on the below line is correct
Quoted 6 lines
Quoted 6 lines
On a particular path when a path failing events occur twice in 60 second due to an IO error, multipathd will fail the path and enqueue
this path into a queue of which each member is sent a couple of continuous direct reading asynchronous io at a fixed sample rate of 10HZ.Quoted 8 lines
Once we hit the above condition (2 errors in 60 secs) for a
path_io_err_sample_timewe keeps on injecting the asynchronous io at a fixed sample rate of 10HZ.
And during thispath_io_err_sample_timeif we hit the thepath_io_err_rate_thresholdthen we will not reinstantate this path for apath_io_err_recovery_time.
Is this understanding correct?Partial correct.
If we hit the above condition (2 errors in 60 secs), we will fail the path first before injecting a couple of asynchronous IOs to keep the testing not affected by other IOs.
And after thispath_io_err_sample_time:
(1) if we hit the thepath_io_err_rate_threshold, the failed path will keep unchanged and then after thepath_io_err_recovery_time(which is confusing, sorry, I will rename it to "recheck"), we will reschedule this IO error checking process again.
(2) if we do NOT hit thepath_io_err_rate_threshold, the failed path will reinstated by path checking thread in a tick (1 second) ASAP.Quoted 8 lines
If the above understanding is correct then my concern is :
1) On a particular path if we are seeing continuous errors but not within 60 secs (may be for every 120 secs) of duration how do we handle this. Still this a shaky link.
This is what our customers are pointing out.
And if i am not wrong the new algorithm will comes into place only if a path failing events occur twice in 60 seconds.Quoted 5 lines
Then this will not solve the intermittent IO error issue which we are seeing as the data is still going on the shaky path . I think this is the place where we need to pull in in
san_path_err_forget_rate.Yes . I have thought about using some adjustable parameters such as
san_path_err_pre_check_timeandsan_path_err_thresholdto cover ALL the scenarios the user encounters.
In the above fixed example,san_path_err_pre_check_time is set to 60 seconds,san_path_err_thresholdis set 2.
However, if I adopt this, we have 5 parameters (san_path_err_pre_check_timeandsan_path_err_threshold+ 3path_io_err_XXXs) to support this feature. You know, mulitpath.conf configuration is becoming more and more daunting as Martin pointed in the V1 of this patch.Quoted 5 lines
But now, maybe it is acceptable for users to use the 5 parameters if we set
san_path_err_pre_check_timeandsan_path_err_thresholdto some default values such as 60 second and 2 respectively. **Martin** , **Muneendra**, how about this a little compromising method? If it is OK , I will update in next version of patch.
Quoted 7 lines
Hm, that sounds a lot like
san_path_err_thresholdandsan_path_err_forget_rate, which you were about to remove.Maybe we can simplify the algorithm by checking paths which fail in a given time interval after they've been reinstated? That would be one less additional parameter.
"san_path_double_fault_time" is great. One less additional parameter and still covering most scenarios are appreciated.
Quoted 13 lines
The big question is: how do administrators derive appropriate values for these parameters for their environment? IIUC the values don't depend on the storage array, but rather on the environment as a whole; all kinds of things like switches, cabling, or even network load can affect the behavior, so multipathd's hwtable will not help us provide good defaults. Yet we have to assume that a very high percentage of installations will just use default or vendor-recommended values. Even if the documentation of the algorithm and its parameters was perfect (which it currently isn't), most admins won't have a clue how to set them. AFAICS we don't even have a test procedure to derive the optimal settings experimentally, thus guesswork is going to be applied, with questionable odds for success.
Quoted 3 lines
IOW: the whole stuff is basically useless without good default values. It would be up to you hardware guys to come up with them.
I agree. So let users to come up with those values. What we can do is to log the testing result such as path_io_err_rate in the given sample time.
Quoted 10 lines
Quoted 2 lines
san_path_err_forget_rateis hard to understand, shall we use Regardssan_path_err_pre_check_timeA 'rate' would be something which is measured in Hz, which is not the case here. Calling it a 'time' is more accurate. If we go with my proposal above, we might call it "
san_path_double_fault_time".Regards
Martin
Regards
Guan
Hi Guan/Martin,
Below are my points.
Quoted 1 line
Quoted 1 line
Quoted 1 line
"
san_path_double_fault_time" is great. One less additional parameter and still covering most scenarios are appreciated.
This looks good and I completely agree with Guan.
One question san_path_double_fault_time is the time between two failed states (failed-active-failed )is this correct ?. Then this holds good.
Instead of san_path_double_fault_time can we call it as san_path_double_failed_time as the name suggests the time between two failed states is this ok ?
In SAN topology (FC,NVME,SCSI)transient intermittent network errors make the ITL paths as marginal paths.
So instead of calling "path_io_err_sample_time", "path_io_err_rate_threshold" and "path_io_err_recovery_time" can we name as "marginal_path_err_detection_time", " marginal_path_err_rate_threshold" and " marginal_path_err_recovery_time"
Some other names should also be good as the io_path is general word from my view.
If we agree with this one more thing which I would like to add as part of this patch.
Whenever the path is in XXX_io_error_recovery_time and if the user runs multipath -ll command the path the state of the path is shown as failed as shown below.
| `- 6:0:0:0 sdb 8:16 failed ready running
Can we add a new state as marginal so that when the admin run the multipath command and found that the state is in marginal he can quickly come to know that this a marginal Path and needs to be recovered .If we keep the state as failed the admin cannot understand from past how much time the device is in failed state.
Regards,
Muneendra.
-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Tuesday, September 19, 2017 7:03 AM
To: Martin Wilck <[email protected]>; Muneendra Kumar M <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliability
Quoted 78 lines · Martin Wilck
Quoted 71 lines · Guan Junxiong
Hi Muneendra,
Thanks for you feedback. My comments are incline below.
Quoted 19 lines · Muneendra Kumar M
Hi Guan,
This a good effort for detecting the intermittent IO error accounting to improve reliability.
Your new algorithm is mutually exclusive withsan_path_err_XXX. It resolved the below issue which you have mentioned .Quoted 4 lines
Quoted 4 lines
Even the
san_path_err_threshold,san_path_err_forget_rateandsan_path_err_recovery_timeis turned on, the detect sample interval of that path checkers is so big/coarse that it doesn't see what happens in the middle of the sample interval.But I have some concerns.
Correct me if my understanding on the below line is correct
Quoted 5 lines
Quoted 5 lines
On a particular path when a path failing events occur twice in 60 second due to an IO error, multipathd will fail the path and enqueue this path into a queue of which each member is sent a couple of continuous direct reading asynchronous io at a fixed sample rate of 10HZ.
Quoted 8 lines
Once we hit the above condition (2 errors in 60 secs) for a
path_io_err_sample_timewe keeps on injecting the asynchronous io at a fixed sample rate of 10HZ.
And during thispath_io_err_sample_timeif we hit the thepath_io_err_rate_thresholdthen we will not reinstantate this path for apath_io_err_recovery_time.
Is this understanding correct?Partial correct.
If we hit the above condition (2 errors in 60 secs), we will fail the path first before injecting a couple of asynchronous IOs to keep the testing not affected by other IOs.
And after thispath_io_err_sample_time:
(1) if we hit the thepath_io_err_rate_threshold, the failed path will keep unchanged and then after thepath_io_err_recovery_time(which is confusing, sorry, I will rename it to "recheck"), we will reschedule this IO error checking process again.
(2) if we do NOT hit thepath_io_err_rate_threshold, the failed path will reinstated by path checking thread in a tick (1 second) ASAP.Quoted 8 lines
If the above understanding is correct then my concern is :
1) On a particular path if we are seeing continuous errors but not within 60 secs (may be for every 120 secs) of duration how do we handle this. Still this a shaky link.
This is what our customers are pointing out.
And if i am not wrong the new algorithm will comes into place only if a path failing events occur twice in 60 seconds.Quoted 5 lines
Then this will not solve the intermittent IO error issue which we are seeing as the data is still going on the shaky path . I think this is the place where we need to pull in in
san_path_err_forget_rate.Yes . I have thought about using some adjustable parameters such as
san_path_err_pre_check_timeandsan_path_err_thresholdto cover ALL the scenarios the user encounters.
In the above fixed example,san_path_err_pre_check_time is set to 60 seconds,san_path_err_thresholdis set 2.
However, if I adopt this, we have 5 parameters (san_path_err_pre_check_timeandsan_path_err_threshold+ 3path_io_err_XXXs) to support this feature. You know, mulitpath.conf configuration is becoming more and more daunting as Martin pointed in the V1 of this patch.Quoted 5 lines
But now, maybe it is acceptable for users to use the 5 parameters if we set
san_path_err_pre_check_timeandsan_path_err_thresholdto some default values such as 60 second and 2 respectively. **Martin** , **Muneendra**, how about this a little compromising method? If it is OK , I will update in next version of patch.
Quoted 7 lines
Hm, that sounds a lot like
san_path_err_thresholdandsan_path_err_forget_rate, which you were about to remove.Maybe we can simplify the algorithm by checking paths which fail in a given time interval after they've been reinstated? That would be one less additional parameter.
"san_path_double_fault_time" is great. One less additional parameter and still covering most scenarios are appreciated.
Quoted 13 lines
The big question is: how do administrators derive appropriate values for these parameters for their environment? IIUC the values don't depend on the storage array, but rather on the environment as a whole; all kinds of things like switches, cabling, or even network load can affect the behavior, so multipathd's hwtable will not help us provide good defaults. Yet we have to assume that a very high percentage of installations will just use default or vendor-recommended values. Even if the documentation of the algorithm and its parameters was perfect (which it currently isn't), most admins won't have a clue how to set them. AFAICS we don't even have a test procedure to derive the optimal settings experimentally, thus guesswork is going to be applied, with questionable odds for success.
Quoted 3 lines
IOW: the whole stuff is basically useless without good default values. It would be up to you hardware guys to come up with them.
I agree. So let users to come up with those values. What we can do is to log the testing result such as path_io_err_rate in the given sample time.
Quoted 10 lines
Quoted 2 lines
san_path_err_forget_rateis hard to understand, shall we use Regardssan_path_err_pre_check_timeA 'rate' would be something which is measured in Hz, which is not the case here. Calling it a 'time' is more accurate. If we go with my proposal above, we might call it "
san_path_double_fault_time".Regards
Martin
Regards
Guan
Hi Muneendra ,
Thanks for your suggestion. My comments inline.
Quoted 11 lines · Muneendra Kumar M
Hi Guan/Martin,
Below are my points.Quoted 1 line
Quoted 1 line
Quoted 1 line
"
san_path_double_fault_time" is great. One less additional parameter and still covering most scenarios are appreciated.This looks good and I completely agree with Guan.
One question
san_path_double_fault_timeis the time between two failed states (failed-active-failed )is this correct ?. Then this holds good.Instead of
san_path_double_fault_timecan we call it assan_path_double_failed_timeas the name suggests the time between two failed states is this ok ?
Both names are fine for me.
Quoted 8 lines
In SAN topology (FC,NVME,SCSI)transient intermittent network errors make the ITL paths as marginal paths.
So instead of calling "
path_io_err_sample_time", "path_io_err_rate_threshold" and "path_io_err_recovery_time" can we name as "marginal_path_err_detection_time", "marginal_path_err_rate_threshold" and "marginal_path_err_recovery_time"Some other names should also be good as the
io_pathis general word from my view.Quoted 1 line
Can you explain "the marginal paths" in details? Can the users easily catch the meaning of marginal paths? IMO, path_io_err_XXXs are easy to under_stand
Quoted 10 lines
If we agree with this one more thing which I would like to add as part of this patch.
Whenever the path is in
XXX_io_error_recovery_timeand if the user runs multipath -ll command the path the state of the path is shown as failed as shown below.| `- 6:0:0:0 sdb 8:16 failed ready runningCan we add a new state as marginal so that when the admin run the multipath command and found that the state is in marginal he can quickly come to know that this a marginal Path and needs to be recovered .If we keep the state as failed the admin cannot understand from past how much time the device is in failed state.
If the user use multipathd -k , then input "show paths", the multipathd will show the path in the state of "delayed". But we can't find the exactly reason of the delayed state path because other features such as path waiting uses it. Shall we use existing PATH_SHAKY ?
Regards.
Guan
Hi Guan,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Shall we use existing
PATH_SHAKY?
As the path_shaky Indicates path not available for "normal" operations we can use this state. That's a good idea.
Regarding the marginal paths below is my explanation. And brocade is publishing couple of white papers regarding the same to educate the SAN administrators and the san community.
Marginal path:
A host, target, LUN (ITL path) flow goes through SAN. It is to be noted that the for each I/O request that goes to the SCSI layer, it transforms into a single SCSI exchange. In a single SAN, there are typically multiple SAN network paths for a ITL flow/path. Each SCSI exchange can take one of the various network paths that are available for the ITL path. A SAN can be based on Ethernet, FC, Infiniband physical networks to carry block storage traffic (SCSI, NVMe etc.)
There are typically two type of SAN network problems that are categorized as marginal issues. These issues by nature are not permanent in time and do come and go away over time.
1) Switches in the SAN can have intermittent frame drops or intermittent frame corruptions due to bad optics cable (SFP) or any such wear/tear port issues. This causes ITL flows that go through the faulty switch/port to intermittently experience frame drops.
2) There exists SAN topologies where there are switch ports in the fabric that becomes the only conduit for many different ITL flows across multiple hosts. These single network paths are essentially shared across multiple ITL flows. Under these conditions if the port link bandwidth is not able to handle the net sum of the shared ITL flows bandwidth going through the single path then we could see intermittent network congestion problems. This condition is called network oversubscription. The intermittent congestions can delay SCSI exchange completion time (increase in I/O latency is observed).
To overcome the above network issues and many more such target issues, there are frame level retries that are done in HBA device firmware and I/O retries in the SCSI layer. These retries might succeed because of two reasons:
1) The intermittent switch/port issue is not observed
2) The retry I/O is a new SCSI exchange. This SCSI exchange can take an alternate SAN path for the ITL flow, if such an SAN path exists.
3) Network congestion disappears momentarily because the net I/O bandwidth coming from multiple ITL flows on the single shared network path is something the path can handle
However in some cases we have seen I/O retries don’t succeed because the retry I/Os hits a SAN network path that has intermittent switch/port issue and/or network congestion.
On the host thus we see configurations two or more ITL path sharing the same target/LUN going through two or more HBA ports. These HBA ports are connected to two or more SAN to the same target/LUN.
If the I/O fails at the multipath layer then, the ITL path is turned into Failed state. Because of the marginal nature of the network, the next Health Check command sent from multipath layer might succeed, which results in making the ITL path into Active state. You end up seeing the DM path state going into Active, Failed, Active transitions. This results in overall reduction in application I/O throughput and sometime application I/O failures (because of timing constraints). All this can happen because of I/O retries and I/O request moving across multiple paths of the DM device. In the host it is to be noted all I/O retries on a single path and I/O movement across multiple paths results in slowing down the forward progress of new application I/O. Reason behind, the above I/O re-queue actions are given higher priority than the newer I/O requests coming from the application.
The above condition of the ITL path is hence called “marginal”.
What we desire is for the DM to deterministically categorize a ITL Path as “marginal” and move all the pending I/Os from the marginal Path to an Active Path. This will help in meeting application I/O timing constraints. Also a capability to automatically re-instantiate the marginal path into Active once the marginal condition in the network is fixed.
Based on the above explanation I want to rename the names as marginal_path_XXXX and this is irrespective of any storage network.
Regards,
Muneendra.
-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Tuesday, September 19, 2017 6:23 PM
To: Muneendra Kumar M <[email protected]>; Martin Wilck <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliability
Hi Muneendra ,
Thanks for your suggestion. My comments inline.
Quoted 11 lines · Muneendra Kumar M
Hi Guan/Martin,
Below are my points.Quoted 1 line
Quoted 1 line
Quoted 1 line
"
san_path_double_fault_time" is great. One less additional parameter and still covering most scenarios are appreciated.This looks good and I completely agree with Guan.
One question
san_path_double_fault_timeis the time between two failed states (failed-active-failed )is this correct ?. Then this holds good.Instead of
san_path_double_fault_timecan we call it assan_path_double_failed_timeas the name suggests the time between two failed states is this ok ?
Both names are fine for me.
Quoted 8 lines
In SAN topology (FC,NVME,SCSI)transient intermittent network errors make the ITL paths as marginal paths.
So instead of calling "
path_io_err_sample_time", "path_io_err_rate_threshold" and "path_io_err_recovery_time" can we name as "marginal_path_err_detection_time", "marginal_path_err_rate_threshold" and "marginal_path_err_recovery_time"Some other names should also be good as the
io_pathis general word from my view.Quoted 1 line
Can you explain "the marginal paths" in details? Can the users easily catch the meaning of marginal paths? IMO, path_io_err_XXXs are easy to under_stand
Quoted 10 lines
If we agree with this one more thing which I would like to add as part of this patch.
Whenever the path is in
XXX_io_error_recovery_timeand if the user runs multipath -ll command the path the state of the path is shown as failed as shown below.| `- 6:0:0:0 sdb 8:16 failed ready runningCan we add a new state as marginal so that when the admin run the
multipath command and found that the state is in marginal he can quickly come to know that this a marginal Path and needs to be recovered .If we keep the state as failed the admin cannot understand from past how much time the device is in failed state.
If the user use multipathd -k , then input "show paths", the multipathd will show the path in the state of "delayed". But we can't find the exactly reason of the delayed state path because other features such as path waiting uses it. Shall we use existing PATH_SHAKY ?
Regards.
Guan
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Hi, Muneendra
Thanks for your clarification. I adopt this renaming. If it is convenient for you, please review the V5 patch that I sent out 2 hours ago.
Regards,
Guan
Quoted 26 lines · Muneendra Kumar M
Hi Guan,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Shall we use existing
PATH_SHAKY?As the
path_shakyIndicates path not available for "normal" operations we can use this state. That's a good idea.Regarding the marginal paths below is my explanation. And brocade is publishing couple of white papers regarding the same to educate the SAN administrators and the san community.
Marginal path:
A host, target, LUN (ITL path) flow goes through SAN. It is to be noted that the for each I/O request that goes to the SCSI layer, it transforms into a single SCSI exchange. In a single SAN, there are typically multiple SAN network paths for a ITL flow/path. Each SCSI exchange can take one of the various network paths that are available for the ITL path. A SAN can be based on Ethernet, FC, Infiniband physical networks to carry block storage traffic (SCSI, NVMe etc.)
There are typically two type of SAN network problems that are categorized as marginal issues. These issues by nature are not permanent in time and do come and go away over time.
1) Switches in the SAN can have intermittent frame drops or intermittent frame corruptions due to bad optics cable (SFP) or any such wear/tear port issues. This causes ITL flows that go through the faulty switch/port to intermittently experience frame drops.
2) There exists SAN topologies where there are switch ports in the fabric that becomes the only conduit for many different ITL flows across multiple hosts. These single network paths are essentially shared across multiple ITL flows. Under these conditions if the port link bandwidth is not able to handle the net sum of the shared ITL flows bandwidth going through the single path then we could see intermittent network congestion problems. This condition is called network oversubscription. The intermittent congestions can delay SCSI exchange completion time (increase in I/O latency is observed).To overcome the above network issues and many more such target issues, there are frame level retries that are done in HBA device firmware and I/O retries in the SCSI layer. These retries might succeed because of two reasons:
1) The intermittent switch/port issue is not observed
2) The retry I/O is a new SCSI exchange. This SCSI exchange can take an alternate SAN path for the ITL flow, if such an SAN path exists.
3) Network congestion disappears momentarily because the net I/O bandwidth coming from multiple ITL flows on the single shared network path is something the path can handleHowever in some cases we have seen I/O retries don’t succeed because the retry I/Os hits a SAN network path that has intermittent switch/port issue and/or network congestion.
On the host thus we see configurations two or more ITL path sharing the same target/LUN going through two or more HBA ports. These HBA ports are connected to two or more SAN to the same target/LUN.
If the I/O fails at the multipath layer then, the ITL path is turned into Failed state. Because of the marginal nature of the network, the next Health Check command sent from multipath layer might succeed, which results in making the ITL path into Active state. You end up seeing the DM path state going into Active, Failed, Active transitions. This results in overall reduction in application I/O throughput and sometime application I/O failures (because of timing constraints). All this can happen because of I/O retries and I/O request moving across multiple paths of the DM device. In the host it is to be noted all I/O retries on a single path and I/O movement across multiple paths results in slowing down the forward progress of new application I/O. Reason behind, the above I/O re-queue actions are given higher priority than the newer I/O requests coming from the application.The above condition of the ITL path is hence called “marginal”.
Quoted 7 lines
What we desire is for the DM to deterministically categorize a ITL Path as “marginal” and move all the pending I/Os from the marginal Path to an Active Path. This will help in meeting application I/O timing constraints. Also a capability to automatically re-instantiate the marginal path into Active once the marginal condition in the network is fixed.
Based on the above explanation I want to rename the names as
marginal_path_XXXXand this is irrespective of any storage network.Regards,
Muneendra.
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Hi Guan,
Thanks for adopting the naming convention.
Instead of marginal_path_err_recheck_gap_time, marginal_path_recovery_time will looks reasonable.Could you please relook into it.
I will review the code in a day time.
Regards,
Muneendra.
-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Thursday, September 21, 2017 3:35 PM
To: Muneendra Kumar M <[email protected]>; Martin Wilck <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliability
Hi, Muneendra
Thanks for your clarification. I adopt this renaming. If it is convenient for you, please review the V5 patch that I sent out 2 hours ago.
Regards,
Guan
Quoted 26 lines · Muneendra Kumar M
Hi Guan,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Shall we use existing
PATH_SHAKY?As the
path_shakyIndicates path not available for "normal" operations we can use this state. That's a good idea.Regarding the marginal paths below is my explanation. And brocade is publishing couple of white papers regarding the same to educate the SAN administrators and the san community.
Marginal path:
A host, target, LUN (ITL path) flow goes through SAN. It is to be noted that the for each I/O request that goes to the SCSI layer, it transforms into a single SCSI exchange. In a single SAN, there are typically multiple SAN network paths for a ITL flow/path. Each SCSI exchange can take one of the various network paths that are available for the ITL path. A SAN can be based on Ethernet, FC, Infiniband physical networks to carry block storage traffic (SCSI, NVMe etc.)
There are typically two type of SAN network problems that are categorized as marginal issues. These issues by nature are not permanent in time and do come and go away over time.
1) Switches in the SAN can have intermittent frame drops or intermittent frame corruptions due to bad optics cable (SFP) or any such wear/tear port issues. This causes ITL flows that go through the faulty switch/port to intermittently experience frame drops.
2) There exists SAN topologies where there are switch ports in the fabric that becomes the only conduit for many different ITL flows across multiple hosts. These single network paths are essentially shared across multiple ITL flows. Under these conditions if the port link bandwidth is not able to handle the net sum of the shared ITL flows bandwidth going through the single path then we could see intermittent network congestion problems. This condition is called network oversubscription. The intermittent congestions can delay SCSI exchange completion time (increase in I/O latency is observed).To overcome the above network issues and many more such target issues, there are frame level retries that are done in HBA device firmware and I/O retries in the SCSI layer. These retries might succeed because of two reasons:
1) The intermittent switch/port issue is not observed
2) The retry I/O is a new SCSI exchange. This SCSI exchange can take an alternate SAN path for the ITL flow, if such an SAN path exists.
3) Network congestion disappears momentarily because the net I/O bandwidth coming from multiple ITL flows on the single shared network path is something the path can handleHowever in some cases we have seen I/O retries don’t succeed because the retry I/Os hits a SAN network path that has intermittent switch/port issue and/or network congestion.
On the host thus we see configurations two or more ITL path sharing the same target/LUN going through two or more HBA ports. These HBA ports are connected to two or more SAN to the same target/LUN.
If the I/O fails at the multipath layer then, the ITL path is turned into Failed state. Because of the marginal nature of the network, the next Health Check command sent from multipath layer might succeed, which results in making the ITL path into Active state. You end up seeing the DM path state going into Active, Failed, Active transitions. This results in overall reduction in application I/O throughput and sometime application I/O failures (because of timing constraints). All this can happen because of I/O retries and I/O request moving across multiple paths of the DM device. In the host it is to be noted all I/O retries on a single path and I/O movement across multiple paths results in slowing down the forward progress of new application I/O. Reason behind, the above I/O re-queue actions are given higher priority than the newer I/O requests coming from the application.The above condition of the ITL path is hence called “marginal”.
Quoted 7 lines
What we desire is for the DM to deterministically categorize a ITL Path as “marginal” and move all the pending I/Os from the marginal Path to an Active Path. This will help in meeting application I/O timing constraints. Also a capability to automatically re-instantiate the marginal path into Active once the marginal condition in the network is fixed.
Based on the above explanation I want to rename the names as
marginal_path_XXXXand this is irrespective of any storage network.Regards,
Muneendra.
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Muneendra,
Sorry for late reply because of National Holiday.
Quoted 5 lines · Muneendra Kumar M
Hi Guan,
Did you push the patch to mainline.
If so can you just provide me those details.
If not can you just let me know the status.
Yes, I pushed Version 6 of the patch to the mail list but it hasn't been merged yet. It is still waiting for review.
You can find it at this link:
https://www.redhat.com/archives/dm-devel/2017-September/msg00296.html
Quoted 3 lines
As couple of our clients are already using the previous
patch(san_path_XX). If your patch is pushed then I can give them the updated patch and test the same.
If the patch if OK for you, can I add your Reviewed-by tag into this patch?
Regards,
Guan
Quoted 27 lines
Regards,
Muneendra.-----Original Message-----
From: Muneendra Kumar M
Sent: Thursday, September 21, 2017 3:41 PM
To: 'Guan Junxiong' <[email protected]>; Martin Wilck <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliabilityHi Guan,
Thanks for adopting the naming convention.
Instead ofmarginal_path_err_recheck_gap_time,marginal_path_recovery_timewill looks reasonable.Could you please relook into it.I will review the code in a day time.
Regards,
Muneendra.-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Thursday, September 21, 2017 3:35 PM
To: Muneendra Kumar M <[email protected]>; Martin Wilck <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliability
Quoted 42 lines
Hi, Muneendra
Thanks for your clarification. I adopt this renaming. If it is convenient for you, please review the V5 patch that I sent out 2 hours ago.
Regards,
GuanQuoted 33 lines · Muneendra Kumar M
Hi Guan,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Shall we use existing
PATH_SHAKY?As the
path_shakyIndicates path not available for "normal" operations we can use this state. That's a good idea.Regarding the marginal paths below is my explanation. And brocade is publishing couple of white papers regarding the same to educate the SAN administrators and the san community.
Marginal path:
A host, target, LUN (ITL path) flow goes through SAN. It is to be noted that the for each I/O request that goes to the SCSI layer, it transforms into a single SCSI exchange. In a single SAN, there are typically multiple SAN network paths for a ITL flow/path. Each SCSI exchange can take one of the various network paths that are available for the ITL path. A SAN can be based on Ethernet, FC, Infiniband physical networks to carry block storage traffic (SCSI, NVMe etc.)
There are typically two type of SAN network problems that are categorized as marginal issues. These issues by nature are not permanent in time and do come and go away over time.
1) Switches in the SAN can have intermittent frame drops or intermittent frame corruptions due to bad optics cable (SFP) or any such wear/tear port issues. This causes ITL flows that go through the faulty switch/port to intermittently experience frame drops.
2) There exists SAN topologies where there are switch ports in the fabric that becomes the only conduit for many different ITL flows across multiple hosts. These single network paths are essentially shared across multiple ITL flows. Under these conditions if the port link bandwidth is not able to handle the net sum of the shared ITL flows bandwidth going through the single path then we could see intermittent network congestion problems. This condition is called network oversubscription. The intermittent congestions can delay SCSI exchange completion time (increase in I/O latency is observed).To overcome the above network issues and many more such target issues, there are frame level retries that are done in HBA device firmware and I/O retries in the SCSI layer. These retries might succeed because of two reasons:
1) The intermittent switch/port issue is not observed
2) The retry I/O is a new SCSI exchange. This SCSI exchange can take an alternate SAN path for the ITL flow, if such an SAN path exists.
3) Network congestion disappears momentarily because the net I/O bandwidth coming from multiple ITL flows on the single shared network path is something the path can handleHowever in some cases we have seen I/O retries don’t succeed because the retry I/Os hits a SAN network path that has intermittent switch/port issue and/or network congestion.
On the host thus we see configurations two or more ITL path sharing the same target/LUN going through two or more HBA ports. These HBA ports are connected to two or more SAN to the same target/LUN.
If the I/O fails at the multipath layer then, the ITL path is turned into Failed state. Because of the marginal nature of the network, the next Health Check command sent from multipath layer might succeed, which results in making the ITL path into Active state. You end up seeing the DM path state going into Active, Failed, Active transitions. This results in overall reduction in application I/O throughput and sometime application I/O failures (because of timing constraints). All this can happen because of I/O retries and I/O request moving across multiple paths of the DM device. In the host it is to be noted all I/O retries on a single path and I/O movement across multiple paths results in slowing down the forward progress of new application I/O. Reason behind, the above I/O re-queue actions are given higher priority than the newer I/O requests coming from the application.The above condition of the ITL path is hence called “marginal”.
What we desire is for the DM to deterministically categorize a ITL Path as “marginal” and move all the pending I/Os from the marginal Path to an Active Path. This will help in meeting application I/O timing constraints. Also a capability to automatically re-instantiate the marginal path into Active once the marginal condition in the network is fixed.
Based on the above explanation I want to rename the names as
marginal_path_XXXXand this is irrespective of any storage network.Regards,
Muneendra.
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Hi Guan,
Thanks for the info.
Changes looks fine.
Instead of marginal_path_err_recheck_gap_time, marginal_path_recovery_time will looks reasonable. This was only my input.
Regards,
Muneendra.
-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Monday, October 09, 2017 6:13 AM
To: Muneendra Kumar M <[email protected]>
Cc: Shenhong (C) <[email protected]>; niuhaoxin <[email protected]>; Martin Wilck <[email protected]>; Christophe Varoqui <[email protected]>; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliability
Hi Muneendra,
Sorry for late reply because of National Holiday.
Quoted 5 lines · Muneendra Kumar M
Hi Guan,
Did you push the patch to mainline.
If so can you just provide me those details.
If not can you just let me know the status.
Yes, I pushed Version 6 of the patch to the mail list but it hasn't been merged yet. It is still waiting for review.
You can find it at this link:
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.redhat.com_archives_dm-2Ddevel_2017-2DSeptember_msg00296.html&d=DwIDaQ&c=IL_XqQWOjubgfqINi2jTzg&r=E3ftc47B6BGtZ4fVaYvkuv19wKvC_Mc6nhXaA1sBIP0&m=N8T04oW6j0kkcf5fLp8jXA1y75SRN6PM9D-dM5nc2d4&s=sBZTTjpCVZB3NBgGXwPCE1fBtqAmx75s0DkAsVYRrwc&e=
Quoted 3 lines
As couple of our clients are already using the previous
patch(san_path_XX). If your patch is pushed then I can give them the updated patch and test the same.
If the patch if OK for you, can I add your Reviewed-by tag into this patch?
Regards,
Guan
Quoted 27 lines
Regards,
Muneendra.-----Original Message-----
From: Muneendra Kumar M
Sent: Thursday, September 21, 2017 3:41 PM
To: 'Guan Junxiong' <[email protected]>; Martin Wilck <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliabilityHi Guan,
Thanks for adopting the naming convention.
Instead ofmarginal_path_err_recheck_gap_time,marginal_path_recovery_timewill looks reasonable.Could you please relook into it.I will review the code in a day time.
Regards,
Muneendra.-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Thursday, September 21, 2017 3:35 PM
To: Muneendra Kumar M <[email protected]>; Martin Wilck <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliability
Quoted 42 lines
Hi, Muneendra
Thanks for your clarification. I adopt this renaming. If it is convenient for you, please review the V5 patch that I sent out 2 hours ago.
Regards,
GuanQuoted 33 lines · Muneendra Kumar M
Hi Guan,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Shall we use existing
PATH_SHAKY?As the
path_shakyIndicates path not available for "normal" operations we can use this state. That's a good idea.Regarding the marginal paths below is my explanation. And brocade is publishing couple of white papers regarding the same to educate the SAN administrators and the san community.
Marginal path:
A host, target, LUN (ITL path) flow goes through SAN. It is to be noted that the for each I/O request that goes to the SCSI layer, it transforms into a single SCSI exchange. In a single SAN, there are typically multiple SAN network paths for a ITL flow/path. Each SCSI exchange can take one of the various network paths that are available for the ITL path. A SAN can be based on Ethernet, FC, Infiniband physical networks to carry block storage traffic (SCSI, NVMe etc.)
There are typically two type of SAN network problems that are categorized as marginal issues. These issues by nature are not permanent in time and do come and go away over time.
1) Switches in the SAN can have intermittent frame drops or intermittent frame corruptions due to bad optics cable (SFP) or any such wear/tear port issues. This causes ITL flows that go through the faulty switch/port to intermittently experience frame drops.
2) There exists SAN topologies where there are switch ports in the fabric that becomes the only conduit for many different ITL flows across multiple hosts. These single network paths are essentially shared across multiple ITL flows. Under these conditions if the port link bandwidth is not able to handle the net sum of the shared ITL flows bandwidth going through the single path then we could see intermittent network congestion problems. This condition is called network oversubscription. The intermittent congestions can delay SCSI exchange completion time (increase in I/O latency is observed).To overcome the above network issues and many more such target issues, there are frame level retries that are done in HBA device firmware and I/O retries in the SCSI layer. These retries might succeed because of two reasons:
1) The intermittent switch/port issue is not observed
2) The retry I/O is a new SCSI exchange. This SCSI exchange can take an alternate SAN path for the ITL flow, if such an SAN path exists.
3) Network congestion disappears momentarily because the net I/O bandwidth coming from multiple ITL flows on the single shared network path is something the path can handleHowever in some cases we have seen I/O retries don’t succeed because the retry I/Os hits a SAN network path that has intermittent switch/port issue and/or network congestion.
On the host thus we see configurations two or more ITL path sharing the same target/LUN going through two or more HBA ports. These HBA ports are connected to two or more SAN to the same target/LUN.
If the I/O fails at the multipath layer then, the ITL path is turned into Failed state. Because of the marginal nature of the network, the next Health Check command sent from multipath layer might succeed, which results in making the ITL path into Active state. You end up seeing the DM path state going into Active, Failed, Active transitions. This results in overall reduction in application I/O throughput and sometime application I/O failures (because of timing constraints). All this can happen because of I/O retries and I/O request moving across multiple paths of the DM device. In the host it is to be noted all I/O retries on a single path and I/O movement across multiple paths results in slowing down the forward progress of new application I/O. Reason behind, the above I/O re-queue actions are given higher priority than the newer I/O requests coming from the application.The above condition of the ITL path is hence called “marginal”.
What we desire is for the DM to deterministically categorize a ITL Path as “marginal” and move all the pending I/Os from the marginal Path to an Active Path. This will help in meeting application I/O timing constraints. Also a capability to automatically re-instantiate the marginal path into Active once the marginal condition in the network is fixed.
Based on the above explanation I want to rename the names as
marginal_path_XXXXand this is irrespective of any storage network.Regards,
Muneendra.
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Hi Guan,
Quoted 1 line
Quoted 1 line
If the patch if OK for you, can I add your Reviewed-by tag into this patch?
The patch is ok for me.
The patch is ok for me.
Regards,
Muneendra.
-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Monday, October 09, 2017 6:13 AM
To: Muneendra Kumar M <[email protected]>
Cc: Shenhong (C) <[email protected]>; niuhaoxin <[email protected]>; Martin Wilck <[email protected]>; Christophe Varoqui <[email protected]>; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliability
Hi Muneendra,
Sorry for late reply because of National Holiday.
Quoted 5 lines · Muneendra Kumar M
Hi Guan,
Did you push the patch to mainline.
If so can you just provide me those details.
If not can you just let me know the status.
Yes, I pushed Version 6 of the patch to the mail list but it hasn't been merged yet. It is still waiting for review.
You can find it at this link:
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.redhat.com_archives_dm-2Ddevel_2017-2DSeptember_msg00296.html&d=DwIDaQ&c=IL_XqQWOjubgfqINi2jTzg&r=E3ftc47B6BGtZ4fVaYvkuv19wKvC_Mc6nhXaA1sBIP0&m=N8T04oW6j0kkcf5fLp8jXA1y75SRN6PM9D-dM5nc2d4&s=sBZTTjpCVZB3NBgGXwPCE1fBtqAmx75s0DkAsVYRrwc&e=
Quoted 3 lines
As couple of our clients are already using the previous
patch(san_path_XX). If your patch is pushed then I can give them the updated patch and test the same.
If the patch if OK for you, can I add your Reviewed-by tag into this patch?
Regards,
Guan
Quoted 27 lines
Regards,
Muneendra.-----Original Message-----
From: Muneendra Kumar M
Sent: Thursday, September 21, 2017 3:41 PM
To: 'Guan Junxiong' <[email protected]>; Martin Wilck <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliabilityHi Guan,
Thanks for adopting the naming convention.
Instead ofmarginal_path_err_recheck_gap_time,marginal_path_recovery_timewill looks reasonable.Could you please relook into it.I will review the code in a day time.
Regards,
Muneendra.-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Thursday, September 21, 2017 3:35 PM
To: Muneendra Kumar M <[email protected]>; Martin Wilck <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliability
Quoted 42 lines
Hi, Muneendra
Thanks for your clarification. I adopt this renaming. If it is convenient for you, please review the V5 patch that I sent out 2 hours ago.
Regards,
GuanQuoted 33 lines · Muneendra Kumar M
Hi Guan,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Shall we use existing
PATH_SHAKY?As the
path_shakyIndicates path not available for "normal" operations we can use this state. That's a good idea.Regarding the marginal paths below is my explanation. And brocade is publishing couple of white papers regarding the same to educate the SAN administrators and the san community.
Marginal path:
A host, target, LUN (ITL path) flow goes through SAN. It is to be noted that the for each I/O request that goes to the SCSI layer, it transforms into a single SCSI exchange. In a single SAN, there are typically multiple SAN network paths for a ITL flow/path. Each SCSI exchange can take one of the various network paths that are available for the ITL path. A SAN can be based on Ethernet, FC, Infiniband physical networks to carry block storage traffic (SCSI, NVMe etc.)
There are typically two type of SAN network problems that are categorized as marginal issues. These issues by nature are not permanent in time and do come and go away over time.
1) Switches in the SAN can have intermittent frame drops or intermittent frame corruptions due to bad optics cable (SFP) or any such wear/tear port issues. This causes ITL flows that go through the faulty switch/port to intermittently experience frame drops.
2) There exists SAN topologies where there are switch ports in the fabric that becomes the only conduit for many different ITL flows across multiple hosts. These single network paths are essentially shared across multiple ITL flows. Under these conditions if the port link bandwidth is not able to handle the net sum of the shared ITL flows bandwidth going through the single path then we could see intermittent network congestion problems. This condition is called network oversubscription. The intermittent congestions can delay SCSI exchange completion time (increase in I/O latency is observed).To overcome the above network issues and many more such target issues, there are frame level retries that are done in HBA device firmware and I/O retries in the SCSI layer. These retries might succeed because of two reasons:
1) The intermittent switch/port issue is not observed
2) The retry I/O is a new SCSI exchange. This SCSI exchange can take an alternate SAN path for the ITL flow, if such an SAN path exists.
3) Network congestion disappears momentarily because the net I/O bandwidth coming from multiple ITL flows on the single shared network path is something the path can handleHowever in some cases we have seen I/O retries don’t succeed because the retry I/Os hits a SAN network path that has intermittent switch/port issue and/or network congestion.
On the host thus we see configurations two or more ITL path sharing the same target/LUN going through two or more HBA ports. These HBA ports are connected to two or more SAN to the same target/LUN.
If the I/O fails at the multipath layer then, the ITL path is turned into Failed state. Because of the marginal nature of the network, the next Health Check command sent from multipath layer might succeed, which results in making the ITL path into Active state. You end up seeing the DM path state going into Active, Failed, Active transitions. This results in overall reduction in application I/O throughput and sometime application I/O failures (because of timing constraints). All this can happen because of I/O retries and I/O request moving across multiple paths of the DM device. In the host it is to be noted all I/O retries on a single path and I/O movement across multiple paths results in slowing down the forward progress of new application I/O. Reason behind, the above I/O re-queue actions are given higher priority than the newer I/O requests coming from the application.The above condition of the ITL path is hence called “marginal”.
What we desire is for the DM to deterministically categorize a ITL Path as “marginal” and move all the pending I/Os from the marginal Path to an Active Path. This will help in meeting application I/O timing constraints. Also a capability to automatically re-instantiate the marginal path into Active once the marginal condition in the network is fixed.
Based on the above explanation I want to rename the names as
marginal_path_XXXXand this is irrespective of any storage network.Regards,
Muneendra.
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Hi Muneendra,
Quoted 7 lines · Muneendra Kumar M
Hi Guan,
Quoted 1 line
Quoted 1 line
If the patch if OK for you, can I add your Reviewed-by tag into this patch?
The patch is ok for me.
The patch is ok for me.
OK, I will add your Reviewed-by tag in the version 7 ASAP. BTW, do your clients give any feedback to improve the feature?
Regards
Guan
Quoted 22 lines
-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Monday, October 09, 2017 6:13 AM
To: Muneendra Kumar M <[email protected]>
Cc: Shenhong (C) <[email protected]>; niuhaoxin <[email protected]>; Martin Wilck <[email protected]>; Christophe Varoqui <[email protected]>; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliabilityHi Muneendra,
Sorry for late reply because of National Holiday.Quoted 5 lines · Muneendra Kumar M
Hi Guan,
Did you push the patch to mainline.
If so can you just provide me those details.
If not can you just let me know the status.Yes, I pushed Version 6 of the patch to the mail list but it hasn't been merged yet. It is still waiting for review.
You can find it at this link:
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.redhat.com_archives_dm-2Ddevel_2017-2DSeptember_msg00296.html&d=DwIDaQ&c=IL_XqQWOjubgfqINi2jTzg&r=E3ftc47B6BGtZ4fVaYvkuv19wKvC_Mc6nhXaA1sBIP0&m=N8T04oW6j0kkcf5fLp8jXA1y75SRN6PM9D-dM5nc2d4&s=sBZTTjpCVZB3NBgGXwPCE1fBtqAmx75s0DkAsVYRrwc&e=
Quoted 79 lines
Quoted 3 lines
As couple of our clients are already using the previous
patch(san_path_XX). If your patch is pushed then I can give them the updated patch and test the same.If the patch if OK for you, can I add your Reviewed-by tag into this patch?
Regards,
GuanQuoted 69 lines
Regards,
Muneendra.-----Original Message-----
From: Muneendra Kumar M
Sent: Thursday, September 21, 2017 3:41 PM
To: 'Guan Junxiong' <[email protected]>; Martin Wilck <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliabilityHi Guan,
Thanks for adopting the naming convention.
Instead ofmarginal_path_err_recheck_gap_time,marginal_path_recovery_timewill looks reasonable.Could you please relook into it.I will review the code in a day time.
Regards,
Muneendra.-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Thursday, September 21, 2017 3:35 PM
To: Muneendra Kumar M <[email protected]>; Martin Wilck <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliabilityHi, Muneendra
Thanks for your clarification. I adopt this renaming. If it is convenient for you, please review the V5 patch that I sent out 2 hours ago.
Regards,
GuanQuoted 33 lines · Muneendra Kumar M
Hi Guan,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Shall we use existing
PATH_SHAKY?As the
path_shakyIndicates path not available for "normal" operations we can use this state. That's a good idea.Regarding the marginal paths below is my explanation. And brocade is publishing couple of white papers regarding the same to educate the SAN administrators and the san community.
Marginal path:
A host, target, LUN (ITL path) flow goes through SAN. It is to be noted that the for each I/O request that goes to the SCSI layer, it transforms into a single SCSI exchange. In a single SAN, there are typically multiple SAN network paths for a ITL flow/path. Each SCSI exchange can take one of the various network paths that are available for the ITL path. A SAN can be based on Ethernet, FC, Infiniband physical networks to carry block storage traffic (SCSI, NVMe etc.)
There are typically two type of SAN network problems that are categorized as marginal issues. These issues by nature are not permanent in time and do come and go away over time.
1) Switches in the SAN can have intermittent frame drops or intermittent frame corruptions due to bad optics cable (SFP) or any such wear/tear port issues. This causes ITL flows that go through the faulty switch/port to intermittently experience frame drops.
2) There exists SAN topologies where there are switch ports in the fabric that becomes the only conduit for many different ITL flows across multiple hosts. These single network paths are essentially shared across multiple ITL flows. Under these conditions if the port link bandwidth is not able to handle the net sum of the shared ITL flows bandwidth going through the single path then we could see intermittent network congestion problems. This condition is called network oversubscription. The intermittent congestions can delay SCSI exchange completion time (increase in I/O latency is observed).To overcome the above network issues and many more such target issues, there are frame level retries that are done in HBA device firmware and I/O retries in the SCSI layer. These retries might succeed because of two reasons:
1) The intermittent switch/port issue is not observed
2) The retry I/O is a new SCSI exchange. This SCSI exchange can take an alternate SAN path for the ITL flow, if such an SAN path exists.
3) Network congestion disappears momentarily because the net I/O bandwidth coming from multiple ITL flows on the single shared network path is something the path can handleHowever in some cases we have seen I/O retries don’t succeed because the retry I/Os hits a SAN network path that has intermittent switch/port issue and/or network congestion.
On the host thus we see configurations two or more ITL path sharing the same target/LUN going through two or more HBA ports. These HBA ports are connected to two or more SAN to the same target/LUN.
If the I/O fails at the multipath layer then, the ITL path is turned into Failed state. Because of the marginal nature of the network, the next Health Check command sent from multipath layer might succeed, which results in making the ITL path into Active state. You end up seeing the DM path state going into Active, Failed, Active transitions. This results in overall reduction in application I/O throughput and sometime application I/O failures (because of timing constraints). All this can happen because of I/O retries and I/O request moving across multiple paths of the DM device. In the host it is to be noted all I/O retries on a single path and I/O movement across multiple paths results in slowing down the forward progress of new application I/O. Reason behind, the above I/O re-queue actions are given higher priority than the newer I/O requests coming from the application.The above condition of the ITL path is hence called “marginal”.
What we desire is for the DM to deterministically categorize a ITL Path as “marginal” and move all the pending I/Os from the marginal Path to an Active Path. This will help in meeting application I/O timing constraints. Also a capability to automatically re-instantiate the marginal path into Active once the marginal condition in the network is fixed.
Based on the above explanation I want to rename the names as
marginal_path_XXXXand this is irrespective of any storage network.Regards,
Muneendra.
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Hi Guan,
Iam waiting for the feedback from the clients.
Regards,
Muneendra.
-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Thursday, October 12, 2017 12:16 PM
To: Muneendra Kumar M <[email protected]>
Cc: Shenhong (C) <[email protected]>; niuhaoxin <[email protected]>; Martin Wilck <[email protected]>; Christophe Varoqui <[email protected]>; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliability
Hi Muneendra,
Quoted 7 lines · Muneendra Kumar M
Hi Guan,
Quoted 1 line
Quoted 1 line
If the patch if OK for you, can I add your Reviewed-by tag into this patch?
The patch is ok for me.
The patch is ok for me.
OK, I will add your Reviewed-by tag in the version 7 ASAP. BTW, do your clients give any feedback to improve the feature?
Regards
Guan
Quoted 22 lines
-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Monday, October 09, 2017 6:13 AM
To: Muneendra Kumar M <[email protected]>
Cc: Shenhong (C) <[email protected]>; niuhaoxin <[email protected]>; Martin Wilck <[email protected]>; Christophe Varoqui <[email protected]>; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliabilityHi Muneendra,
Sorry for late reply because of National Holiday.Quoted 5 lines · Muneendra Kumar M
Hi Guan,
Did you push the patch to mainline.
If so can you just provide me those details.
If not can you just let me know the status.Yes, I pushed Version 6 of the patch to the mail list but it hasn't been merged yet. It is still waiting for review.
You can find it at this link:
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.redhat.com_archives_dm-2Ddevel_2017-2DSeptember_msg00296.html&d=DwIDaQ&c=IL_XqQWOjubgfqINi2jTzg&r=E3ftc47B6BGtZ4fVaYvkuv19wKvC_Mc6nhXaA1sBIP0&m=N8T04oW6j0kkcf5fLp8jXA1y75SRN6PM9D-dM5nc2d4&s=sBZTTjpCVZB3NBgGXwPCE1fBtqAmx75s0DkAsVYRrwc&e=
Quoted 79 lines
Quoted 3 lines
As couple of our clients are already using the previous
patch(san_path_XX). If your patch is pushed then I can give them the updated patch and test the same.If the patch if OK for you, can I add your Reviewed-by tag into this patch?
Regards,
GuanQuoted 69 lines
Regards,
Muneendra.-----Original Message-----
From: Muneendra Kumar M
Sent: Thursday, September 21, 2017 3:41 PM
To: 'Guan Junxiong' <[email protected]>; Martin Wilck <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliabilityHi Guan,
Thanks for adopting the naming convention.
Instead ofmarginal_path_err_recheck_gap_time,marginal_path_recovery_timewill looks reasonable.Could you please relook into it.I will review the code in a day time.
Regards,
Muneendra.-----Original Message-----
From: Guan Junxiong [mailto:[email protected]]
Sent: Thursday, September 21, 2017 3:35 PM
To: Muneendra Kumar M <[email protected]>; Martin Wilck <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH V4 1/2] multipath-tools: intermittent IO error accounting to improve reliabilityHi, Muneendra
Thanks for your clarification. I adopt this renaming. If it is convenient for you, please review the V5 patch that I sent out 2 hours ago.
Regards,
GuanQuoted 33 lines · Muneendra Kumar M
Hi Guan,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Shall we use existing
PATH_SHAKY?As the
path_shakyIndicates path not available for "normal" operations we can use this state. That's a good idea.Regarding the marginal paths below is my explanation. And brocade is publishing couple of white papers regarding the same to educate the SAN administrators and the san community.
Marginal path:
A host, target, LUN (ITL path) flow goes through SAN. It is to be noted that the for each I/O request that goes to the SCSI layer, it transforms into a single SCSI exchange. In a single SAN, there are typically multiple SAN network paths for a ITL flow/path. Each SCSI exchange can take one of the various network paths that are available for the ITL path. A SAN can be based on Ethernet, FC, Infiniband physical networks to carry block storage traffic (SCSI, NVMe etc.)
There are typically two type of SAN network problems that are categorized as marginal issues. These issues by nature are not permanent in time and do come and go away over time.
1) Switches in the SAN can have intermittent frame drops or intermittent frame corruptions due to bad optics cable (SFP) or any such wear/tear port issues. This causes ITL flows that go through the faulty switch/port to intermittently experience frame drops.
2) There exists SAN topologies where there are switch ports in the fabric that becomes the only conduit for many different ITL flows across multiple hosts. These single network paths are essentially shared across multiple ITL flows. Under these conditions if the port link bandwidth is not able to handle the net sum of the shared ITL flows bandwidth going through the single path then we could see intermittent network congestion problems. This condition is called network oversubscription. The intermittent congestions can delay SCSI exchange completion time (increase in I/O latency is observed).To overcome the above network issues and many more such target issues, there are frame level retries that are done in HBA device firmware and I/O retries in the SCSI layer. These retries might succeed because of two reasons:
1) The intermittent switch/port issue is not observed
2) The retry I/O is a new SCSI exchange. This SCSI exchange can take an alternate SAN path for the ITL flow, if such an SAN path exists.
3) Network congestion disappears momentarily because the net I/O bandwidth coming from multiple ITL flows on the single shared network path is something the path can handleHowever in some cases we have seen I/O retries don’t succeed because the retry I/Os hits a SAN network path that has intermittent switch/port issue and/or network congestion.
On the host thus we see configurations two or more ITL path sharing the same target/LUN going through two or more HBA ports. These HBA ports are connected to two or more SAN to the same target/LUN.
If the I/O fails at the multipath layer then, the ITL path is turned into Failed state. Because of the marginal nature of the network, the next Health Check command sent from multipath layer might succeed, which results in making the ITL path into Active state. You end up seeing the DM path state going into Active, Failed, Active transitions. This results in overall reduction in application I/O throughput and sometime application I/O failures (because of timing constraints). All this can happen because of I/O retries and I/O request moving across multiple paths of the DM device. In the host it is to be noted all I/O retries on a single path and I/O movement across multiple paths results in slowing down the forward progress of new application I/O. Reason behind, the above I/O re-queue actions are given higher priority than the newer I/O requests coming from the application.The above condition of the ITL path is hence called “marginal”.
What we desire is for the DM to deterministically categorize a ITL Path as “marginal” and move all the pending I/Os from the marginal Path to an Active Path. This will help in meeting application I/O timing constraints. Also a capability to automatically re-instantiate the marginal path into Active once the marginal condition in the network is fixed.
Based on the above explanation I want to rename the names as
marginal_path_XXXXand this is irrespective of any storage network.Regards,
Muneendra.
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
PATCH v4 2/2 multipath-tools: discard san_path_err_XXX feature
In reply to Guan JunxiongEven the san_path_err_threshold , san_path_err_forget_rate and san_path_err_recovery_time is turned on, the detect sample interval of that path checkers is so big/coarse that it doesn't see what happens in the middle of the sample interval.
Now we have new method of detecting path state of IO erros especially for intermittent IO errors in the previous patch.
Therefore, discard the original commit "c3705a12b893cc302a89587c4d37".
--- libmultipath/config.c | 3 -- libmultipath/config.h | 9 ----- libmultipath/configure.c | 3 -- libmultipath/dict.c | 39 --------------------- libmultipath/propsel.c | 47 -------------------------- libmultipath/propsel.h | 3 -- libmultipath/structs.h | 7 ---- multipath/multipath.conf.5 | 57 ------------------------------- multipathd/main.c | 84 ---------------------------------------------- 9 files changed, 252 deletions(-)
libmultipath/config.c +0 -3
@@ -351,9 +351,6 @@ merge_hwe (struct hwentry * dst, struct hwentry * src)merge_num (delay_wait_checks);merge_num (skip_kpartx);merge_num (max_sectors_kb); -merge_num (san_path_err_threshold); -merge_num (san_path_err_forget_rate); -merge_num (san_path_err_recovery_time);snprintf (id,sizeof (id),"%s/%s" , dst->vendor, dst->product); reconcile_features_with_options(id, &dst->features,
libmultipath/config.h +0 -9
@@ -72,9 +72,6 @@ struct hwentry {int deferred_remove;int delay_watch_checks;int delay_wait_checks; -int san_path_err_threshold; -int san_path_err_forget_rate; -int san_path_err_recovery_time;int path_io_err_sample_time;int path_io_err_rate_threshold;int path_io_err_recovery_time;
@@ -106,9 +103,6 @@ struct mpentry {int deferred_remove;int delay_watch_checks;int delay_wait_checks; -int san_path_err_threshold; -int san_path_err_forget_rate; -int san_path_err_recovery_time;int path_io_err_sample_time;int path_io_err_rate_threshold;int path_io_err_recovery_time;
@@ -158,9 +152,6 @@ struct config {int processed_main_config;int delay_watch_checks;int delay_wait_checks; -int san_path_err_threshold; -int san_path_err_forget_rate; -int san_path_err_recovery_time;int path_io_err_sample_time;int path_io_err_rate_threshold;int path_io_err_recovery_time;
libmultipath/configure.c +0 -3
@@ -295,9 +295,6 @@ int setup_map(struct multipath *mpp, char *params, int params_size)select_deferred_remove (conf, mpp);select_delay_watch_checks (conf, mpp);select_delay_wait_checks (conf, mpp); -select_san_path_err_threshold (conf, mpp); -select_san_path_err_forget_rate (conf, mpp); -select_san_path_err_recovery_time (conf, mpp);select_path_io_err_sample_time (conf, mpp);select_path_io_err_rate_threshold (conf, mpp);select_path_io_err_recovery_time (conf, mpp);
libmultipath/dict.c +0 -39
@@ -1081,33 +1081,6 @@ declare_hw_handler(delay_wait_checks, set_off_int_undef) declare_hw_snprint(delay_wait_checks, print_off_int_undef) declare_mp_handler(delay_wait_checks, set_off_int_undef) declare_mp_snprint(delay_wait_checks, print_off_int_undef) -declare_def_handler(san_path_err_threshold, set_off_int_undef) -declare_def_snprint_defint (san_path_err_threshold, print_off_int_undef, - DEFAULT_ERR_CHECKS) -declare_ovr_handler(san_path_err_threshold, set_off_int_undef) -declare_ovr_snprint(san_path_err_threshold, print_off_int_undef) -declare_hw_handler(san_path_err_threshold, set_off_int_undef) -declare_hw_snprint(san_path_err_threshold, print_off_int_undef) -declare_mp_handler(san_path_err_threshold, set_off_int_undef) -declare_mp_snprint(san_path_err_threshold, print_off_int_undef) -declare_def_handler(san_path_err_forget_rate, set_off_int_undef) -declare_def_snprint_defint (san_path_err_forget_rate, print_off_int_undef, - DEFAULT_ERR_CHECKS) -declare_ovr_handler(san_path_err_forget_rate, set_off_int_undef) -declare_ovr_snprint(san_path_err_forget_rate, print_off_int_undef) -declare_hw_handler(san_path_err_forget_rate, set_off_int_undef) -declare_hw_snprint(san_path_err_forget_rate, print_off_int_undef) -declare_mp_handler(san_path_err_forget_rate, set_off_int_undef) -declare_mp_snprint(san_path_err_forget_rate, print_off_int_undef) -declare_def_handler(san_path_err_recovery_time, set_off_int_undef) -declare_def_snprint_defint (san_path_err_recovery_time, print_off_int_undef, - DEFAULT_ERR_CHECKS) -declare_ovr_handler(san_path_err_recovery_time, set_off_int_undef) -declare_ovr_snprint(san_path_err_recovery_time, print_off_int_undef) -declare_hw_handler(san_path_err_recovery_time, set_off_int_undef) -declare_hw_snprint(san_path_err_recovery_time, print_off_int_undef) -declare_mp_handler(san_path_err_recovery_time, set_off_int_undef) -declare_mp_snprint(san_path_err_recovery_time, print_off_int_undef) declare_def_handler(path_io_err_sample_time, set_off_int_undef)declare_def_snprint_defint (path_io_err_sample_time, print_off_int_undef,DEFAULT_ERR_CHECKS )
@@ -1469,9 +1442,6 @@ init_keywords(vector keywords)install_keyword ("config_dir" , &def_config_dir_handler, &snprint_def_config_dir);install_keyword ("delay_watch_checks" , &def_delay_watch_checks_handler, &snprint_def_delay_watch_checks);install_keyword ("delay_wait_checks" , &def_delay_wait_checks_handler, &snprint_def_delay_wait_checks); -install_keyword ("san_path_err_threshold" , &def_san_path_err_threshold_handler, &snprint_def_san_path_err_threshold); -install_keyword ("san_path_err_forget_rate" , &def_san_path_err_forget_rate_handler, &snprint_def_san_path_err_forget_rate); -install_keyword ("san_path_err_recovery_time" , &def_san_path_err_recovery_time_handler, &snprint_def_san_path_err_recovery_time);install_keyword ("path_io_err_sample_time" , &def_path_io_err_sample_time_handler, &snprint_def_path_io_err_sample_time);install_keyword ("path_io_err_rate_threshold" , &def_path_io_err_rate_threshold_handler, &snprint_def_path_io_err_rate_threshold);install_keyword ("path_io_err_recovery_time" , &def_path_io_err_recovery_time_handler, &snprint_def_path_io_err_recovery_time);
@@ -1559,9 +1529,6 @@ init_keywords(vector keywords)install_keyword ("deferred_remove" , &hw_deferred_remove_handler, &snprint_hw_deferred_remove);install_keyword ("delay_watch_checks" , &hw_delay_watch_checks_handler, &snprint_hw_delay_watch_checks);install_keyword ("delay_wait_checks" , &hw_delay_wait_checks_handler, &snprint_hw_delay_wait_checks); -install_keyword ("san_path_err_threshold" , &hw_san_path_err_threshold_handler, &snprint_hw_san_path_err_threshold); -install_keyword ("san_path_err_forget_rate" , &hw_san_path_err_forget_rate_handler, &snprint_hw_san_path_err_forget_rate); -install_keyword ("san_path_err_recovery_time" , &hw_san_path_err_recovery_time_handler, &snprint_hw_san_path_err_recovery_time);install_keyword ("path_io_err_sample_time" , &hw_path_io_err_sample_time_handler, &snprint_hw_path_io_err_sample_time);install_keyword ("path_io_err_rate_threshold" , &hw_path_io_err_rate_threshold_handler, &snprint_hw_path_io_err_rate_threshold);install_keyword ("path_io_err_recovery_time" , &hw_path_io_err_recovery_time_handler, &snprint_hw_path_io_err_recovery_time);
@@ -1595,9 +1562,6 @@ init_keywords(vector keywords)install_keyword ("deferred_remove" , &ovr_deferred_remove_handler, &snprint_ovr_deferred_remove);install_keyword ("delay_watch_checks" , &ovr_delay_watch_checks_handler, &snprint_ovr_delay_watch_checks);install_keyword ("delay_wait_checks" , &ovr_delay_wait_checks_handler, &snprint_ovr_delay_wait_checks); -install_keyword ("san_path_err_threshold" , &ovr_san_path_err_threshold_handler, &snprint_ovr_san_path_err_threshold); -install_keyword ("san_path_err_forget_rate" , &ovr_san_path_err_forget_rate_handler, &snprint_ovr_san_path_err_forget_rate); -install_keyword ("san_path_err_recovery_time" , &ovr_san_path_err_recovery_time_handler, &snprint_ovr_san_path_err_recovery_time);install_keyword ("path_io_err_sample_time" , &ovr_path_io_err_sample_time_handler, &snprint_ovr_path_io_err_sample_time);install_keyword ("path_io_err_rate_threshold" , &ovr_path_io_err_rate_threshold_handler, &snprint_ovr_path_io_err_rate_threshold);install_keyword ("path_io_err_recovery_time" , &ovr_path_io_err_recovery_time_handler, &snprint_ovr_path_io_err_recovery_time);
@@ -1630,9 +1594,6 @@ init_keywords(vector keywords)install_keyword ("deferred_remove" , &mp_deferred_remove_handler, &snprint_mp_deferred_remove);install_keyword ("delay_watch_checks" , &mp_delay_watch_checks_handler, &snprint_mp_delay_watch_checks);install_keyword ("delay_wait_checks" , &mp_delay_wait_checks_handler, &snprint_mp_delay_wait_checks); -install_keyword ("san_path_err_threshold" , &mp_san_path_err_threshold_handler, &snprint_mp_san_path_err_threshold); -install_keyword ("san_path_err_forget_rate" , &mp_san_path_err_forget_rate_handler, &snprint_mp_san_path_err_forget_rate); -install_keyword ("san_path_err_recovery_time" , &mp_san_path_err_recovery_time_handler, &snprint_mp_san_path_err_recovery_time);install_keyword ("path_io_err_sample_time" , &mp_path_io_err_sample_time_handler, &snprint_mp_path_io_err_sample_time);install_keyword ("path_io_err_rate_threshold" , &mp_path_io_err_rate_threshold_handler, &snprint_mp_path_io_err_rate_threshold);install_keyword ("path_io_err_recovery_time" , &mp_path_io_err_recovery_time_handler, &snprint_mp_path_io_err_recovery_time);
libmultipath/propsel.c +0 -47
53 lines not on this page · raw message
libmultipath/propsel.h +0 -3
@@ -25,9 +25,6 @@ int select_delay_watch_checks (struct config *conf, struct multipath * mp);int select_delay_wait_checks (struct config *conf,struct multipath * mp);int select_skip_kpartx (struct config *conf,struct multipath * mp);int select_max_sectors_kb (struct config *conf,struct multipath * mp); -int select_san_path_err_forget_rate (struct config *conf,struct multipath *mp); -int select_san_path_err_threshold (struct config *conf,struct multipath *mp); -int select_san_path_err_recovery_time (struct config *conf,struct multipath *mp);int select_path_io_err_sample_time (struct config *conf,struct multipath *mp);int select_path_io_err_rate_threshold (struct config *conf,struct multipath *mp);int select_path_io_err_recovery_time (struct config *conf,struct multipath *mp);
libmultipath/structs.h +0 -7
@@ -231,10 +231,6 @@ struct path {int initialized;int retriggers;int wwid_changed; -unsigned int path_failures; -time_t dis_reinstate_time; -int disable_reinstate; -int san_path_err_forget_rate;time_t io_err_dis_reinstate_time;int io_err_disable_reinstate;int io_err_pathfail_cnt;
@@ -270,9 +266,6 @@ struct multipath {int deferred_remove;int delay_watch_checks;int delay_wait_checks; -int san_path_err_threshold; -int san_path_err_forget_rate; -int san_path_err_recovery_time;int path_io_err_sample_time;int path_io_err_rate_threshold;int path_io_err_recovery_time;
multipath/multipath.conf.5 +0 -57
81 lines not on this page · raw message
multipathd/main.c +0 -84
96 lines not on this page · raw message
Signature · 1 line
2.11.1