Path Isolation Method, Electronic Device, Storage Medium and Product

By acquiring and smoothing the read and write responses of the processing paths, determining and isolating paths with poor link quality, the problem of not being able to isolate the paths with poor link quality in the prior art is solved, and disk performance and system stability are improved.

CN120045142BActive Publication Date: 2025-07-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510521840.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-07-08
Estimated Expiration
2045-04-24

AI Technical Summary

Technical Problem

The prior art cannot effectively isolate paths with poor link quality but no read and write failures or timeouts, affecting disk performance.

Method used

By acquiring the read and write responses of multiple paths, the exponential moving average time is used to smooth the process, the target path with poor link quality is determined, and the path is isolated when the number of deviations exceeds the threshold value in the preset time window.

Benefits of technology

Isolation of paths with poor link quality but no read and write timeouts or failures is achieved, avoiding its negative impact on disk performance, and improving system stability and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045142B_ABST
    Figure CN120045142B_ABST
Patent Text Reader

Abstract

The present application discloses a path isolation method, an electronic device, a storage medium, and a product, relating to the technical field of network communication. The method includes obtaining a first time consumption of each path among multiple paths, where the first time consumption is used to indicate the read / write response time consumption of the path; determining a target path among the multiple paths based on the first time consumption of each path among the multiple paths; and isolating the target path in response to the number of first deviation times corresponding to the target path being greater than a preset deviation number within a first preset time window, solving the technical problem in the related solutions that a path with poor link quality cannot be isolated, and achieving the technical effect of isolating a path with poor link quality but without read / write timeout or read / write failure, and avoiding the influence of the path with poor quality on the disk performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technologies, and particularly to a path isolation method, an electronic device, a storage medium, and a product. Background Art

[0002] In related path isolation solutions, in the face of network congestion or poor link quality, paths that experience read / write timeouts or read / write failures are usually isolated. Although this method can effectively handle obvious fault situations, it cannot effectively isolate paths with poor link quality but without read / write failures or timeouts, thereby affecting disk performance. Summary of the Invention

[0003] This application provides a path isolation method, an electronic device, a storage medium, and a product to at least solve the problem in related technologies that paths with poor link quality but without read / write failures or timeouts cannot be effectively isolated, thereby affecting disk performance.

[0004] This application provides a path isolation method, including:

[0005] Obtaining a first time consumption of each path among multiple paths, where the first time consumption is used to indicate the read / write response time consumption of the path;

[0006] Determining a target path among the multiple paths based on the first time consumption of each path among the multiple paths;

[0007] Isolating the target path in response to the number of first deviation times corresponding to the target path being greater than a preset deviation number within a first preset time window.

[0008] This application further provides a path isolation device, including:

[0009] An obtaining unit, configured to obtain a first time consumption of each path among multiple paths, where the first time consumption is used to indicate the read / write response time consumption of the path;

[0010] A determining unit, configured to determine a target path among the multiple paths based on the first time consumption of each path among the multiple paths;

[0011] An isolating unit, configured to isolate the target path in response to the number of first deviation times corresponding to the target path being greater than a preset deviation number within a first preset time window.

[0012] This application further provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any one of the above path isolation methods when executing the computer program.

[0013] The present application also provides a computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the steps of any one of the above path isolation methods.

[0014] The present application also provides a computer program product including a computer program, where the computer program, when executed by a processor, implements the steps of any one of the above path isolation methods.

[0015] Through the present application, by obtaining the first time consumption of each path among multiple paths, where the first time consumption is used to indicate the read / write response time consumption of the path; based on the first time consumption of each path among the multiple paths, determining the target path among the multiple paths; and in response to the number of first deviation times corresponding to the target path being greater than the preset deviation times within the first preset time window, isolating the target path, the technical problem in the related solutions that a path with poor link quality cannot be isolated is solved, and the technical effect of isolating a path with poor link quality but without read / write timeout or read / write failure and avoiding the impact of the path with poor quality on the disk performance is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 It is a schematic flowchart of a path isolation method provided by an embodiment of the present application;

[0018] Figure 2 It is a schematic flowchart of a path isolation method provided by an embodiment of the present application;

[0019] Figure 3 It is a schematic flowchart of a path recovery method provided by an embodiment of the present application;

[0020] Figure 4 It is a schematic structural diagram of a path isolation device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.

[0022] It should be noted that in the description of this application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0023] The storage multi-path technology is a technology that, in a Storage Area Network (SAN) environment, improves the high availability, performance, and load balancing of data transmission by providing multiple physical paths between the server and the storage device. Among them, the storage area network refers to a separate data storage network formed by connecting several storage servers through a specific interconnection method. On the one hand, by providing multiple paths, the risk of storage inaccessibility due to a single-path failure is reduced, ensuring the continuity of critical business applications. On the other hand, the load balancing function can make full use of the bandwidth of all available paths, avoiding the performance bottleneck of a single path. The storage multi-path technology is widely used in storage environments that require high availability and high performance, such as bank core transaction systems, Enterprise Resource Planning (ERP) systems, data warehouses, and video stream storage.

[0024] Traditional multi-path software, in the face of network congestion and poor link quality, usually isolates paths according to the number of path failures within a period of time. When routing input / output (IO) in multi-path distribution, it preferentially selects non-isolated paths to undertake IO, and only in the case where no path is available, it selects isolated paths to undertake IO, where IO is used for data transmission operations such as data reading, writing, and other storage interactions.

