Storage IO request processing method and apparatus, electronic device, and medium
By dynamically allocating the logical units and paths of the storage system on the host side, the problem of not being able to effectively control the impact of physical links between LUNs in the storage system is solved, and dynamic balance of storage performance and efficient IO request processing is achieved.
Patent Information
- Application Number
- PCT/CN2024/095561
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-24
- Filing Date
- 2024-05-27
- Publication Date
- 2025-07-31
AI Technical Summary
The existing storage system cannot effectively control the impact of physical links between different LUNs on the host in the SAN environment, and the Qos policy cannot be dynamically adjusted, resulting in large differences in storage performance and host application performance and poor applicability.
The logical units mapped by the storage system are assigned to high-priority groups and low-priority groups on the host side, and the paths between the host and the storage system are assigned to exclusive path groups and shared path groups. By dynamically adjusting the path selection to prioritize the IO requests of the high-priority groups, the IO traffic limits of the low-priority groups are adjusted step by step to achieve dynamic performance equalization.
It significantly improves the IO request processing efficiency of high-priority groups, ensures normal service use of low-priority groups, and realizes dynamic balance and adaptability of storage service quality.
Smart Images

Figure CN2024095561_31072025_PF_FP_ABST
Abstract
Description
Storage IO request processing method, device, electronic device and medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on January 24, 2024, with application number 202410096812.4 and application name “Storage IO Request Processing Method, Device, Electronic Device and Medium”, all contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of storage technology, and in particular to a storage IO request processing method, device, electronic device, and medium. Background Art
[0004] In a SAN (Storage Area Network) environment, a storage system provides storage services to host applications by mapping LUNs (Logical Unit Numbers) to hosts. Hosts often have different business applications, each with varying importance and requiring different storage performance. As shown in Figure 1, current storage systems can guarantee the quality of storage services through QoS (Quality of Service) policies. This involves limiting and guaranteeing the performance of different LUNs within the storage system to ensure the performance of LUNs used by critical applications.
[0005] However, the way QoS policies are applied in storage systems has the following flaws: First, the storage system can only limit or guarantee the performance of the LUNs on the storage. However, the read and write requests applied on the host ultimately reach the LUNs in the storage system, and in the middle, they also go through multiple links such as the host's HBA (Host Bus Adapter) card and the switch. Therefore, there will be a certain difference between the actual performance of the host business application and the performance seen in the storage system. Second, the storage system can only limit and guarantee performance by LUN. Different LUNs on the same host actually reuse the same physical link, and the impact of the physical links between different LUNs cannot be controlled. Third, the QoS restrictions are usually static QoS threshold configurations, and the QoS thresholds cannot be dynamically adjusted according to the effect of the regulation. In scenarios with large business fluctuations, the applicability is poor.
[0006] Summary of the Invention
[0007] According to one aspect of the present application, the present application provides a storage IO request processing method for a host side, the method comprising:
[0008] Allocate the logical units mapped from the storage system to the host into a pre-set high-priority group and a low-priority group, wherein the application priorities corresponding to the logical units in the high-priority group are higher than the application priorities corresponding to the logical units in the low-priority group;
[0009] Allocate the paths between the host and the storage system to pre-set exclusive path groups and shared path groups, wherein each of the exclusive path group and the shared path group includes at least one path;
[0010] In response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the high priority group, selecting a path with the smallest load from the exclusive path group and the shared path group to issue the storage IO request; or
[0011] In response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the low priority group, a path with the smallest load is selected from the shared path group to issue the storage IO request.
[0012] In some possible implementations, the method further includes:
[0013] Perform IO performance testing on each member of the high-priority group;
[0014] Determine whether the high priority group can reach a first preset IO performance state based on the IO performance detection result;
[0015] In response to determining that the high priority group cannot reach the first preset IO performance state, performing step-by-step enhanced IO flow restrictions on members in the low priority group; and
[0016] In the case of completing each enhanced IO flow limit, after waiting for the first preset time, the process returns to the step of performing IO performance detection on each member of the high priority group until the low priority group reaches the preset maximum IO flow limit.
[0017] In some possible implementations, the method further includes:
[0018] In response to determining that the high priority group can reach the first preset IO performance state, determining whether the high priority group can reach the second preset IO performance state based on the IO performance detection result, wherein the IO load pressure of the high priority group in the second preset IO performance state is less than the IO load pressure of the high priority group in the second preset IO performance state;
[0019] In response to determining that the high priority group can reach the second preset IO performance state, gradually weakening the IO flow restrictions on members in the low priority group; and
[0020] In the case of each time the IO flow restriction is weakened, the process returns to the step of performing IO performance detection on each member of the high priority group after waiting for the first preset time, until the low priority group has no IO flow restriction.
[0021] In some possible implementations, the method further includes:
[0022] Perform IO performance testing on each member of the high-priority group;
[0023] Determining whether the high priority group can reach a first preset IO performance state based on the IO performance detection result; and
[0024] In response to determining that the high priority group cannot reach the first preset IO performance state, a preset number of paths are moved from the shared path group to the exclusive path group each time, and the step of performing IO performance detection on each member of the high priority group is returned until the shared path group has only one path.
[0025] In some possible implementations, the method further includes:
[0026] In response to determining that the high priority group can reach the first preset IO performance state, determining whether the high priority group can reach the second preset IO performance state based on the IO performance detection result, wherein the IO load pressure of the high priority group in the second preset IO performance state is less than the IO load pressure of the high priority group in the second preset IO performance state; and
[0027] In response to determining that the high priority group can reach the second preset IO performance state, a preset number of paths are moved from the exclusive path group to the shared path group each time until the number of paths in the shared path group is restored to the number before the movement.
[0028] In some possible implementations, the IO performance test is performed on each member of the high-priority group, including:
[0029] Selecting a member from the high-priority group as the target member in a traversal manner; and
[0030] Get the average IO latency of each target member per unit time.
[0031] In some possible implementations, determining whether the high-priority group can reach the first preset IO performance state based on the IO performance detection result includes:
[0032] Compare the average IO latency of each target member with the first preset IO latency;
[0033] Record the number of first members whose average IO latency exceeds the first preset IO latency;
[0034] Calculating a ratio of the number of first members to the total number of members in the high priority group to obtain a first ratio;
[0035] In response to determining that the first ratio does not exceed a first predetermined ratio, confirming that the high priority group can achieve a first predetermined IO performance state; or
[0036] In response to determining that the first ratio exceeds the first predetermined ratio, it is determined that the high priority group cannot reach the first predetermined IO performance state.
[0037] In some possible implementations, determining whether the high-priority group can reach the second preset IO performance state based on the IO performance detection result includes:
[0038] In response to determining that the average IO latency of all members of the high priority group does not exceed the first preset IO latency, comparing the average IO latency of each target member with a second preset IO latency, wherein the second preset IO latency is less than the first preset IO latency;
[0039] Record the number of second members whose average IO latency exceeds the second preset IO latency;
[0040] Calculating a ratio of the number of second members to the total number of members in the high-priority group to obtain a second ratio;
[0041] In response to determining that the second ratio does not exceed a second predetermined ratio, confirming that the high priority group can achieve a second predetermined IO performance state; or
[0042] In response to determining that the second ratio exceeds a second predetermined ratio, it is determined that the high priority group cannot reach a second predetermined IO performance state.
[0043] In some possible implementations, the method further includes:
[0044] Start a one-second counter to count each storage IO request to be issued;
[0045] Determine whether there is IO traffic restriction for the low priority group;
[0046] In response to determining that there is no IO traffic restriction for the low priority group, allowing the step of selecting the path with the least load from the shared path group to issue the storage IO request;
[0047] In response to determining that the low priority group has an IO flow restriction, determining whether a current counter value exceeds a restricted number of IO requests;
[0048] In response to determining that the current counter value exceeds the limit on the number of IO requests, blocking the storage IO request for a second preset time and then returning to the step of determining whether there is an IO flow limit for the low priority group; or
[0049] In response to determining that the current counter value does not exceed the limit on the number of IO requests, the step of selecting a path with the smallest load from the shared path group to issue the storage IO request is allowed to be executed.
[0050] In some possible implementations, the IO traffic restrictions for members in the low-priority group are gradually enhanced, including:
[0051] In response to determining that the number of limited IO requests does not exceed a preset minimum IOPS (Input / Output Operations Per Second, read and write operations per second) value, confirming that the low priority group has reached a preset maximum IO flow limit;
[0052] In response to determining that the limited number of IO requests exceeds a preset minimum IOPS value, incrementing the current limit level by one so that the IOPS value of each member in the low priority group decreases year-on-year, and recalculating the limited number of IO requests, wherein the initial value of the limit level is zero; and
[0053] In response to determining that the recalculated limited IO request number does not exceed the preset minimum IOPS value, the limited IO request number is set equal to the preset minimum IOPS value, and it is confirmed that the low priority group reaches the preset maximum IO flow limit.
[0054] In some possible implementations, in response to determining to gradually enhance the IO flow limit, the number of IO requests to be limited is calculated according to the following formula 1:
[0055] IOLimit indicates the limit on the number of IO requests, n indicates the number of logical units included in the low-priority group, IOPS(i) indicates the IOPS value of each logical unit in the most recent unit time period, and Ratio indicates the preset adjustment ratio.
[0056] In some possible implementations, determining whether the low-priority group has I / O traffic restrictions includes:
[0057] Determine whether the current restriction levels are all zero;
[0058] In response to determining that the current restriction levels are all zero, confirming that no IO flow restriction exists for the low priority group; or
[0059] In response to determining that the current restriction levels are not all zero, it is confirmed that the IO traffic restriction exists for the low priority group.
[0060] In some possible implementations, the IO traffic restrictions for members in the low-priority group are gradually weakened, including:
[0061] Determine whether the current restriction level is equal to zero;
[0062] In response to determining that the current restriction level is equal to zero, confirming that the low priority group currently has no IO flow restriction;
[0063] In response to determining that the current limit level is not equal to zero, the current limit level is reduced by one so that the IOPS value of each member in the low priority group increases year-on-year, and the limit on the number of IO requests is recalculated; or
[0064] In response to determining that the current restriction level minus one equals zero, it is confirmed that the low priority group has no IO traffic restriction.
[0065] In some possible implementations, in response to determining to gradually weaken the IO traffic restriction, the number of IO requests to be restricted is calculated according to the following formula 2:
[0066] IOLimit(n)=IOLimit(n+1) / Ratio Formula 2;
[0067] Among them, IOLimit(n) represents the limited number of IO requests when the level limit is n, IOLimi(n+1) represents the limited number of IO requests when the level limit is n+1, and Ratio represents the preset adjustment ratio.
[0068] In some possible implementations, the method further includes:
[0069] In response to determining that the low priority group reaches a preset maximum IO flow limit and the high priority group still does not reach a first preset IO performance state, the number of paths in the exclusive path group and the shared path group is readjusted, and the step of performing IO performance detection on each member of the high priority group is returned.
[0070] In some possible implementations, the number of paths in the exclusive path group and the shared path group is readjusted, including:
[0071] Clear the IOPS limit for the low priority group;
[0072] Calculate the total IOPS of all members in the high-priority group and obtain the first sum value;
[0073] Calculate the sum of the IOPS of all members in the high-priority group and all members in the low-priority group to obtain the second sum value;
[0074] Calculate the ratio of the first sum value to the second sum value to obtain a third ratio;
[0075] calculating a first product of the third ratio and the total number of paths, and updating the number of paths in the exclusive path group using the first product; and
[0076] The difference between the total number of paths and the first product is calculated and used to update the number of paths in the shared path group.
[0077] In some possible implementations, before the step of gradually reducing the IO traffic restrictions on members in the low-priority group, the method further includes:
[0078] Determine whether the exclusive path group and shared path group have been readjusted;
[0079] In response to determining that the exclusive path group and the shared path group have been readjusted, clearing the IOPS limit of the low priority group; and
[0080] The number of paths in the exclusive path group and the shared path group is restored to the number before readjustment, and the step of performing I / O performance testing on each member of the high-priority group is returned.
[0081] In some possible implementations, paths between a host and a storage system are assigned to pre-configured exclusive path groups and shared path groups, including:
[0082] Get the total number of members of the high priority group and get the total number of first members;
[0083] Obtain the total number of members of the high priority group and the low priority group to obtain the second total number of members;
[0084] calculating a ratio of the total number of the first members to the total number of the second members to obtain a fourth ratio;
[0085] calculating a second product of the fourth ratio and the total number of paths;
[0086] Selecting a group of paths whose number of paths is equal to the second product from all paths between the host and the storage system to obtain an exclusive path group; and
[0087] The remaining paths are grouped together to obtain a shared path group.
[0088] According to another aspect of the present application, the present application further provides a storage IO request processing device, the device comprising:
[0089] A first allocation module is configured to allocate logical units mapped from the storage system to the host into two groups, obtaining a high-priority group and a low-priority group, wherein application priorities corresponding to logical units belonging to the high-priority group are higher than application priorities corresponding to logical units belonging to the low-priority group;
[0090] a second allocation module, configured to allocate paths between the host and the storage system into two groups, obtaining an exclusive path group and a shared path group, wherein each of the exclusive path group and the shared path group includes at least one path;
[0091] a first path selection module configured to, in response to determining that a target logical unit corresponding to the storage IO request to be issued belongs to a high priority group, select a path with the smallest load from the exclusive path group and the shared path group to issue the storage IO request; or
[0092] The second path selection module is configured to, in response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the low priority group, select a path with the smallest load from the shared path group to issue the storage IO request.
[0093] According to another aspect of the present application, the present application also provides an electronic device, comprising: one or more processors; and a memory associated with the one or more processors, the memory being used to store computer-readable instructions, which, when read and executed by the one or more processors, implement any of the above-mentioned storage IO request processing methods.
[0094] According to another aspect of the present application, the present application also provides a non-transitory computer-readable storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, any of the above-mentioned storage IO request processing methods is implemented.
[0095] The present application provides a storage IO request processing method that allocates logical units mapped to a storage system to a high-priority group and a low-priority group on the host side, and allocates paths between the host and the storage system to an exclusive path group and a shared path group. When a storage IO request to be issued is generated, if the target logical unit corresponding to the storage IO request belongs to the high-priority group, the optimal path can be selected from the exclusive path group and the shared path group to issue the request. If the target logical unit corresponding to the storage IO request belongs to the low-priority group, the optimal path can be selected from the shared path group to issue the request. BRIEF DESCRIPTION OF THE DRAWINGS
[0096] In order to more clearly illustrate the technical solutions in this application or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0097] FIG1 is a schematic diagram of a SAN network between a host and storage in the related art;
[0098] FIG2 is a flow chart of a method for processing storage IO requests provided by the present application;
[0099] FIG3 is a schematic diagram of the overall architecture of the storage IO request processing method provided by the present application;
[0100] FIG4 is a schematic diagram of the principle of dynamic path adjustment provided by the present application;
[0101] FIG5 is a schematic diagram of a flow chart of a high priority group IO performance test provided by the present application;
[0102] FIG6 is a flow chart of adjusting the flow of a low-priority group using the service pressure of a high-priority group provided by the present application;
[0103] FIG7 is a flowchart of gradually increasing and decreasing IO restrictions provided by the present application;
[0104] FIG8 is a flow chart of IO delivery processing provided by the present application;
[0105] FIG9 is a schematic structural diagram of a storage IO request processing device provided by the present application;
[0106] FIG10 is a schematic structural diagram of an electronic device provided by the present application;
[0107] FIG11 is a schematic diagram of the structure of a non-transitory computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0108] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0109] The following describes a storage IO (Input / Output) request processing method, a storage IO request processing device, an electronic device, and a non-transitory computer-readable storage medium of the present application in conjunction with Figures 2 to 10.
[0110] FIG2 is a flow chart of a storage IO request processing method provided in an embodiment of the present application. Referring to FIG2 , this embodiment provides a storage IO request processing method for a host side. The method may be implemented through steps S201 to S204. Each step will be described in detail below.
[0111] Step S201 : Allocate logical units mapped from the storage system to the host into pre-set high priority groups and low priority groups, wherein application priorities corresponding to logical units in the high priority group are higher than application priorities corresponding to logical units in the low priority group.
[0112] In this embodiment, the storage system maps multiple logical units to the host side. The storage system may include one storage device or multiple storage devices. For example, let's assume that there are two disks, each of which can map 256 logical units. In this case, the host side can recognize 512 logical units, and the corresponding objects that need to be grouped are 512 LUNs (Logical Unit Numbers). Each logical unit has a corresponding application. The priority of the application corresponding to the logical unit is used as the basis for grouping logical units. The logical unit corresponding to the application with a high application priority will be assigned to the high priority group, and the logical unit corresponding to the application with a low application priority will be assigned to the low priority group. The members of the high priority group and the low priority group are all logical units, but the difference is that they are composed of different logical units, that is, the same logical unit can only be assigned to one of the groups.
[0113] During implementation, a correspondence between logical units and applications can be established to identify the application corresponding to each logical unit, and then logical units can be grouped according to pre-set application levels. It should be noted that during implementation, application priorities are not limited to high and low; they can be divided into multiple levels from high to low. When converting application priorities to logical unit priorities, application priorities can be further allocated to multiple levels. For example, only the logical unit corresponding to the highest-level application can be assigned to the high-priority group, while the logical units corresponding to the remaining application levels can be assigned to the low-priority group.
[0114] For example, let's assume that LUN0 through LUN7 correspond to operating system applications, and LUN8 through LUN15 correspond to audio software applications. The operating system application has a higher priority than the audio software application. In this case, LUN0 through LUN7 are assigned to the high-priority group, and LUN8 through LUN15 are assigned to the low-priority group. This embodiment does not limit the application type, application level, or logical unit data corresponding to the logical unit. The values and applications listed in the above embodiment are for illustrative purposes only.
[0115] Step S202 : Allocate paths between the host and the storage system to pre-set exclusive path groups and shared path groups, wherein each of the exclusive path group and the shared path group includes at least one path.
[0116] In this embodiment, the path between the host and the storage system refers to the physical link through which the host accesses the storage device, such as all access paths from the host side through the HBA card, the switch, and then to the storage side. There are multiple paths between the host and the storage system, and these multiple paths are allocated to two groups. When allocating paths, the number of paths in the two groups can be determined based on the actual business scenario, or a relatively reasonable number can be pre-set based on some reference indicators. In addition, the number of paths in the two path groups can be determined based on the number of logical units in the high-priority group and the low-priority group respectively. The members of the exclusive path group and the shared path group are both paths, but the difference is that they are composed of different paths, that is, the same path can only be allocated to one of the groups.
[0117] For example, let's assume that the ratio of high-priority group members to low-priority group members is 2:3. There are fifty paths between the host and the storage system. Twenty of them can be assigned to a group as an exclusive path group, and the remaining thirty paths can be assigned to a group as a shared path group.
[0118] In some possible implementations, step S202, allocating paths between the host and the storage system to pre-set exclusive path groups and shared path groups, can be specifically implemented by the following steps:
[0119] Get the total number of members of the high priority group and get the total number of first members;
[0120] Obtain the total number of members of the high priority group and the low priority group to obtain the second total number of members;
[0121] calculating a ratio of the total number of the first members to the total number of the second members to obtain a fourth ratio;
[0122] calculating a second product of the fourth ratio and the total number of paths;
[0123] Selecting a group of paths whose number is equal to the second product from all paths between the host and the storage system to obtain an exclusive path group;
[0124] The remaining paths are grouped together to obtain a shared path group.
[0125] Step S203 : In response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the high priority group, a path with the smallest load is selected from the exclusive path group and the shared path group to issue the storage IO request.
[0126] In a specific implementation, a storage IO request will include the IO operation target when it is generated. For example, if the storage IO request is to read data from LUN0, then LUN0 is the logical unit for the IO request. For example, if the storage IO request is to write data to LUN1, then LUN0 is the target logical unit for the IO request. In a specific implementation, the target logical unit can be determined by analyzing the LUN identifier in the IO request. In this embodiment, for logical units belonging to the high-priority group, all paths between the storage and the host can be used, and the path ultimately selected is the path with the lowest load among all paths.
[0127] Step S204 : In response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the low priority group, a path with the smallest load is selected from the shared path group to issue the storage IO request.
[0128] The difference from step S203 is that step S204 is aimed at IO requests of low-priority group members. For such requests, only paths are selected from the shared path group when selecting paths. For example, assuming that there are a total of fifty paths between the host and the storage, twenty of which belong to the exclusive path group and thirty paths belong to the shared priority group, the IO requests of low-priority group members need to be sent from the thirty paths with the smallest load.
[0129] The storage IO request processing method of this embodiment allocates the logical units mapped by the storage system to a high-priority group and a low-priority group on the host side, and allocates the paths between the host and the storage system to an exclusive path group and a shared path group. When a storage IO request to be issued is generated, if the target logical unit corresponding to the storage IO request belongs to the high-priority group, the optimal path can be selected from the exclusive path group and the shared path group to issue the request. If the target logical unit corresponding to the storage IO request belongs to the low-priority group, the optimal path can be selected from the shared path group to issue the request. The high-priority group's exclusive use rights of the exclusive path group and the shared use rights of the shared path group can ensure the performance of the logical units in the high-priority group, reduce the impact of the low-priority group on the business of the high-priority group, and significantly improve the processing efficiency of the high-priority group's IO requests. At the same time, the shared path group also ensures the normal use of the logical unit business in the low-priority group, thereby improving the storage service quality.
[0130] In some possible implementations, the storage IO request processing method further includes:
[0131] Perform IO performance testing on each member of the high-priority group;
[0132] During the specific implementation process, IO performance testing includes but is not limited to testing indicators such as access latency, usage frequency, waiting queue length, and saturation;
[0133] Determine whether the high priority group can reach a first preset IO performance state based on the IO performance detection result;
[0134] In a specific implementation, the first preset IO performance state may be that a preset number of logical units are queued. The first preset IO performance state may also be that a certain percentage of members have a high usage rate. The first preset IO performance requirement only needs to indicate that the high priority group has load pressure.
[0135] In response to determining that the high priority group cannot reach the first preset IO performance state, performing step-by-step enhanced IO flow restrictions on members in the low priority group; and
[0136] In the case of completing each enhanced IO flow limit, after waiting for the first preset time, the process returns to the step of performing IO performance detection on each member of the high priority group until the low priority group reaches the preset maximum IO flow limit.
[0137] The storage IO request processing method of this embodiment performs IO performance detection on the logical units of the high-priority group. When it is detected that the load of the high-priority group reaches a certain level of pressure, IO restrictions are imposed on the logical units of the low-priority group, thereby limiting the occupation of shared path resources by the logical units of the low-priority group. This can significantly improve the processing efficiency of IO requests of the logical units of the high-priority group, thereby realizing dynamic resource adjustment.
[0138] In some possible implementations, the storage IO request processing method further includes:
[0139] In response to determining that the high priority group can achieve a first preset IO performance state, determining whether the high priority group can achieve a second preset IO performance state based on the IO performance detection result, wherein an IO load pressure of the high priority group in the second preset IO performance state is less than an IO load pressure of the high priority group in the second preset IO performance state;
[0140] Illustratively, the second preset IO performance state may be that a preset number of logical units have idle queues, or the second preset IO performance state may be that a certain proportion of member usage rates are low, etc.; the second preset IO performance requirement only needs to be able to indicate that the load pressure of the high priority group has been alleviated compared to the first preset IO performance state.
[0141] In response to determining that the high priority group can reach the second preset IO performance state, gradually weakening the IO flow restrictions on members in the low priority group; and
[0142] In the case of each time the IO flow restriction is weakened, the process returns to the step of performing IO performance detection on each member of the high priority group after waiting for the first preset time, until the low priority group has no IO flow restriction.
[0143] The storage IO request processing method of this embodiment performs IO performance detection on the logical units of the high-priority group, and after detecting that the load of the high-priority group has been alleviated to a certain extent, the IO restrictions on the logical units of the low-priority group are gradually cancelled, thereby gradually restoring the use rights of the logical units of the low-priority group to shared path resources, achieving a balanced use of path resources by the high-priority group and the low-priority group, and automatically restoring the restrictions on the low-priority group according to the business pressure of the high-priority group, with good flexibility and adaptability.
[0144] In some possible implementations, the storage IO request processing method further includes:
[0145] Perform IO performance testing on each member of the high-priority group;
[0146] Determining whether the high priority group can reach a first preset IO performance state based on the IO performance detection result; and
[0147] In response to determining that the high priority group cannot reach the first preset IO performance state, a preset number of paths are moved from the shared path group to the exclusive path group each time, and the step of performing IO performance detection on each member of the high priority group is returned until the shared path group has only one path.
[0148] The storage IO request processing method of this embodiment achieves the effect of quickly alleviating the service pressure of the high-priority group by gradually mobilizing path resources from the shared path group to the exclusive path group when the high-priority group members reach a certain level of load pressure. This realizes dynamic adjustment of path resources, greatly ensures the processing speed of the high-priority group services, and helps to improve the storage service quality.
[0149] In some possible implementations, the storage IO request processing method further includes:
[0150] In response to determining that the high priority group can reach the first preset IO performance state, determining whether the high priority group can reach the second preset IO performance state based on the IO performance detection result, wherein the IO load pressure of the high priority group in the second preset IO performance state is less than the IO load pressure of the high priority group in the second preset IO performance state; and
[0151] In response to determining that the high priority group can reach the second preset IO performance state, a preset number of paths are moved from the exclusive path group to the shared path group each time until the number of paths in the shared path group is restored to the number before the movement.
[0152] The storage IO request processing method of this embodiment achieves dynamic balancing of the services of the high-priority group and the low-priority group by gradually calling back the path resources in the exclusive path group to the exclusive path group after the load pressure on the high-priority group members is reduced. It has good adaptability and can promptly respond to the host's sudden IO request processing for storage services and can automatically call back to the original state, thereby ensuring that the services of various logical units are processed in an orderly manner according to their importance.
[0153] In some possible implementations, the aforementioned step performs IO performance testing on each member of the high-priority group, which can be specifically implemented by the following steps:
[0154] Selecting a member from the high-priority group as the target member in a traversal manner; and
[0155] Get the average IO latency of each target member per unit time.
[0156] The storage IO request processing method of this embodiment detects the IO performance of the high-priority group by detecting the latency of each logical unit in the high-priority group. At the same time, the IO performance is measured by the average latency, which can greatly reduce the probability of detection errors, thereby ensuring accurate adjustment of resources later.
[0157] In some possible implementations, the aforementioned step of determining whether the high-priority group can reach the first preset IO performance state based on the IO performance detection result can be specifically implemented by the following steps:
[0158] Compare the average IO latency of each target member with the first preset IO latency;
[0159] Record the number of first members whose average IO latency exceeds the first preset IO latency;
[0160] Calculating a ratio of the number of first members to the total number of members in the high priority group to obtain a first ratio;
[0161] In response to determining that the first ratio does not exceed a first predetermined ratio, confirming that the high priority group can achieve a first predetermined IO performance state; or
[0162] In response to determining that the first ratio exceeds the first predetermined ratio, it is determined that the high priority group cannot reach the first predetermined IO performance state.
[0163] It should be noted that, in this embodiment, the first preset ratio is a value greater than zero and less than one. The larger the first preset ratio is, the greater the load pressure that the high-priority group can bear. The first preset ratio can be set according to the specific application scenario of the storage business. For example, the first preset ratio can be set to 0.2 or 0.3, that is, when the high-priority group has more than 20% or 30% of members, a certain degree of excessive load occurs.
[0164] The storage IO request processing method of this embodiment uses the first preset IO latency to find the logical unit with performance degradation in the high-priority group, and then uses the first preset ratio to measure the overall performance of the high-priority group. This can accurately quantify the current business pressure of the high-priority group, thereby automatically determining whether the business pressure of the high-priority group is relatively large, thereby triggering the adjustment of IO resources to the high-priority group.
[0165] In some possible implementations, the aforementioned step of determining whether the high-priority group can reach the second preset IO performance state based on the IO performance detection result can be specifically implemented by the following steps:
[0166] In response to determining that the average IO latency of all members of the high priority group does not exceed the first preset IO latency, comparing the average IO latency of each target member with a second preset IO latency, wherein the second preset IO latency is less than the first preset IO latency;
[0167] Record the number of second members whose average IO latency exceeds the second preset IO latency;
[0168] Calculating a ratio of the number of second members to the total number of members in the high-priority group to obtain a second ratio;
[0169] In response to determining that the second ratio does not exceed a second predetermined ratio, confirming that the high priority group can achieve a second predetermined IO performance state; or
[0170] In response to determining that the second ratio exceeds a second predetermined ratio, it is determined that the high priority group cannot reach a second predetermined IO performance state.
[0171] It should be noted that, in this embodiment, the second preset ratio is also a value greater than zero and less than one. The difference from the first preset ratio is that the larger the second preset ratio is, the higher the conditions for allowing the high-priority group to release occupied resources. The second preset ratio can be set according to the specific application scenario of the storage business. For example, the second preset ratio can be set to 0.7 or 0.8, that is, when the high-priority group has more than 70% or 80% of members, the load pressure has been alleviated.
[0172] The storage IO request processing method of this embodiment uses the second preset IO delay to find the logical unit with performance relief in the high-priority group, and then uses the second preset ratio to measure the overall performance of the high-priority group. It can accurately quantify the business pressure relief of the high-priority group, thereby automatically determining whether the business pressure of the high-priority group is relatively small, thereby triggering IO resource callback and ensuring business balance between the high-priority group and the low-priority group.
[0173] In some possible implementations, the storage IO request processing method further includes:
[0174] Start a one-second counter to count each storage IO request to be issued;
[0175] Determine whether there is IO traffic restriction for the low priority group;
[0176] In response to determining that there is no IO traffic restriction for the low priority group, allowing the step of selecting the path with the least load from the shared path group to issue the storage IO request;
[0177] In response to determining that the low priority group has an IO flow restriction, determining whether a current counter value exceeds a restricted number of IO requests;
[0178] In response to determining that the current counter value exceeds the limit on the number of IO requests, blocking the storage IO request for a second preset time and then returning to the step of determining whether there is an IO flow limit for the low priority group; or
[0179] In response to determining that the current counter value does not exceed the limit on the number of IO requests, the step of selecting a path with the smallest load from the shared path group to issue the storage IO request is allowed to be executed.
[0180] The storage IO request processing method of this embodiment uses a timer to automatically count the storage IO requests received within a unit time. For storage IO requests of the low-priority group, the method compares the current IO limit with the timer count to find the storage IO requests that need to be blocked, so that they are delayed before being requested again, thereby greatly reducing their occupation of path resources between the host and storage, and giving priority to ensuring the processing of IO requests of the high-priority group.
[0181] In some possible implementations, the IO traffic restrictions for members in the low-priority group are gradually enhanced, including:
[0182] In response to determining that the number of limited IO requests does not exceed the preset minimum IOPS value, confirming that the low priority group has reached a preset maximum IO flow limit;
[0183] In response to determining that the limited number of IO requests exceeds a preset minimum IOPS value, incrementing the current limit level by one so that the IOPS value of each member in the low priority group decreases year-on-year, and recalculating the limited number of IO requests, wherein the initial value of the limit level is zero; and
[0184] In response to determining that the recalculated limited IO request number does not exceed the preset minimum IOPS value, the limited IO request number is set equal to the preset minimum IOPS value, and it is confirmed that the low priority group reaches the preset maximum IO flow limit.
[0185] In some possible implementations, in response to determining to gradually enhance the IO flow limit, the number of IO requests to be limited is calculated according to the following formula 1:
[0186] IOLimit indicates the limit on the number of IO requests, n indicates the number of logical units in the low-priority group, IOPS(i) indicates the IOPS value of each logical unit in the most recent unit time period, and Ratio indicates the preset adjustment ratio. Ratio is greater than 0 and less than 1.
[0187] The storage IO request processing method of this embodiment realizes a step-by-step reduction in the IO traffic of low-priority group members by setting a preset adjustment ratio and an incremental adjustment limit level. On the one hand, it can avoid the great impact of a large reduction on the low-priority group. On the other hand, it can also avoid excessive adjustments caused by short-term sudden traffic changes in the high-priority group, further improving the storage service quality.
[0188] In some possible implementations, determining whether the low-priority group has I / O traffic restrictions includes:
[0189] Determine whether the current restriction levels are all zero;
[0190] In response to determining that the current restriction levels are all zero, confirming that no IO flow restriction exists for the low priority group; or
[0191] In response to determining that the current restriction levels are not all zero, it is confirmed that the IO traffic restriction exists for the low priority group.
[0192] In some possible implementations, the aforementioned steps of gradually reducing the IO traffic restrictions on members in the low-priority group include:
[0193] Determine whether the current restriction level is equal to zero;
[0194] In response to determining that the current restriction level is equal to zero, confirming that the low priority group currently has no IO flow restriction;
[0195] In response to determining that the current limit level is not equal to zero, the current limit level is reduced by one so that the IOPS value of each member in the low priority group increases year-on-year, and the limit on the number of IO requests is recalculated; or
[0196] In response to determining that the current restriction level minus one equals zero, it is confirmed that the low priority group has no IO traffic restriction.
[0197] In some possible implementations, in response to determining to gradually weaken the IO traffic restriction, the number of IO requests to be restricted is calculated according to the following formula 2:
[0198] IOLimit(n)=IOLimit(n+1) / Ratio Formula 2;
[0199] IOLimit(n) indicates the number of IO requests limited when the limit level is n, IOLimi(n+1) indicates the number of IO requests limited when the limit level is n+1, and Ratio indicates the preset adjustment ratio. Ratio is greater than 0 and less than 1.
[0200] The storage IO request processing method of this embodiment realizes a step-by-step increase in the IO traffic of low-priority group members by setting a preset adjustment ratio and a decreasing adjustment limit level. This can avoid a significant impact of a large increase on the high-priority group, and can gradually restore the resource occupation of low-priority group members, further improving the storage service quality.
[0201] In some possible implementations, the storage IO request processing method further includes:
[0202] In response to determining that the low priority group reaches a preset maximum IO flow limit and the high priority group still does not reach a first preset IO performance state, the number of paths in the exclusive path group and the shared path group is readjusted, and the step of performing IO performance detection on each member of the high priority group is returned.
[0203] In some possible implementations, the number of paths in the exclusive path group and the shared path group is readjusted, including:
[0204] Clear the IOPS limit for the low priority group;
[0205] Calculate the total IOPS of all members in the high-priority group and obtain the first sum value;
[0206] Calculate the sum of the IOPS of all members in the high-priority group and all members in the low-priority group to obtain the second sum value;
[0207] Calculate the ratio of the first sum value to the second sum value to obtain a third ratio;
[0208] calculating a first product of the third ratio and the total number of paths, and updating the number of paths in the exclusive path group using the first product; and
[0209] The difference between the total number of paths and the first product is calculated and used to update the number of paths in the shared path group.
[0210] The storage IO request processing method of this embodiment differs from the previously described method of fine-grained adjustment of path resources through IOPS in that, when the traffic limit of the low-priority group remains unrelieved after reaching a certain level, this embodiment can initiate readjustment of the number of paths in the two path groups. This enables adjustment at both the number of paths and the logical unit traffic level, providing greater flexibility.
[0211] In some possible implementations, before the step of gradually reducing the IO traffic restrictions on members in the low-priority group, the storage IO request processing method further includes:
[0212] Determine whether the exclusive path group and shared path group have been readjusted;
[0213] In response to determining that the exclusive path group and the shared path group have been readjusted, clearing the IOPS limit of the low priority group;
[0214] The number of paths in the exclusive path group and the shared path group is restored to the number before readjustment, and the step of performing I / O performance testing on each member of the high-priority group is returned.
[0215] The storage IO request processing method of this embodiment provides corresponding callback measurements for two-level adjustment methods: the number of paths and the logical unit flow. That is, during the callback, the number of paths is first guaranteed to be restored, thereby avoiding large deviations between shared path groups and exclusive path groups during long-term operation, and having good flexibility.
[0216] In another embodiment, in order to facilitate understanding of the solution of the present application, the storage IO request processing method of the present application will be described in detail with reference to a specific example below, as shown in Figure 3, and its implementation principle is as follows: first, in the host, according to the importance and priority of the application, the priority of the LUN from the storage used by it is determined and configured; secondly, the path between the host and the storage is allocated to an exclusive path group for use by the high-priority LUN, and a shared path group is allocated to use by all LUNs, and dynamically adjusted according to the business pressure distribution of LUNs with different priorities, with high-priority LUNs giving priority to using the exclusive path group and sharing other paths, namely the shared path group; then, when the high-priority LUN does not meet the performance requirements, step-by-step flow control is implemented on the low-priority LUN to reduce the link occupation of the low-priority LUN, and the adjustment effect is self-verified and further adjusted to ensure the performance of the high-priority LUN and the quality of application service; when the performance of the high-priority LUN is better than a certain threshold, the flow restriction of the low-priority LUN is gradually cancelled to take into account the business performance of the low-priority LUN and achieve dynamic balance.
[0217] As shown in Figure 4, this method mainly includes four parts: LUN priority configuration, path priority management, business pressure detection and tuning, and IO delivery. The following will describe each part in detail.
[0218] Part 1: LUN Priority Configuration
[0219] LUN priority configuration specifically includes configuring the priority of LUNs from the storage system discovered on the host, defining the performance requirements of high-priority LUNs, and the granularity of each IOPS adjustment and the minimum IOPS requirement for low-priority LUNs.
[0220] The specific configuration format example is as follows:
[0221] The High-Priority-LUN-list in the configuration file contains LUNs with high application priority that are mapped from the storage system to the host. The LUN ID is its unique identifier. LUNs not in this list are low-priority LUNs.
[0222] IO-guarantee is used to configure performance requirements and limits. For high-priority LUNs, performance guarantees are provided, using IO latency requirements (as described in the High-Priority-LUN Latency-guarantee configuration above). For low-priority LUNs, to guarantee high-priority LUN performance, traffic limits need to be adjusted. IOPS thresholds are used to limit traffic. The granularity for each performance limit adjustment (defined as a ratio, less than 1, as described in the Adjust-Ratio configuration above) and the minimum performance requirement (as described in the Low-Priority-LUN Required-IOPS configuration above) are configured.
[0223] Part 2: Path Priority Management
[0224] An exclusive path group can be used exclusively by high-priority LUNs and cannot be used by other LUNs. A shared path group, that is, paths not included in an exclusive path group, can be shared by all LUNs.
[0225] Initial allocation: After scanning LUNs, initially allocate paths based on the number of high-priority LUNs and the total number of LUNs.
[0226] Determine the number of paths in the exclusive path group. The number of paths in the exclusive path group = (number of high-priority LUNs / total number of LUNs) * total number of paths.
[0227] Dynamic adjustment: Triggered periodically, the number of paths is dynamically adjusted and allocated based on the total IOPS of high-priority LUNs and the total IOPS of all LUNs.
[0228] The number of paths in an exclusive path group = (total IOPS of high-priority LUNs / total IOPS of all LUNs) * total number of paths.
[0229] The total IOPS of all LUNs = the total IOPS of high-priority LUNs + the total IOPS of low-priority LUNs.
[0230] By limiting the IOPS of low-priority LUNs (the implementation method will be described in the business pressure detection and tuning section), the business pressure on the shared path group can be reduced. When the IOPS decreases to a certain level, the exclusive path group paths are automatically increased according to the calculation results to better ensure the business of high-priority LUNs.
[0231] Number of shared paths = total number of paths - number of paths in the exclusive path group. Ensure that there is at least one path in the shared path group to prevent service interruption for low-priority LUNs due to a lack of available paths.
[0232] Part 3: Business Stress Testing and Tuning
[0233] Its main working principle is to dynamically adjust the low-priority LUN IO limit threshold based on the high-priority LUN IO latency detection results. After the adjustment takes effect, it will be tested again to verify the adjusted effect. The above process is repeated over and over again. Through the dynamic feedback mechanism, the automatic optimization effect is achieved. Please refer to Figure 5 for the overall processing flow:
[0234] First, check whether the IO latency of each LUN in the high-priority LUN group reaches the set high-priority guaranteed IO latency.
[0235] Next, if it determines that more than 20% of high-priority LUNs do not meet the guaranteed IO latency, the IO limits for lower-priority LUNs will be gradually increased to ensure high-priority LUN performance. (The 20% here can be adjusted as needed. For ease of illustration, 20% is used as an example. For example, if all LUNs meet the guaranteed IO latency, the limit can be set to 0.)
[0236] Next, if all high-priority LUNs meet the guaranteed IO latency and 80% of LUNs achieve even lower IO latency (less than 80% of the guaranteed IO latency), the IO restrictions for lower-priority LUNs will be gradually lifted. While ensuring the performance of high-priority LUNs, the performance of lower-priority groups will be balanced and optimized. (The 80% here can be adjusted as needed, but is used for ease of explanation.)
[0237] Finally, after the IO limit adjustment for the low-priority LUN takes effect, wait for a period of time (since the adjustment takes time to take effect and performance data needs to be collected for a period of time before testing to avoid over-adjustment due to the effect of the last adjustment not being reflected, the waiting time here can be multiple sampling periods) and then start the next round of detection cycle.
[0238] As shown in Figure 6, the following details the implementation process of step-by-step optimization based on business pressure:
[0239] Step 1: Traverse the high-priority LUN list HighPriorityLunList and obtain the next LUN.
[0240] Step 2: Obtain the average IO latency (IO Latency) of a single LUN per unit time.
[0241] Step 3: Determine whether the IOLatency is greater than the high-priority guaranteed IOL latency High-Priority-LUN Latency-guarantee set in the configuration file.
[0242] 3.1. In response to determining that IOLatency is greater than the high-priority guaranteed IOL latency set in the configuration file, High-Priority-LUN Latency-guarantee, the number of LUNs that did not meet the latency is recorded as NotSatisfied++ (the initial value of NotSatisfied is 0), and the process returns to check the next LUN; otherwise, proceed to the next step.
[0243] Step 4: Determine whether the IOLatency is less than 80% of the high-priority guaranteed IOL latency High-Priority-LUN Latency-guarantee set in the configuration file.
[0244] 4.1. In response to determining that IOLatency is less than 80% of the high-priority guaranteed IOL latency set in the configuration file, the system records the number of LUNs with low latency, LowLatency++ (the initial value of LowLatency is 0), and returns to check the next LUN; otherwise, proceeds to the next step.
[0245] Step 5: After completing the IO latency check for all high-priority LUNs, adjust the IO limit for low-priority LUNs based on the check results.
[0246] 5.1. In response to determining that the proportion of LUNs that do not meet the guaranteed IO latency exceeds 20% of all high-priority LUNs (i.e., NotSatisfied / HighPriorityLunList.Size > 20%), the IO limits of low-priority LUNs are gradually increased until the threshold is adjusted to the minimum IOPS requirement. The specific enhancement method is shown in Figure 7 and the implementation instructions.
[0247] 5.2. In response to determining that all high-priority LUNs have achieved the guaranteed IO latency, and the proportion of LUNs with a guaranteed IO latency below 80% exceeds 80% of all LUNs, that is, LowLatency / HighPriorityLunList.Size > 80%, the IO restrictions on low-priority LUNs are gradually reduced until all restrictions are completely lifted. The specific reduction method is shown in Figure 7 and the implementation instructions.
[0248] Step 6: After waiting for a while, clear the NotSatisfied and LowLatency counts and continue with the next round of testing to automatically verify the effect of the adjustment.
[0249] The detailed implementation steps of the sub-process of ① gradually increasing / ② gradually decreasing the IO restrictions for low-priority LUNs in Figure 6 are shown in Figure 7.
[0250] Step 1: Determine whether to increase or decrease the IO limit. If it is determined that the IO limit is increased, proceed to step 2. If it is determined that the IO limit is decreased, proceed to step 3.
[0251] Step 2: Increase IO restrictions step by step.
[0252] 2.1. Determine whether the current IO limit IOLimit of the low-priority LUN has reached the minimum requirement, that is, whether it has reached the Low-Priority-LUN Required-IOPS defined in the configuration file; if it is determined that the minimum requirement has been met, end; otherwise, proceed to the next step;
[0253] 2.2, Restriction level enhanced to Level 1, Level++;
[0254] 2.3. Calculate the number of limited IO requests Where n is the number of low-priority LUNs, IOPS(i) is the IOPS value of each LUN in the most recent time period, and Ratio is the adjustment ratio for each level, which is obtained from Adjust-Ratio in the configuration file and is a value less than 1.
[0255] 2.4. In response to determining that the IOLimit is less than the minimum IOPS requirement, that is, the Low-Priority-LUN Required-IOPS in the above configuration file, it indicates that the IOLimit has been adjusted to the maximum limit, and the IOLimit value is the minimum IOPS requirement.
[0256] Step 3: Gradually reduce IO restrictions.
[0257] 3.1. Determine whether all current restrictions have been weakened to the point of complete elimination and whether the Level is 0; if it is determined that all current restrictions have been weakened to the point of complete elimination, end; if it is determined that all current restrictions have not been weakened to the point of complete elimination, proceed to the next step;
[0258] 3.2, the restriction level is reduced by 1 level, Level--;
[0259] 3.3. Determine whether all current restrictions have been weakened to the point where IO restrictions are completely removed, and whether Level is 0. If it is determined that all current restrictions have been weakened to the point where restrictions are completely removed, set IOLimit to 0, and terminate. If it is determined that all current restrictions have not been weakened to the point where restrictions are completely removed, calculate the IO limit and adjust IOLimit based on the year-on-year ratio: IOLimit = IOLimit / Ratio. It should be noted that the calculation method used here is slightly different from that used when increasing restrictions. Removing restrictions should be calculated based on the limit value, i.e., adjusted inversely based on the previous IOLimit year-on-year ratio, rather than adjusting for current real-time performance IOPS.
[0260] Part 4: IO issuance;
[0261] The IO delivery program includes multiple IO processing programs and an IO count clearing timer. The specific processing flow is shown in Figure 8. The specific IO processing process is as follows:
[0262] Step 1: First, determine whether it is a high-priority LUN. For a high-priority LUN, directly proceed to step 3 and select a path to deliver IO. Otherwise, proceed to step 2 and control the flow of low-priority LUNs.
[0263] Step 2: Check whether the IO restriction has been canceled. In response to determining that the IO restriction has been canceled, proceed to step 3, select a path to send IO, in response to determining that the IO restriction has not been canceled, check whether the IO count has exceeded the IO restriction threshold, in response to determining that the IO count has not exceeded the IO restriction threshold, proceed to step 3, in response to determining that the IO count exceeds the IO restriction threshold, block IO, and wait for the next test to see if it can be sent.
[0264] Step 3: Select a path to send IO.
[0265] 3.1. In response to determining that it is a high-priority LUN, traverse all path lists and select the path with the least load to deliver the IO;
[0266] 3.2. In response to determining that it is a low-priority LUN, traverse the shared path group list and select the path with the least load to send IO. Since the high-priority LUN exclusively occupies the high-priority path, under normal circumstances, the high-priority path has a light load, so the high-priority path is selected during path selection.
[0267] Step 4: IO statistics: count IO and record the execution time of IO; reset IO count regularly: reset IOCounter count every second.
[0268] The storage IO request processing method of this embodiment has at least the following beneficial technical effects:
[0269] First, in the host, the priority of LUN is set according to the importance of the business application to ensure the service quality of high-priority business. Compared with setting the priority in the storage system to ensure the service quality, it is closer to the business application, avoiding the impact of the intermediate link from the host to the storage on the performance, and the service quality is guaranteed more effectively; at the same time, priority management is not limited to the LUN mapped to the host by a single storage, but can also be applied to the priority management of LUNs mapped from different storages on a single host.
[0270] Secondly, the paths from the host to the storage are grouped according to priority, providing exclusive path groups for high-priority LUNs and shared path groups for all LUNs. The groups are dynamically adjusted based on the IOPS ratio of high-priority LUNs to ensure the path usage of high-priority LUNs and reduce the performance impact between LUNs of different priorities.
[0271] Finally, in the host, through the performance detection of high-priority LUNs, the IO limits of low-priority LUNs are dynamically adjusted based on performance index requirements. Under the premise of ensuring the performance requirements of high-priority LUNs, the normal business use of low-priority LUNs is guaranteed as much as possible, achieving dynamic balance and ensuring the quality of application services.
[0272] The storage IO request processing device provided in the present application is described below. The storage IO request processing device described below and the storage IO request processing method described above can be referenced to each other.
[0273] As shown in FIG9 , this embodiment provides a storage IO request processing device for a host. Specifically, the device includes: a first allocation module 910 , a second allocation module 920 , a first path selection module 930 , and a second path selection module 940 . Each of the above modules is described in detail below:
[0274] A first allocation module 910 is configured to allocate logical units mapped from the storage system to the host to a pre-set high-priority group and a pre-set low-priority group, wherein the application priorities corresponding to the logical units in the high-priority group are all higher than the application priorities corresponding to the logical units in the low-priority group;
[0275] A second allocation module 920 is configured to allocate paths between the host and the storage system to a pre-set exclusive path group and a shared path group, wherein each of the exclusive path group and the shared path group includes at least one path;
[0276] A first path selection module 930 is configured to, in response to determining that a target logical unit corresponding to a storage IO request to be issued belongs to a high priority group, select a path with the smallest load from the exclusive path group and the shared path group to issue the storage IO request;
[0277] The second path selection module 940 is configured to, in response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the low priority group, select a path with the smallest load from the shared path group to issue the storage IO request.
[0278] The storage IO request processing device of this embodiment allocates the logical units mapped by the storage system to a high-priority group and a low-priority group on the host side, and allocates the paths between the host and the storage system to an exclusive path group and a shared path group. When a storage IO request to be issued is generated, if the target logical unit corresponding to the storage IO request belongs to the high-priority group, the optimal path can be selected from the exclusive path group and the shared path group to issue the request. If the target logical unit corresponding to the storage IO request belongs to the low-priority group, the optimal path can be selected from the shared path group to issue the request. The high-priority group's exclusive use rights of the exclusive path group and the shared use rights of the shared path group can ensure the performance of the logical units in the high-priority group, reduce the impact of the low-priority group on the business of the high-priority group, and significantly improve the processing efficiency of the high-priority group's IO requests. At the same time, the shared path group also ensures the normal use of the logical unit business in the low-priority group, thereby improving the storage service quality.
[0279] It should be noted that each module in the aforementioned storage IO request processing device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in an electronic device in the form of hardware, or may be stored in a memory in the electronic device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0280] Figure 10 illustrates a schematic diagram of the physical structure of an electronic device. As shown in Figure 10, the electronic device may include: one or more processors (processor) 1010, a communication interface (Communications Interface) 1020, a memory (memory) 1030 associated with the one or more processors 1010 and a communication bus 1040, wherein the processor 1010, the communication interface 1020, and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 can call computer-readable instructions in the memory 1030 to execute a storage IO request processing method, which includes: allocating the logical units mapped from the storage system to the host to a pre-set high priority group and a low priority group, wherein the application priorities corresponding to the logical units belonging to the high priority group are higher than the application priorities corresponding to the logical units belonging to the low priority group; allocating the paths between the host and the storage system to a pre-set exclusive path group and a shared path group, wherein the exclusive path group and the shared path group each include at least one path; in response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the high priority group, selecting the path with the smallest load from the exclusive path group and the shared path group to issue the storage IO request; in response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the low priority group, selecting the path with the smallest load from the shared path group to issue the storage IO request.
[0281] In addition, the computer-readable instructions in the above-mentioned memory 1030 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0282] On the other hand, the present application also provides a computer program product, which includes computer-readable instructions, which can be stored on a non-transitory computer-readable storage medium. When the computer-readable instructions are executed by a processor, the computer can execute the storage IO request processing method provided by the above methods, the method including: allocating the logical units mapped from the storage system to the host to a pre-set high priority group and a low priority group, wherein the application priorities corresponding to the logical units belonging to the high priority group are all higher than the application priorities corresponding to the logical units belonging to the low priority group; allocating the paths between the host and the storage system to a pre-set exclusive path group and a shared path group, wherein the exclusive path group and the shared path group each include at least one path; in response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the high priority group, selecting the path with the least load from the exclusive path group and the shared path group to issue the storage IO request; in response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the low priority group, selecting the path with the least load from the shared path group to issue the storage IO request.
[0283] On the other hand, the present application also provides a non-transitory computer-readable storage medium, as shown in Figure 11, on which computer-readable instructions are stored. When the computer-readable instructions are executed by the processor, they are implemented to execute the storage IO request processing method provided by the above-mentioned methods, the method comprising: allocating the logical units mapped from the storage system to the host to a pre-set high priority group and a low priority group, wherein the application priorities corresponding to the logical units belonging to the high priority group are all higher than the application priorities corresponding to the logical units belonging to the low priority group; allocating the paths between the host and the storage system to a pre-set exclusive path group and a shared path group, wherein the exclusive path group and the shared path group each include at least one path; in response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the high priority group, selecting the path with the least load from the exclusive path group and the shared path group to issue the storage IO request; in response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the low priority group, selecting the path with the least load from the shared path group to issue the storage IO request.
[0284] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0285] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or certain parts of the embodiment.
[0286] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for processing storage I / O requests, characterized in that For the host side, the method includes: Assigning the logical units that map the storage system to the host to a pre-set high-priority group and a low-priority group, where the application priorities corresponding to the logical units belonging to the high-priority group are all higher than the application priorities corresponding to the logical units belonging to the low-priority group; Assigning the paths between the host and the storage system to a pre-set exclusive path group and a shared path group, where both the exclusive path group and the shared path group include at least one path; In response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the high-priority group, selecting the path with the least load from the exclusive path group and the shared path group to issue the storage IO request; or In response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the low-priority group, selecting the path with the least load from the shared path group to issue the storage IO request.
2. The storage IO request processing method according to claim 1, wherein The method further includes: Performing IO performance detection on each member of the high-priority group; Judging whether the high-priority group can reach a first preset IO performance state based on the IO performance detection result; In response to determining that the high-priority group cannot reach the first preset IO performance state, gradually increasing the IO traffic limit for the members in the low-priority group; and After each increase in the IO traffic limit is completed, waiting for a first preset time and then returning to the step of performing IO performance detection on each member of the high-priority group until the low-priority group reaches a pre-set maximum IO traffic limit.
3. The storage IO request processing method according to claim 2, wherein After the step of judging whether the high-priority group can reach the first preset IO performance state based on the IO performance detection result, it further includes: In response to determining that the high-priority group can reach the first preset IO performance state, judging whether the high-priority group can reach a second preset IO performance state based on the IO performance detection result, where the IO load pressure of the high-priority group in the second preset IO performance state is less than the I0 load pressure of the high-priority group in the second preset IO performance state; In response to determining that the high-priority group can reach the second preset IO performance state, gradually weakening the IO traffic limit for the members in the low-priority group; and After each weakening of the IO traffic limit is completed, waiting for a first preset time and then returning to the step of performing IO performance detection on each member of the high-priority group until the low-priority group has no IO traffic limit.
4. The storage I / O request processing method according to claim 1, wherein The method further includes: Performing IO performance detection on each member of the high-priority group; Judging whether the high-priority group can reach a first preset IO performance state based on the IO performance detection result; and In response to determining that the high-priority group cannot reach the first preset IO performance state, moving a preset number of paths from the shared path group to the exclusive path group each time and returning to the step of performing IO performance detection on each member of the high-priority group until there is only one path left in the shared path group.
5. The storage I / O request processing method according to claim 4, wherein After the step of determining whether the high-priority group can reach the first preset I / O performance state based on the I / O performance detection result, the following steps are further included: In response to determining that the high-priority group can reach the first preset I / O performance state, based on the I / O performance detection result, determine whether the high-priority group can reach the second preset I / O performance state, where the I / O load pressure of the high-priority group in the second preset I / O performance state is less than the I / O load pressure of the high-priority group in the second preset I / O performance state; and In response to determining that the high-priority group can reach the second preset I / O performance state, move a preset number of paths from the exclusive path group to the shared path group each time until the number of paths in the shared path group resumes to the number of paths before the movement.
6. The storage I / O request processing method according to claim 3 or 5, wherein The I / O performance detection of each member of the high-priority group includes: Select a member from the high-priority group as the target member in a traversal manner; and Obtain the average I / O latency of each target member within a unit time.
7. The storage I / O request processing method according to claim 6, wherein The determination of whether the high-priority group can reach the first preset I / O performance state based on the I / O performance detection result includes: Compare the average I / O latency of each target member with the first preset I / O latency; Record the number of the first members whose average I / O latency exceeds the first preset I / O latency; Calculate the ratio of the number of the first members to the total number of members in the high-priority group to obtain the first ratio; In response to determining that the first ratio does not exceed the first preset ratio, confirm that the high-priority group can reach the first preset I / O performance state; or In response to determining that the first ratio exceeds the first preset ratio, confirm that the high-priority group cannot reach the first preset I / O performance state.
8. The storage I / O request processing method according to claim 7, wherein The determination of whether the high-priority group can reach the second preset I / O performance state based on the I / O performance detection result includes: In response to the average I / O latency of all members of the high-priority group not exceeding the first preset I / O latency, compare the average I / O latency of each target member with the second preset I / O latency, where the second preset I / O latency is less than the first preset I / O latency; Record the number of the second members whose average I / O latency exceeds the second preset I / O latency; Calculate the ratio of the number of the second members to the total number of members in the high-priority group to obtain the second ratio; In response to determining that the second ratio does not exceed the second preset ratio, confirm that the high-priority group can reach the second preset I / O performance state; or In response to determining that the second ratio exceeds the second preset ratio, confirm that the high-priority group cannot reach the second preset I / O performance state.
9. The storage IO request processing method according to claim 3, wherein The method further includes: Start a one-second counter to count each storage I / O request to be issued; Determine whether there is an I / O traffic limit in the low-priority group; In response to determining that there is no I / O traffic limit in the low-priority group, allow the step of selecting the path with the minimum load from the shared path group to issue the storage I / O request to be executed; In response to determining that there is an IO traffic limit for the low-priority group, determine whether the current counter value exceeds the limit number of IO requests; In response to determining that the current counter value exceeds the limit number of IO requests, block the storage IO request for a second preset time and then return to the step of determining whether there is an IO traffic limit for the low-priority group; or In response to determining that the current counter value does not exceed the limit number of IO requests, allow the step of selecting the path with the least load from the shared path group and issuing the storage IO request.
10. The storage I / O request processing method according to claim 9, wherein The step of gradually increasing the IO traffic limit for the members in the low-priority group includes: In response to determining that the limit number of IO requests does not exceed the preset minimum IOPS value, confirm that the low-priority group has reached the preset maximum IO traffic limit; In response to determining that the limit number of IO requests exceeds the preset minimum IOPS value, increment the current limit level so that the IOPS values of the members in the low-priority group decrease proportionally, and recalculate the limit number of IO requests, where the initial value of the limit level is equal to zero; and In response to determining that the recalculated limit number of IO requests does not exceed the preset minimum IOPS value, set the limit number of IO requests to the preset minimum IOPS value and confirm that the low-priority group has reached the preset maximum IO traffic limit.
11. The storage I / O request processing method according to claim 10, wherein In response to determining to gradually increase the IO traffic limit, the number of restricted IO requests is calculated according to the following formula (1); Wherein, IOLimit represents the limit number of IO requests, n represents the number of logical units included in the low-priority group, IOPS(i) represents the IOPS value of each logical unit in the most recent unit time period, and Ratio represents the preset adjustment ratio.
12. The storage I / O request processing method according to claim 9, wherein The step of determining whether there is an IO traffic limit for the low-priority group includes: Determine whether the current limit levels are all zero; In response to determining that the current limit levels are all zero, confirm that there is no IO traffic limit for the low-priority group; or In response to determining that the current limit levels are not all zero, confirm that there is an IO traffic limit for the low-priority group.
13. The storage I / O request processing method according to claim 9, wherein The step of gradually weakening the IO traffic limit for the members in the low-priority group includes: Determine whether the current limit level is equal to zero; In response to determining that the current limit level is equal to zero, confirm that there is no IO traffic limit for the low-priority group currently; In response to determining that the current limit level is not equal to zero, decrement the current limit level so that the IOPS values of the members in the low-priority group increase proportionally, and recalculate the limit number of IO requests; or In response to determining that the current limit level becomes zero after decrementing, confirm that there is no IO traffic limit for the low-priority group.
14. The storage I / O request processing method according to claim 13, wherein In response to determining the gradual weakening of the IO traffic limit, the limit number of IO requests is calculated according to the following formula two; IOLimit(n) = IOLimit(n + 1) / Ratio Formula Two; Wherein, IOLimit(n) represents the limit number of IO requests when the limit level is n, IOLimi(n + 1) represents the limit number of IO requests when the limit level is n + 1, and Ratio represents the preset adjustment ratio.
15. The storage I / O request processing method according to claim 10, wherein The method further includes: In response to determining that the low-priority group reaches a preset maximum I / O traffic limit and the high-priority group still does not reach the first preset I / O performance state, re-adjust the number of paths in the exclusive path group and the shared path group, and return to the step of performing I / O performance detection on each member of the high-priority group.
16. The storage IO request processing method according to claim 15, wherein The re-adjusting the number of paths in the exclusive path group and the shared path group includes: Clearing the I / OPS limit of the low-priority group; Calculating the sum of the I / OPS of all members in the high-priority group to obtain a first sum value; Calculating the sum of the I / OPS of all members in the high-priority group and all members in the low-priority group to obtain a second sum value; Calculating the ratio of the first sum value to the second sum value to obtain a third ratio; Calculating a first product of the third ratio and the total number of paths, and updating the number of paths in the exclusive path group using the first product; and Calculating the difference between the total number of paths and the first product, and updating the number of paths in the shared path group using the difference.
17. The storage I / O request processing method according to claim 16, wherein Before the step of gradually weakening the I / O traffic limit for members in the low-priority group, the method further includes: Determining whether the exclusive path group and the shared path group have been re-adjusted; In response to determining that they have been re-adjusted, clearing the I / OPS limit of the low-priority group; and Restoring the number of paths in the exclusive path group and the shared path group to the number before re-adjustment, and returning to the step of performing I / O performance detection on each member of the high-priority group.
18. The storage IO request processing method according to claim 1, wherein The allocating the paths between the host and the storage system to a preset exclusive path group and a shared path group includes: Obtaining the total number of members in the high-priority group to obtain a first total number of members; Obtaining the total number of members in the high-priority group and the low-priority group to obtain a second total number of members; Calculating the ratio of the first total number of members to the second total number of members to obtain a fourth ratio; Calculating a second product of the fourth ratio and the total number of paths; Selecting a group of paths with the number of paths equal to the second product from all paths between the host and the storage system to obtain the exclusive path group; and Grouping the remaining paths to obtain the shared path group.
19. A storage I / O request processing device, characterized in that, For the host side, the device includes: A first allocation module for allocating the logical units that map the storage system to the host to a preset high-priority group and a low-priority group, wherein the application priorities corresponding to the logical units belonging to the high-priority group are all higher than the application priorities corresponding to the logical units belonging to the low-priority group; A second allocation module for allocating the paths between the host and the storage system to a preset exclusive path group and a shared path group, wherein both the exclusive path group and the shared path group include at least one path; A first path selection module for, in response to determining that the target logical unit corresponding to the storage I / O request to be issued belongs to the high-priority group, selecting the path with the least load from the exclusive path group and the shared path group to issue the storage I / O request; or The second path selection module is configured to, in response to determining that the target logical unit corresponding to the storage IO request to be issued belongs to the low-priority group, select the path with the least load from the shared path group and issue the storage IO request through the selected path.
20. An electronic device, characterized in that, Comprising: One or more processors; And A memory associated with the one or more processors, the memory being configured to store computer-readable instructions, and when the computer-readable instructions are read and executed by the one or more processors, implement the storage IO request processing method according to any one of claims 1 to 18.
21. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, implement the storage IO request processing method according to any one of claims 1 to 18.
Citation Information
Patent Citations
Providing optimized quality of service to prioritized virtual machines and applications based on quality of shared resources
CN104937584A
Routing method and device for shared storage resource path in heterogeneous network and related product
CN113992572A
Method, system and equipment for issuing data request by logical volume and medium
CN114816264A
Storage IO request processing method and device, electronic equipment and medium
CN117608867A
Dynamic bandwidth management on a storage system
US20210374078A1