[0025] In some cases where the link quality is poor, in some cases, the IO on the path will time out or fail, and in some cases, it will not time out or fail. Therefore, the traditional method cannot isolate paths with poor link quality but without IO timeout or IO failure, resulting in an impact on disk performance.

[0026] To solve the problems existing in the related solutions, an embodiment of the present application provides a path isolation method, including: obtaining the first time consumption of each path among multiple paths, where the first time consumption is used to indicate the read-write response time consumption of the path; determining the target path among the multiple paths based on the first time consumption of each path among the multiple paths; in response to the number of first deviation times corresponding to the target path being greater than the preset deviation times within the first preset time window, isolating the target path, which solves the technical problem in the related solutions that the path with poor link quality cannot be isolated, and achieves the technical effect of isolating the path with poor link quality but without read-write timeout or read-write failure, and avoiding the impact of the path with poor quality on disk performance.

[0027] A path isolation method provided by an embodiment of the present disclosure. This method can be executed by the IO completion routine interface module in a multipath drive device. The path isolation method provided by the embodiment of the present disclosure can be applied to fields such as SAN, ERP systems, data centers, and cloud computing services.

[0028] To enable those skilled in the art of the present technology to better understand the solution of the present application, the following further details the present application in conjunction with the accompanying drawings and specific embodiments.

[0029] Figure 1 It is a schematic flowchart of a path isolation method provided by an embodiment of the present disclosure.

[0030] As Figure 1 shown, the method includes the following steps:

[0031] Step 101, obtaining the first time consumption of each path among multiple paths, where the first time consumption is used to indicate the read-write response time consumption of the path;

[0032] In some embodiments, multiple paths generally refer to multiple physical connections or logical paths existing between a server and a multipath drive device. Specifically, these paths can be composed of different hardware components, network interfaces, or protocols to provide redundancy and load balancing functions, ensuring high availability and performance optimization.

[0033] In some embodiments, the read-write response time consumption refers to the time required from initiating a read or write request to the completion of the request and receiving the response. If the read-write response time consumption of a certain path is significantly higher than that of other paths, even if there is no obvious failure or timeout, it may indicate that there are potential problems with this path, such as network congestion and poor link quality.

[0034] In some embodiments, in order to more accurately reflect the performance of a path, methods such as exponentially weighted moving average (EWMA) latency can be used to smooth the read / write response latency, thereby obtaining a more stable performance metric, i.e., the first latency. The first latency is the exponentially weighted moving average latency, which is used to smooth and analyze time series data and is applicable to performance metrics for dynamic monitoring such as IO operation response time. By assigning higher weights to recent data, it can more sensitively reflect the latest change trend while retaining the influence of certain historical data.

[0035] In some embodiments, the first latency of each path among multiple paths can be obtained based on the completion latency, weight, etc. of the IO.

[0036] Step 102: Based on the first latency of each path among multiple paths, determine the target path among the multiple paths;

[0037] In some embodiments, based on the first latency of each path among multiple paths, it is determined whether the exponentially weighted moving average latency of one path is much greater than that of other paths. If there is a path whose exponentially weighted moving average latency is much greater than that of other paths, search for paths that are greater than the average value of the multiple paths and whose deviation is greater than a preset value, and use the paths that are greater than the average value of the multiple paths and whose deviation is greater than the preset value as the target path.

[0038] In some embodiments, the target path refers to a path with poor link quality that needs to be isolated.

[0039] In some embodiments, the number of target paths can be zero, one, or multiple, and no limitation is imposed on this. Among them, when the number of target paths is zero, it means that there is no path among the multiple paths that is greater than the average value of the multiple paths and whose deviation is greater than the preset value, that is, there is no path with poor link quality, so there is no need to perform the subsequent step of path isolation. If the number of target paths is one or more, it means that there are paths with poor link quality among the multiple paths, and further isolation is required to reduce the impact on the performance of the system disk.

[0040] In some embodiments, by calculating and comparing the exponentially weighted moving average latency of each path, paths with deteriorated performance can be dynamically detected and isolated to avoid their impact on the performance of the overall system.

[0041] Step 103: In response to the number of first deviation times corresponding to the target path within the first preset time window being greater than the preset deviation times, isolate the target path.

[0042] In some embodiments, the first preset time window refers to a preset time window for statistically analyzing the performance deviation of the target path, such as 60 seconds.

[0043] In some embodiments, the first deviation count refers to a high deviation count. The high deviation count refers to the number of times that, for the current path within a period of time, the deviation is greater than the average value of multiple paths and greater than a preset value.

[0044] In some embodiments, a path for which the first deviation count corresponding to the target path within the first preset time window is greater than the preset deviation count refers to a path in a multi-path drive device where the link quality is poor but no read / write timeout or read / write failure has occurred.

[0045] In some embodiments, by isolating the target path in response to the first deviation count corresponding to the target path within the first preset time window being greater than the preset deviation count, paths with poor link quality but no read / write timeout or read / write failure among multiple paths can be isolated, thereby avoiding the impact of poor-quality paths on disk performance.

[0046] Through the present application, by obtaining the first elapsed time of each path among multiple paths, where the first elapsed time is used to indicate the read / write response elapsed time of the path; based on the first elapsed time of each path among multiple paths, determining the target path among multiple paths; and isolating the target path in response to the first deviation count corresponding to the target path within the first preset time window being greater than the preset deviation count, the technical problem in related solutions of being unable to isolate paths with poor link quality is solved, and the technical effect of isolating paths with poor link quality but no read / write timeout or read / write failure and avoiding the impact of poor-quality paths on disk performance is achieved.

[0047] In some embodiments, obtaining the first elapsed time of each path among multiple paths includes:

[0048] Obtaining the second elapsed time and the third elapsed time of each path among multiple paths;

[0049] In some embodiments, the second elapsed time refers to the elapsed time for the current IO completion of the path, and specifically, the second elapsed time of the path can be determined by the time stamp when the IO response is received and the time stamp when the IO request is initiated.

[0050] In some embodiments, the third elapsed time refers to the exponentially weighted moving average elapsed time recorded last time, where the first recorded exponentially weighted moving average elapsed time is determined by the first IO completion elapsed time.

[0051] Based on the second elapsed time, determining the weight corresponding to the second elapsed time;

[0052] In some embodiments, the weight corresponding to the second elapsed time can be determined based on time window partitioning and weight assignment.

[0053] In some embodiments, if it is determined that the value of the smoothing factor is , whose value ranges from 0 to 1. One second can be divided into 1000 time windows, that is, each time window is 1 ms, and corresponding weight values are set within each 1 ms time window. The weight values are arranged from small to large as . According to the position where the IO completion time consumption falls into one of the 1000 time windows, the corresponding weight value is selected. For example, when the second time consumption is 900 ms, the weight value corresponding to the second time consumption is . Further, in this application, the size of the aforementioned time window and the number of time windows are not limited. For example, 1 second can also be divided into 100 time windows, or 2 seconds can be divided into 100 time windows.

[0054] Based on the second time consumption, the weight, and the third time consumption, determine the first time consumption of each path among multiple paths.

[0055] In some embodiments, the mathematical expression for determining the first time consumption of each path among multiple paths is as follows:

[0056] ;

[0057] Among them, refers to the first time consumption, that is, the current exponential moving average time consumption, refers to the weight value corresponding to the second time consumption, that is, the weight value corresponding to the current IO completion time consumption in the nth time window, refers to the third time consumption, that is, the previous exponential moving average time consumption, refers to the second time consumption, that is, the current IO completion time consumption. Among them, can be determined by , can be determined by , can be determined by the first IO completion time consumption.

[0058] In some embodiments, based on the second time consumption, determining the weight corresponding to the second time consumption includes:

[0059] Based on the second time consumption, determine the time window corresponding to the second time consumption. The time window is obtained by dividing the second preset time window;

[0060] In some embodiments, if the second time consumption is not greater than the maximum value of the time window, directly determine the time window corresponding to the second time consumption according to the second time consumption. If the second time consumption is greater than the maximum value of the time window, determine the maximum value of the time window as the time window corresponding to the second time consumption.

[0061] In some embodiments, with the value of the aforementioned smoothing factor being , whose value ranges from 0 to 1. One second can be divided into 1000 time windows, that is, each time window is 1 ms. Corresponding weight values are set within each 1-ms time window, and the weight values are arranged from small to large as , according to the position where the IO completion time falls into one of the 1000 time windows, select the corresponding weight value. For example, when the second time (the current IO completion time) is 900 ms, the corresponding time window for the second time is 900 ms. If the second time (the current IO completion time) is 1200 ms, the corresponding time window for the second time is 1 second.

[0062] Based on the time window corresponding to the second time, determine the weight corresponding to the second time from the mapping relationship between the time window and the weight.

[0063] In some embodiments, the mapping relationship between the time window and the weight can be in the form of a mapping table or in the form of a mapping array.

[0064] In some embodiments, as described above, when the second time is 900 ms, the corresponding time window for the second time is 900 ms, and the weight corresponding to the second time is , if the second time is 1200 ms, the corresponding time window for the second time is 1 second, and the weight corresponding to the second time is .

[0065] In some embodiments, determining the target path among multiple paths based on the first time of each path among the multiple paths includes:

[0066] Based on the first time of each path among the multiple paths, determine the average time of the multiple paths;

[0067] In some embodiments, the average time of the multiple paths can be obtained by adding up the first times of each path among the multiple paths and taking the average.

[0068] Based on the first time of each path among the multiple paths and the average time of the multiple paths, determine the first path among the multiple paths;

[0069] In some embodiments, compare the first time of each path among the multiple paths with the average time of the multiple paths respectively to obtain a set of paths whose first time among the multiple paths is greater than the average time of the multiple paths, and determine these paths as the first path. The first path is the path whose first time is greater than the average time.

[0070] In some embodiments, by comparing the exponentially weighted moving average times of different paths, those underperforming paths can be discovered and isolated in a timely manner, thereby protecting the stability and performance of the entire system.

[0071] Determine that the first path is the target path among multiple paths in response to the difference between the first time consumption of the first path and the average time consumption of the multiple paths being greater than a preset threshold value.

[0072] In some embodiments, the preset threshold value refers to a preset value used to measure a large deviation in path time consumption, and the specific value of the preset threshold value in this application is not limited.

[0073] In some embodiments, the target path is the path among multiple paths where the first time consumption is greater than the average value and the deviation between the first time consumption and the average time consumption is the largest.

[0074] In some embodiments, the target path can be one or more.

[0075] In some embodiments, by responding to the difference between the first time consumption of the first path and the average time consumption of the multiple paths being greater than the preset threshold value, the range of paths with poor link quality can be further narrowed down.

[0076] In some embodiments, in response to the first deviation count corresponding to the target path within the first preset time window being greater than the preset deviation count, before isolating the target path, the path isolation method further includes:

[0077] Obtain the first deviation count corresponding to the target path within the first preset time, where the first deviation count is used to indicate the number of times the first time consumption of the target path is higher than the first time consumption of other paths among the multiple paths;

[0078] In some embodiments, other paths refer to paths other than the target path among the multiple paths.

[0079] In some embodiments, after each IO operation is completed, compare the first time consumption of the target path and other paths. If the first time consumption of the target path is higher than the first time consumption of other paths, increase the first deviation count, that is, the high deviation count.

[0080] If the first deviation count corresponding to the target path within the first preset time is the first preset value, update the first deviation count corresponding to the target path and obtain the first timestamp corresponding to the target path, where the first timestamp is the timestamp when the target path first deviates.

[0081] In some embodiments, the first preset value refers to the first deviation count corresponding to the target path within the first preset time. The first preset value is usually zero, indicating that there is no situation where the first time consumption of the target path is much greater than the first time consumption of other paths within the first preset time.

[0082] In some embodiments, if the number of first deviations corresponding to the target path is zero within the first preset time, the number of times the target path has a deviation is incremented, and the timestamp corresponding to the first occurrence of a high deviation of the target path relative to other paths is obtained to obtain the first timestamp.

[0083] In some embodiments, after obtaining the number of first deviations corresponding to the target path within the first preset time, the path isolation method further includes:

[0084] If the number of first deviations corresponding to the target path within the first preset time is not the first preset value, then based on the current timestamp and the first timestamp, a first time difference is determined;

[0085] In some embodiments, the first preset value is zero. That the number of first deviations corresponding to the target path within the first preset time is not the first preset value indicates that there is a situation where the first time taken by the target path is much greater than the first time taken by other paths within the first preset time. At this time, the number of first deviations is a positive integer, representing the number of times that the first time taken by the target path is much greater than the first time taken by other paths within the first preset time.

[0086] In some embodiments, the first time difference is used to measure the duration of the high deviation of the target path relative to other paths.

[0087] If the first time difference is greater than the preset time window value, the number of first deviations corresponding to the target path is reset to the first preset value and the second timestamp corresponding to the target path is obtained;

[0088] In some embodiments, the preset time window value refers to a preset time window value for determining path quality.

[0089] In some embodiments, that the first time difference is greater than the preset time window value indicates that the time of the high deviation has exceeded the preset time window, and it is necessary to re-accumulate the number of first deviations corresponding to the target path.

[0090] In some embodiments, the second timestamp corresponding to the target path refers to the timestamp of the first occurrence of the first time taken by the target path being much greater than the first time taken by other paths after re-accumulating the number of first deviations corresponding to the target path.

[0091] If the first time difference is not greater than the preset time window value, the number of first deviations corresponding to the target path is updated.

[0092] In some embodiments, that the first time difference is not greater than the preset time window value indicates that it is currently still within the preset time window. Therefore, it is only necessary to continue incrementing the number of high deviations between the target path and other paths.

[0093] In some embodiments, in response to the number of first deviations corresponding to the target path within the first preset time window being greater than the preset number of deviations, isolating the target path includes:

[0094] In response to the number of first deviations corresponding to the target path within the first preset time window being greater than the preset number of deviations, obtain the number of second paths among multiple paths, where the second paths are available paths;

[0095] In response to the number of second paths not being the first preset value, isolate the target path.

[0096] In some embodiments, the preset number of deviations is a threshold for determining whether there are significant performance issues with the target path.

[0097] In some embodiments, the number of first deviations corresponding to the target path within the first preset time window being greater than the preset number of deviations indicates poor link quality of the target path, and it is necessary to further determine whether to isolate the target path in combination with the number of available paths.

[0098] In some embodiments, an available path refers to a path in the current system with a status of "available", specifically a path that is currently in a normal working state and can reliably transmit data.

[0099] In some embodiments, the first preset value is zero, and when the number of second paths is not zero, that is, when there are available paths, isolate the target path.

[0100] In some embodiments, if the number of second paths is zero, it means that the system does not have enough backup paths. In this case, directly isolating the target path may cause the system to completely lose the connection, thereby affecting the transmission of data between the server and the multipath drive device.

[0101] In some embodiments, isolating the target path means setting the target path to an unavailable state to prevent it from continuing to participate in the data transmission between the server and the multipath drive device.

[0102] In some embodiments, in response to the number of second paths not being the first preset value, after isolating the target path, the path isolation method further includes:

[0103] Determine the starting freeze time of the target path and send the isolation status of the target path to the target user in a preset manner.

[0104] In some embodiments, the starting freeze time is used to indicate the start time when the target path is marked as unavailable or in an isolated state. This time stamp can not only prevent repeated operations within a short period but also provide a basis for the recovery of the isolated path.

[0105] In some embodiments, the preset method may include sending message reminders such as emails or text messages, or may be in the form of instant messaging tool notifications, system logging, or visual dashboard updates. Specifically, information such as the isolation status of the target path and the start freeze time is sent to the target user via email; a short notification message is sent to the target user's mobile phone via text message; the status of the target path is updated on the monitoring or management dashboard of the system to visually display information such as its isolation status and start freeze time to the user.

[0106] In some embodiments, after determining the start freeze time of the target path and sending the isolation status of the target path to the target user according to the preset method, the path isolation method further includes:

[0107] Obtaining the abnormal time window ratio corresponding to the target path;

[0108] In some embodiments, the abnormal time window ratio refers to the proportion of the time when the target path is in an abnormal state within a certain time window.

[0109] In some embodiments, it is possible to decide whether to extend the freeze time of the target path according to the size of the abnormal time window ratio.

[0110] In response to the abnormal time window ratio corresponding to the target path being greater than the preset time window ratio, refreshing the freeze time of the target path and resetting the abnormal time window ratio corresponding to the target path;

[0111] In response to the abnormal time window ratio corresponding to the target path not being greater than the preset time window ratio, obtaining the number of available paths of the device corresponding to the target path.

[0112] In some embodiments, the preset time window ratio refers to a preset critical value used to decide whether to extend the freeze time of the target path.

[0113] In some embodiments, that the abnormal time window ratio corresponding to the target path is greater than the preset time window ratio indicates that the link quality of the target path is still very poor. In the case of having other available paths, it is necessary to continue freezing the target path.

[0114] In some embodiments, refreshing the freeze time of the target path means updating the start freeze time of the target path to the current time and restarting the calculation of the freeze period, thereby extending the isolation time of the target path and avoiding fluctuations in disk performance caused by its premature recovery; resetting the abnormal time window ratio corresponding to the target path means resetting the abnormal time window ratio of the target path to 0 and restarting the statistics of a new abnormal time window to ensure that subsequent monitoring is based on the latest time window data and avoid the influence of accumulated old data on decision-making.

[0115] In some embodiments, the ratio of the abnormal time window corresponding to the target path being not greater than the preset time window ratio indicates that although there are some problems with the performance of the target path during the current time period, it is not yet serious enough to significantly affect the system performance or stability. In other words, the abnormal situation of the target path is still within an acceptable range, and there is no need to immediately isolate the target path.

[0116] In some embodiments, the number of available paths of the device corresponding to the target path refers to the number of paths with the status of "available" among the multipath drive devices associated with the target path, so as to ensure that there are enough backup paths to take over the tasks of the target path and provide a basis for whether to restore the target path subsequently.

[0117] In some embodiments, obtaining the ratio of the abnormal time window corresponding to the target path includes:

[0118] Obtaining the first freezing time of the target path, where the first freezing time is used to indicate the time when the target path is in an isolated state;

[0119] In some embodiments, the first freezing time of the target path can be determined based on the current time and the aforementioned starting freezing time.

[0120] In response to the first freezing time of the target path being not greater than the preset freezing time, obtaining the fourth time consumption of the target path;

[0121] In some embodiments, the preset freezing time refers to the preset freezing time of the target path.

[0122] In some embodiments, the first freezing time of the target path being not greater than the preset freezing time indicates that the target path is still in a frozen state.

[0123] In some embodiments, the fourth time consumption of the target path refers to obtaining the IO completion time consumption through probing IO, and further determining the exponentially weighted moving average time consumption of the target path based on the IO completion time consumption.

[0124] In some embodiments, an isolation path recovery thread can be started to automatically recover the paths that meet the isolation recovery conditions through periodic probing.

[0125] Based on the fourth time consumption of the target path, determining the ratio of the abnormal time window corresponding to the target path.

[0126] In some embodiments, determining the ratio of the abnormal time window corresponding to the target path based on the fourth time consumption of the target path includes:

[0127] Based on the fourth time consumption of the target path, determining the number of abnormal time windows in which the fourth time consumption of the target path meets the preset conditions within the third preset time window;

[0128] In some embodiments, the abnormal time window may be a continuous time window in the third preset time window, or a discontinuous time window in the third preset time window. The third preset time window is a preset time window. The third preset time window may be 300ms.

[0129] In some embodiments, the preset condition refers to a time window in which the exponential moving average time consumed by the target path is much greater than the exponential moving average time consumed by other paths.

[0130] Based on the number of abnormal time windows and the total number of time windows included in the third preset time window, a ratio of abnormal time windows corresponding to the target path is determined.

[0131] In some embodiments, the abnormal time window ratio quantifies the degree of abnormality of the target path within the time window.

[0132] In some embodiments, in response to the abnormal time window ratio corresponding to the target path being not greater than the preset time window ratio, after obtaining the number of available paths of the device corresponding to the target path, the path isolation method further includes:

[0133] In response to the number of available paths being a first preset value, releasing isolation of the target path;

[0134] In some embodiments, the first preset value of zero indicates that the number of available paths of the multipath driver device associated with the target path is zero, and no available path needs to release the isolation of the target path to achieve data transmission between the server and the multipath driver device.

[0135] In response to the number of available paths not being equal to the first preset value, refreshing the freezing time of the target path and resetting the abnormal time window ratio corresponding to the target path.

[0136] In some embodiments, the number of available paths of the multipath driver device associated with the target path is not zero, and other available paths are preferentially used to implement data transmission between the server and the multipath driver device, so the target path can continue to be isolated.

[0137] In some embodiments, the steps of refreshing the freezing time of the target path and resetting the abnormal time window ratio corresponding to the target path are the same as those in the above embodiments, and are not described in detail here.

[0138] In some embodiments, by determining whether to continue isolating the target path based on the number of available paths, the fault tolerance and high availability of the multipath driver device can be improved. If a path is isolated, the system needs to ensure that the remaining available paths can take on the task of data transmission to avoid service interruption due to insufficient paths.

[0139] In some embodiments, Figure 2 As shown,Figure 2 This is a flowchart showing the process of a path isolation method provided by an embodiment of this application. Path X is the target path. Specifically, step 201: Calculate the time taken for the I / O of the current path X to complete; step 202: Obtain the exponentially weighted moving average coefficient weight value based on the I / O completion time; step 203: Calculate the current exponentially weighted moving average I / O time cur_resp_avg based on the last exponentially weighted moving average I / O time last_resp_avg of path X, the current I / O completion time, and the weight value; step 204: Obtain the exponentially weighted moving average I / O times of other available paths; step 205: Determine whether the exponentially weighted moving average time of path X is much greater than the exponentially weighted moving average times of other paths. If there is a situation where the exponentially weighted moving average time of path X is much greater than that of other paths, jump to step 206; otherwise, end. The specific method for determination is as follows: (a) Calculate the average of the exponentially weighted moving average times of all available paths; (b) Traverse the paths to find the path that is greater than the average and has the largest deviation from the average; (c) If path X is the path that is greater than the average and has the largest deviation from the average, determine whether the difference between the exponentially weighted moving average time of path X and the average of all paths is greater than a set threshold value; step 206: Determine whether the number of times of high deviation of the exponentially weighted moving average time between path X and other paths is 0. If the number of times of high deviation is 0, jump to step 207; otherwise, jump to step 209; step 207: Increment the number of times of high deviation of the exponentially weighted moving average time between path X and other paths path_high_resp_count; step 208: Record the start time value path_high_resp_start of the high response time deviation; step 209: Determine whether the difference between the current time and path_high_resp_start is greater than the set time window value. If it is greater than the set time window value, jump to step 210; otherwise, jump to step 212; step 210: Set the number of times of high deviation of the exponentially weighted moving average time between path X and other paths path_high_resp_count to 0; step 211: Record the start time value path_high_resp_start of the high response time deviation; step 212: Increment the number of times of high deviation of the exponentially weighted moving average time between path X and other paths path_high_resp_count; step 213: Determine whether path_high_resp_count is greater than the set threshold value of the number of times of high deviation. If it is greater than the set threshold value of the number of times of high deviation, jump to step 214; otherwise, end; step 214: Determine whether there are any available paths. If there are other available paths, jump to step 215; otherwise, end; step 215: Set the path status to the isolated state, set the start freezing time, send a message reminder such as an email or a text message to the user, and then end.

[0140] In some embodiments, such asFigure 3 as shown Figure 3 Figure 3 This is a flowchart showing a path recovery method provided by an embodiment of the present application. Step 301: Determine whether path X is in an isolated state; if it is in an isolated state, jump to step 302, otherwise end. Step 302: Determine whether the current time of path X has exceeded the set freeze time threshold; if it has exceeded the set freeze time threshold, jump to step 304, otherwise jump to step 303. Step 303: Send a probing IO and calculate the exponentially weighted moving average IO latency of path X; calculate the time window high_resp_percentage in the distributed time window where the exponentially weighted moving average latency of path X is much greater than that of other paths. Step 304: Determine whether high_resp_percentage exceeds the set performance threshold; if it exceeds the set performance threshold, jump to step 306, otherwise jump to step 305. Step 305: Determine whether the number of available paths of the multipath device to which path X belongs is greater than 0; if the number of available paths is greater than 0, jump to step 306, otherwise jump to step 307. Step 306: Refresh the freeze time of path X and reset high_resp_percentage. Step 307: Remove the isolation of path X.

[0141] With the present application, by obtaining the first latency of each path among multiple paths, where the first latency is used to indicate the read / write response latency of the path; based on the first latency of each path among multiple paths, determining the target path among the multiple paths; in response to the number of first deviation times corresponding to the target path in the first preset time window being greater than the preset deviation times, isolating the target path, the technical problem in the related solutions of being unable to isolate paths with poor link quality is solved, and the technical effect of isolating paths with poor link quality but without read / write timeouts or read / write failures is achieved, avoiding the impact of poor-quality paths on disk performance.

[0142] From the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.

[0143] An embodiment of the present application also provides a path isolation device 400, Figure 4 Figure 4 This is a schematic structural diagram of a path isolation device provided by an embodiment of the present disclosure. As Figure 4 shown, it includes:

[0144] An acquisition unit 401, configured to acquire the first latency of each path among multiple paths, where the first latency is used to indicate the read / write response latency of the path;

[0145] A determination unit 402, configured to determine the target path among the multiple paths based on the first latency of each path among the multiple paths;

[0146] An isolation unit 403, configured to isolate a target path in response to that the number of first deviations corresponding to the target path within a first preset time window is greater than a preset deviation number.

[0147] Through this application, by obtaining the first elapsed time of each path among multiple paths, where the first elapsed time is used to indicate the read / write response elapsed time of the path; based on the first elapsed time of each path among the multiple paths, determining the target path among the multiple paths; and in response to that the number of first deviations corresponding to the target path within a first preset time window is greater than a preset deviation number, isolating the target path, the technical problem in the related solutions that a path with poor link quality cannot be isolated is solved, and the technical effect of isolating a path with poor link quality but without read / write timeout or read / write failure and avoiding the impact of the path with poor quality on the disk performance is achieved.

[0148] Further, in a possible implementation manner of the embodiments of the present disclosure, the obtaining unit 401 is configured to:

[0149] Obtain the second elapsed time and the third elapsed time of each path among the multiple paths;

[0150] Based on the second elapsed time, determine the weight corresponding to the second elapsed time;

[0151] Based on the second elapsed time, the weight, and the third elapsed time, determine the first elapsed time of each path among the multiple paths.

[0152] Further, in a possible implementation manner of the embodiments of the present disclosure, the obtaining unit 401 is configured to:

[0153] Based on the second elapsed time, determine the time window corresponding to the second elapsed time, where the time window is obtained by dividing a second preset time window;

[0154] Based on the time window corresponding to the second elapsed time, determine the weight corresponding to the second elapsed time from the mapping relationship between the time window and the weight.

[0155] Further, in a possible implementation manner of the embodiments of the present disclosure, the determining unit 402 is configured to:

[0156] Based on the first elapsed time of each path among the multiple paths, determine the average elapsed time of the multiple paths;

[0157] Based on the first elapsed time of each path among the multiple paths and the average elapsed time of the multiple paths, determine the first path among the multiple paths;

[0158] In response to that the difference between the first elapsed time of the first path and the average elapsed time of the multiple paths is greater than a preset threshold, determine the first path as the target path among the multiple paths.

[0159] Further, in a possible implementation manner of the embodiments of the present disclosure, the path isolation device 400 further includes a first update unit, and the first update unit is configured to:

[0160] Obtain a first deviation count corresponding to a target path within a first preset time, where the first deviation count is used to indicate the number of times that the first time consumption of the target path is higher than that of other paths among multiple paths;

[0161] If the first deviation count corresponding to the target path within the first preset time is a first preset value, update the first deviation count corresponding to the target path and obtain a first timestamp corresponding to the target path, where the first timestamp is the timestamp when the target path first deviates.

[0162] Further, in a possible implementation manner of the embodiments of the present disclosure, the path isolation device 400 further includes a second update unit, and the second update unit is configured to:

[0163] If the first deviation count corresponding to the target path within the first preset time is not the first preset value, determine a first time difference based on the current timestamp and the first timestamp;

[0164] If the first time difference is greater than a preset time window value, reset the first deviation count corresponding to the target path to the first preset value and obtain a second timestamp corresponding to the target path;

[0165] If the first time difference is not greater than the preset time window value, update the first deviation count corresponding to the target path.

[0166] Further, in a possible implementation manner of the embodiments of the present disclosure, the isolation unit 403 is configured to:

[0167] In response to the first deviation count corresponding to the target path being greater than a preset deviation count within the first preset time window, obtain the number of second paths among multiple paths, where the second paths are available paths;

[0168] In response to the number of second paths not being the first preset value, isolate the target path.

[0169] Further, in a possible implementation manner of the embodiments of the present disclosure, the path isolation device 400 further includes a sending unit, and the sending unit is configured to:

[0170] Determine the starting freezing time of the target path and send the isolation state of the target path to the target user in a preset manner.

[0171] Further, in a possible implementation manner of the embodiments of the present disclosure, the path isolation device 400 further includes a path number obtaining unit, and the path number obtaining unit is configured to:

[0172] Get the abnormal time window ratio corresponding to the target path;

[0173] In response to the abnormal time window ratio corresponding to the target path being greater than the preset time window ratio, refreshing the freezing time of the target path and resetting the abnormal time window ratio corresponding to the target path;

[0174] In response to the abnormal time window ratio corresponding to the target path being not greater than the preset time window ratio, the number of available paths of the device corresponding to the target path is acquired.

[0175] Furthermore, in a possible implementation of the embodiment of the present disclosure, the path quantity acquisition unit is further configured to:

[0176] Obtaining a first freezing time of the target path, where the first freezing time is used to indicate a time during which the target path is in an isolated state;

[0177] In response to the first freezing time of the target path being not greater than the preset freezing time, acquiring a fourth time consumption of the target path;

[0178] Based on the fourth time consumption of the target path, the abnormal time window ratio corresponding to the target path is determined.

[0179] Furthermore, in a possible implementation of the embodiment of the present disclosure, the path quantity acquisition unit is further configured to:

[0180] Based on the fourth time consumption of the target path, determine the number of abnormal time windows in which the fourth time consumption of the target path meets the preset condition within the third preset time window;

[0181] Based on the number of abnormal time windows and the total number of time windows included in the third preset time window, a ratio of abnormal time windows corresponding to the target path is determined.

[0182] Furthermore, in a possible implementation of the embodiment of the present disclosure, the path isolation device 400 further includes a refresh unit, and the refresh unit is used to:

[0183] In response to the number of available paths being a first preset value, releasing isolation of the target path;

[0184] In response to the number of available paths not being equal to the first preset value, refreshing the freezing time of the target path and resetting the abnormal time window ratio corresponding to the target path.

[0185] The description of the features in the embodiment corresponding to the path isolation device can refer to the relevant description of the embodiment corresponding to the path isolation method, and will not be repeated here.

[0186] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above-mentioned path isolation method embodiments.

[0187] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, where the computer program is configured to execute the steps in any of the above-described path isolation method embodiments when running.

[0188] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memories (ROM), random access memories (RAM), external hard drives, magnetic disks, or optical discs that can store computer programs.

[0189] An embodiment of the present application further provides a computer program product, where the computer program product includes a computer program that implements the steps in any of the above-described path isolation method embodiments when executed by a processor.

[0190] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium storing a computer program that implements the steps in any of the above-described path isolation method embodiments when executed by a processor.

[0191] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present application.

[0192] The above has introduced in detail a path isolation method, an electronic device, a storage medium, and a product provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A path isolation method, characterized in that, Including: Obtain the first time consumption of each path among multiple paths, where the first time consumption is used to indicate the read and write response time consumption of the path; Based on the first time consumption of each path among the multiple paths, determine the target path among the multiple paths; In response to the number of first deviations corresponding to the target path being greater than the preset number of deviations within a first preset time window, isolate the target path; wherein, the first preset time window is a preset time interval for statistically analyzing the performance deviation of the target path; Wherein, before the step of isolating the target path in response to the number of first deviations corresponding to the target path being greater than the preset number of deviations within a first preset time window, the method further includes: Obtain the number of first deviations corresponding to the target path within a first preset time, where the number of first deviations is used to indicate the number of times that the first time consumption of the target path is higher than the first time consumption of other paths among the multiple paths; If the number of first deviations corresponding to the target path within the first preset time is a first preset value, update the number of first deviations corresponding to the target path and obtain the first timestamp corresponding to the target path, where the first timestamp is the timestamp when the target path first deviates.

2. The path isolation method according to claim 1, wherein The step of obtaining the first time consumption of each path among the multiple paths includes: Obtain the second time consumption and the third time consumption of each path among the multiple paths; Based on the second time consumption, determine the weight corresponding to the second time consumption; wherein, the second time consumption refers to the input / output IO completion time consumption of the path this time; Based on the second time consumption, the weight, and the third time consumption, determine the first time consumption of each path among the multiple paths; wherein, the third time consumption refers to the exponentially weighted moving average time consumption of the path recorded last time.

3. The path isolation method according to claim 2, wherein The step of determining the weight corresponding to the second time consumption based on the second time consumption includes: Based on the second time consumption, determine the time window corresponding to the second time consumption, where the time window is obtained by splitting a second preset time window; Based on the time window corresponding to the second time consumption, determine the weight corresponding to the second time consumption from the mapping relationship between the time window and the weight.

4. The path isolation method according to claim 1, wherein The step of determining the target path among the multiple paths based on the first time consumption of each path among the multiple paths includes: Based on the first time consumption of each path among the multiple paths, determine the average time consumption of the multiple paths; Based on the first time consumption of each path among the multiple paths and the average time consumption of the multiple paths, determine the first path among the multiple paths; In response to the difference between the first time consumption of the first path and the average time consumption of the multiple paths being greater than a preset threshold, determine the first path as the target path among the multiple paths.

5. The path isolation method according to claim 1, wherein After the step of obtaining the number of first deviations corresponding to the target path within a first preset time, the method further includes: If the number of first deviations corresponding to the target path within the first preset time is not the first preset value, determine the first time difference based on the current timestamp and the first timestamp; If the first time difference is greater than a preset time window value, reset the first deviation count corresponding to the target path to a first preset value and obtain the second timestamp corresponding to the target path; wherein, the second timestamp refers to the timestamp when, after re-accumulating the first deviation count corresponding to the target path, the first time taken by the target path is much greater than the first time taken by other paths for the first time. If the first time difference is not greater than the preset time window value, update the first deviation count corresponding to the target path.

6. The path isolation method according to claim 1, wherein The isolating the target path in response to the first deviation count corresponding to the target path being greater than a preset deviation count within a first preset time window includes: In response to the first deviation count corresponding to the target path being greater than a preset deviation count within a first preset time window, obtain the number of second paths among the multiple paths, where the second paths are available paths. In response to the number of the second paths not being a first preset value, isolate the target path.

7. The path isolation method according to claim 6, wherein After isolating the target path in response to the number of the second paths not being a first preset value, the method further includes: Determine the starting freezing time of the target path and send the isolation status of the target path to the target user in a preset manner.

8. The path isolation method according to claim 7, wherein After determining the starting freezing time of the target path and sending the isolation status of the target path to the target user in a preset manner, the method further includes: Obtain the abnormal time window ratio corresponding to the target path. In response to the abnormal time window ratio corresponding to the target path being greater than a preset time window ratio, refresh the freezing time of the target path and reset the abnormal time window ratio corresponding to the target path; wherein, the abnormal time window ratio refers to the proportion of the time when the target path is in an abnormal state within a certain time window. In response to the abnormal time window ratio corresponding to the target path not being greater than the preset time window ratio, obtain the number of available paths of the device corresponding to the target path.

9. The path isolation method according to claim 8, wherein, The obtaining the abnormal time window ratio corresponding to the target path includes: Obtain the first freezing time of the target path, where the first freezing time is used to indicate the time when the target path is in an isolated state. In response to the first freezing time of the target path not being greater than a preset freezing time, obtain the fourth time taken by the target path; wherein, the fourth time taken refers to the time taken to complete the IO obtained by detecting the IO and further determining the exponentially weighted moving average time taken by the target path based on the time taken to complete the IO. Based on the fourth time taken by the target path, determine the abnormal time window ratio corresponding to the target path.

10. The path isolation method according to claim 9, wherein, The determining the abnormal time window ratio corresponding to the target path based on the fourth time taken by the target path includes: Based on the fourth time taken by the target path, determine the number of abnormal time windows in which the fourth time taken by the target path meets a preset condition within a third preset time window. Based on the number of abnormal time windows and the total number of time windows included in the third preset time window, determine the abnormal time window ratio corresponding to the target path.

11. The path isolation method according to claim 8, wherein After acquiring the number of available paths of the device corresponding to the target path in response to the abnormal time window ratio corresponding to the target path being not greater than the preset time window ratio, the method further includes: In response to the number of available paths being a first preset value, releasing isolation of the target path; In response to the number of available paths not being equal to a first preset value, refreshing the freezing time of the target path and resetting the abnormal time window ratio corresponding to the target path.

12. An electronic device, characterized in that, include: Memory for storing computer programs; A processor, configured to implement the steps of the path isolation method as claimed in any one of claims 1 to 11 when executing the computer program.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the path isolation method according to any one of claims 1 to 11.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the path isolation method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Read-write link control method and device, and medium

    CN116820822A

  • Path fault isolation processing method and device for multi-path software

    CN117221090A