IO management method, system, equipment and computer readable storage medium

文档序号:1904109 发布日期:2021-11-30 浏览:2次 中文

阅读说明:本技术 一种io管理方法、系统、设备及计算机可读存储介质 (IO management method, system, equipment and computer readable storage medium ) 是由 李志鹏 于 2021-07-29 设计创作,主要内容包括:本申请公开了一种IO管理方法、系统、设备及计算机可读存储介质,应用于双控存储服务器,确定第一控制器下发IO的第一数量值;确定第二控制器下发IO的第二数量值;获取预设的IO差值;判断第一数量值与第二数量值的差值是否大于等于IO差值;若第一数量值与第二数量值间的差值大于等于IO差值,则基于第一数量值与第二数量值的大小关系进行IO限流。本申请中,将第一控制器、第二控制器下发IO的数量值与IO差值进行比较,并根据相应比较结果对IO进行限流,以保证第一控制器处理IO效率与第二控制器处理IO效率的差值在预设范围内,避免出现缓存倾斜,可以提高用户体验性。(The application discloses an IO management method, system, device and computer readable storage medium, which are applied to a double-control storage server and used for determining a first quantity value of IO issued by a first controller; determining a second numerical value of IO issued by a second controller; acquiring a preset IO difference value; judging whether the difference value of the first numerical value and the second numerical value is larger than or equal to the IO difference value or not; if the difference between the first numerical value and the second numerical value is larger than or equal to the IO difference, IO current limiting is performed based on the magnitude relation between the first numerical value and the second numerical value. In the application, the numerical value of IO issued by the first controller and the second controller is compared with the IO difference value, and the IO is limited according to the corresponding comparison result, so that the difference value of the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is within a preset range, the buffer memory inclination is avoided, and the user experience can be improved.)

1. An IO management method is applied to a dual-control storage server and comprises the following steps:

determining a first quantity value of IO issued by a first controller;

determining a second numerical value of IO issued by a second controller;

acquiring a preset IO difference value, wherein the IO difference value represents a deviation value of the IO processing efficiency of the first controller and the IO processing efficiency of the second controller;

judging whether the difference value of the first numerical value and the second numerical value is larger than or equal to the IO difference value or not;

if the difference value between the first numerical value and the second numerical value is larger than or equal to the IO difference value, IO current limitation is carried out based on the magnitude relation between the first numerical value and the second numerical value, so that the difference value between the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is within a preset range.

2. The method of claim 1, wherein the determining whether the difference between the first quantity value and the second quantity value is greater than or equal to the IO difference comprises:

calculating a sum of the first and second quantitative values;

judging whether the sum is zero or not;

if the sum is zero, determining that the difference value between the first numerical value and the second numerical value is smaller than the IO difference value;

if the sum is not zero, calculating a first ratio of the first quantity value to the sum, calculating a first product value of the first ratio and 100, calculating a second ratio of the second quantity value to the sum, calculating a second product value of the second ratio and 100, calculating a second difference of 50 and the IO difference, and judging whether the first product value is smaller than the second difference;

if the first product value is smaller than or equal to the second difference value, determining that the difference value between the first quantity value and the second quantity value is larger than or equal to the IO difference value, and if the first product value is larger than the second difference value, determining whether the second product value is smaller than the second difference value;

if the second product value is smaller than or equal to the second difference value, determining that the difference value between the first quantity value and the second quantity value is larger than or equal to the IO difference value; and if the second product value is larger than the second difference value, judging that the difference value between the first quantity value and the second quantity value is smaller than the IO difference value.

3. The method of claim 2, wherein the limiting IO current based on the magnitude relationship between the first and second quantities comprises:

if the first product value is smaller than or equal to the second difference value, limiting the IO of the second controller;

and if the second product value is smaller than or equal to the second difference value, limiting the IO of the first controller.

4. The method of claim 3, wherein the limiting IO of the second controller comprises:

determining a first IO maximum value mirrored to the first controller by the second controller based on a current limiting strategy, and taking the IO maximum value as a current first IO mirror value;

if the second controller mirrors IO to the first controller, subtracting 1 from the current first IO mirror value; if the mirror image value returned by the first controller is received, adding 1 to the current first IO mirror image value;

judging whether the current first IO mirror image value is zero or not;

if the current first IO mirror image value is zero, forbidding the second controller to receive IO;

if the current first IO mirror image value is not zero, returning to the step of subtracting 1 from the current first IO mirror image value if the second controller mirrors IO to the first controller;

and if the first product value is larger than the second difference value, the first controller returns a mirror image value to the second controller after releasing IO of the mirror image of the second controller.

5. The method of claim 3, wherein the limiting IO of the first controller comprises:

determining a second IO maximum value mirrored from the first controller to the second controller based on a current limiting strategy, and taking the second IO maximum value as a current second IO mirror value;

if the second controller mirrors IO to the first controller, subtracting 1 from the current second IO mirror value; if the mirror image value returned by the first controller is received, adding 1 to the current second IO mirror image value;

judging whether the current second IO mirror image value is zero or not;

if the current second IO mirror image value is zero, forbidding the second controller to mirror IO to the first controller;

if the current second IO mirror image value is not zero, returning to the step of subtracting 1 from the current second IO mirror image value if the second controller mirrors IO to the first controller;

and if the second product value is larger than the second difference value, the first controller returns a mirror image value to the second controller after the first controller falls to the IO of the mirror image of the second controller.

6. The method of any of claims 1 to 5, wherein the determining the first quantity value of IO issued by the first controller comprises:

determining the number of cached IOs;

judging whether the IO quantity is larger than a preset value or not;

and if the IO quantity is larger than the preset value, executing the step of determining the first quantity value of the IO sent by the first controller.

7. The method of claim 6, wherein determining the second number of IOs issued by the second controller comprises:

determining the second numerical value of IOs of the second controller image received by the first controller.

8. An IO management system, applied to a dual-control storage server, includes:

the first determining module is used for determining a first quantity value of IO issued by the first controller;

the second determining module is used for determining a second numerical value of IO issued by the second controller;

the first obtaining module is used for obtaining a preset IO difference value, and the IO difference value represents a deviation value of the IO processing efficiency of the first controller and the IO processing efficiency of the second controller;

the first judgment module is used for judging whether the difference value of the first numerical value and the second numerical value is larger than or equal to the IO difference value or not; if the difference value between the first numerical value and the second numerical value is larger than or equal to the IO difference value, IO current limitation is carried out based on the magnitude relation between the first numerical value and the second numerical value, so that the difference value between the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is within a preset range.

9. An IO management device, comprising:

a memory for storing a computer program;

a processor for implementing the steps of the IO management method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the IO management method according to any one of claims 1 to 7.

Technical Field

The present application relates to the field of memory technologies, and in particular, to an IO management method, system, device, and computer-readable storage medium.

Background

At present, the information technology is rapidly developed, the reliability requirement on a storage system is increasingly urgent, a double-control storage server is born as the name suggests, the double-control storage server consists of two controllers, and when one controller fails, the other controller can manage the work of the failure controller to ensure the continuity of the service and prevent data loss. In the dual-control storage server, a cache mirroring mode is usually adopted to backup the IO issued by the host, and when the controller at one end fails, the controller at the other end can timely take the IO mirrored from the opposite end to the disk, so as to achieve the final purpose of no data loss.

However, in an actual application process, due to differences of disk media, there may be a great difference between IO drop speeds of two controllers, and the storage rate of the skew causes the cache of the skew, thereby generating a cache skew phenomenon. The cache tilt phenomenon can cause inconsistency of processing rates of double controls, so that the user feels that some volumes are processed quickly and some volumes are processed slowly, and in extreme cases, the situation that part of volumes do not process IO can be caused, and user experience is influenced.

In summary, how to improve the user experience of the dual-control storage server is a problem to be solved urgently by those skilled in the art.

Disclosure of Invention

The application aims to provide an IO management method, which can solve the technical problem of how to improve the user experience of a dual-control storage server to a certain extent. The application also provides an IO management system, equipment and a computer readable storage medium.

In order to achieve the above purpose, the present application provides the following technical solutions:

an IO management method is applied to a double-control storage server and comprises the following steps:

determining a first quantity value of IO issued by a first controller;

determining a second numerical value of IO issued by a second controller;

acquiring a preset IO difference value, wherein the IO difference value represents a deviation value of the IO processing efficiency of the first controller and the IO processing efficiency of the second controller;

judging whether the difference value of the first numerical value and the second numerical value is larger than or equal to the IO difference value or not;

if the difference value between the first numerical value and the second numerical value is larger than or equal to the IO difference value, IO current limitation is carried out based on the magnitude relation between the first numerical value and the second numerical value, so that the difference value between the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is within a preset range.

Preferably, the determining whether the difference between the first quantity value and the second quantity value is greater than or equal to the IO difference includes:

calculating a sum of the first and second quantitative values;

judging whether the sum is zero or not;

if the sum is zero, determining that the difference value between the first numerical value and the second numerical value is smaller than the IO difference value;

if the sum is not zero, calculating a first ratio of the first quantity value to the sum, calculating a first product value of the first ratio and 100, calculating a second ratio of the second quantity value to the sum, calculating a second product value of the second ratio and 100, calculating a second difference of 50 and the IO difference, and judging whether the first product value is smaller than the second difference;

if the first product value is smaller than or equal to the second difference value, determining that the difference value between the first quantity value and the second quantity value is larger than or equal to the IO difference value, and if the first product value is larger than the second difference value, determining whether the second product value is smaller than the second difference value;

if the second product value is smaller than or equal to the second difference value, determining that the difference value between the first quantity value and the second quantity value is larger than or equal to the IO difference value; and if the second product value is larger than the second difference value, judging that the difference value between the first quantity value and the second quantity value is smaller than the IO difference value.

Preferably, the limiting IO currents based on the magnitude relationship between the first quantity value and the second quantity value includes:

if the first product value is smaller than or equal to the second difference value, limiting the IO of the second controller;

and if the second product value is smaller than or equal to the second difference value, limiting the IO of the first controller.

Preferably, the limiting the IO of the second controller includes:

determining a first IO maximum value mirrored to the first controller by the second controller based on a current limiting strategy, and taking the IO maximum value as a current first IO mirror value;

if the second controller mirrors IO to the first controller, subtracting 1 from the current first IO mirror value; if the mirror image value returned by the first controller is received, adding 1 to the current first IO mirror image value;

judging whether the current first IO mirror image value is zero or not;

if the current first IO mirror image value is zero, forbidding the second controller to receive IO;

if the current first IO mirror image value is not zero, returning to the step of subtracting 1 from the current first IO mirror image value if the second controller mirrors IO to the first controller;

and if the first product value is larger than the second difference value, the first controller returns a mirror image value to the second controller after releasing IO of the mirror image of the second controller.

Preferably, the limiting the IO of the first controller includes:

determining a second IO maximum value mirrored from the first controller to the second controller based on a current limiting strategy, and taking the second IO maximum value as a current second IO mirror value;

if the second controller mirrors IO to the first controller, subtracting 1 from the current second IO mirror value; if the mirror image value returned by the first controller is received, adding 1 to the current second IO mirror image value;

judging whether the current second IO mirror image value is zero or not;

if the current second IO mirror image value is zero, forbidding the second controller to mirror IO to the first controller;

if the current second IO mirror image value is not zero, returning to the step of subtracting 1 from the current second IO mirror image value if the second controller mirrors IO to the first controller;

and if the second product value is larger than the second difference value, the first controller returns a mirror image value to the second controller after the first controller falls to the IO of the mirror image of the second controller.

Preferably, the determining a first quantity value of the IO issued by the first controller includes:

determining the number of cached IOs;

judging whether the IO quantity is larger than a preset value or not;

and if the IO quantity is larger than the preset value, executing the step of determining the first quantity value of the IO sent by the first controller.

Preferably, the determining the second numerical value of the IO issued by the second controller includes:

determining the second numerical value of IOs of the second controller image received by the first controller.

An IO management system is applied to a dual-control storage server and comprises:

the first determining module is used for determining a first quantity value of IO issued by the first controller;

the second determining module is used for determining a second numerical value of IO issued by the second controller;

the first obtaining module is used for obtaining a preset IO difference value, and the IO difference value represents a deviation value of the IO processing efficiency of the first controller and the IO processing efficiency of the second controller;

the first judgment module is used for judging whether the difference value of the first numerical value and the second numerical value is larger than or equal to the IO difference value or not; if the difference value between the first numerical value and the second numerical value is larger than or equal to the IO difference value, IO current limitation is carried out based on the magnitude relation between the first numerical value and the second numerical value, so that the difference value between the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is within a preset range.

An IO management device, comprising:

a memory for storing a computer program;

a processor, configured to implement the steps of the IO management method as described above when executing the computer program.

A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the IO management method as set forth in any one of the above.

The IO management method is applied to a double-control storage server and used for determining a first quantity value of IO issued by a first controller; determining a second numerical value of IO issued by a second controller; acquiring a preset IO difference value, wherein the IO difference value represents a deviation value of IO efficiency processing of the first controller and IO efficiency processing of the second controller; judging whether the difference value of the first numerical value and the second numerical value is larger than or equal to the IO difference value or not; if the difference between the first numerical value and the second numerical value is larger than or equal to the IO difference, IO current limiting is performed based on the magnitude relation between the first numerical value and the second numerical value. In the application, the difference value of the IO processing efficiency of the first controller and the IO processing efficiency of the second controller can be judged by comparing the numerical value of the IO issued by the first controller and the second controller with the IO difference value, and the IO can be limited according to the corresponding judgment result, so that the difference value of the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is within the preset range, the buffer memory inclination is avoided, and the user experience can be improved. The IO management system, the IO management equipment and the computer readable storage medium solve the corresponding technical problems.

Drawings

In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.

Fig. 1 is a flowchart of an IO management method according to an embodiment of the present application;

fig. 2 is a schematic structural diagram of an IO management system according to an embodiment of the present application;

fig. 3 is a schematic structural diagram of an IO management device according to an embodiment of the present application;

fig. 4 is another schematic structural diagram of an IO management device according to an embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

Referring to fig. 1, fig. 1 is a flowchart of an IO management method according to an embodiment of the present disclosure.

The IO management method provided in the embodiment of the present application is applied to a dual-control storage server, and may include the following steps:

step S101: determining a first quantity value of IO issued by the first controller.

Step S102: determining a second numerical value of the issued IO by the second controller.

In practical application, because the cache tilt phenomenon is caused by the fact that the first controller and the second controller process the IO at different speeds, and the difference value of the number of processed IO between the two controllers affects the difference value of the efficiency of the two controllers in processing the IO, the first numerical value of the IO issued by the first controller needs to be determined, and the second numerical value of the IO issued by the second controller needs to be determined.

Step S103: and acquiring a preset IO difference value, wherein the IO difference value represents a deviation value of the IO processing efficiency of the first controller and the IO processing efficiency of the second controller.

In practical application, after determining a first numerical value of an IO issued by a first controller and a second numerical value of an IO issued by a second controller, in order to know a difference value of IP processing efficiencies of the two controllers through the IO numerical value, a deviation value of the IO processing efficiency of the first controller and the IO processing efficiency of the second controller can be converted into a difference value of the IO numerical value, that is, a preset IO difference value can be obtained, so that IO speed limitation can be performed according to the IO difference value subsequently.

Step S104: judging whether the difference value of the first numerical value and the second numerical value is larger than or equal to the IO difference value or not; if the difference between the first quantity value and the second quantity value is greater than or equal to the IO difference, step S105 is performed.

Step S105: and carrying out IO current limiting based on the magnitude relation between the first numerical value and the second numerical value so as to enable the difference value of the IO processing efficiency of the first controller and the IO processing efficiency of the second controller to be within a preset range.

In practical application, after a preset IO difference value is obtained, whether the difference value between the first numerical value and the second numerical value is larger than or equal to the IO difference value or not can be judged; if the difference between the first numerical value and the second numerical value is larger than or equal to the IO difference, IO current limitation is performed based on the magnitude relation between the first numerical value and the second numerical value, so that the difference between the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is within a preset range. For example, under the condition that the first numerical value is greater than the second numerical value, it is indicated that the amount of IO processed by the first controller is greater, and at this time, the IO of the first controller can be limited to reduce the amount of IO processed by the first controller, so that the difference between the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is reduced, and the occurrence of the cache tilt phenomenon is avoided.

The IO management method is applied to a double-control storage server and used for determining a first quantity value of IO issued by a first controller; determining a second numerical value of IO issued by a second controller; acquiring a preset IO difference value, wherein the IO difference value represents a deviation value of IO efficiency processing of the first controller and IO efficiency processing of the second controller; judging whether the difference value of the first numerical value and the second numerical value is larger than or equal to the IO difference value or not; if the difference between the first numerical value and the second numerical value is larger than or equal to the IO difference, IO current limiting is performed based on the magnitude relation between the first numerical value and the second numerical value. In the application, the difference value of the IO processing efficiency of the first controller and the IO processing efficiency of the second controller can be judged by comparing the numerical value of the IO issued by the first controller and the second controller with the IO difference value, and the IO can be limited according to the corresponding judgment result, so that the difference value of the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is within the preset range, the buffer memory inclination is avoided, and the user experience can be improved.

In the IO management method provided by the application, in the process of judging whether the difference value between the first numerical value and the second numerical value is greater than or equal to the IO difference value, because the difference value between the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is a performance difference value, and the percentage of the IO number can well reflect the performance difference value, the dual-control storage server can calculate the sum value of the first numerical value and the second numerical value; judging whether the sum value is zero or not; if the sum is zero, judging that the difference value of the first numerical value and the second numerical value is smaller than the IO difference value; if the sum value is not zero, calculating a first ratio of the first numerical value to the sum value, calculating a first product value of the first ratio and 100, calculating a second ratio of the second numerical value to the sum value, calculating a second product value of the second ratio and 100, calculating a second difference value of the 50 and IO difference values, and judging whether the first product value is smaller than the second difference value; if the first product value is smaller than or equal to the second difference value, judging that the difference value between the first quantity value and the second quantity value is larger than or equal to the IO difference value, and if the first product value is larger than the second difference value, judging whether the second product value is smaller than the second difference value; if the second product value is smaller than or equal to the second difference value, the difference value between the first numerical value and the second numerical value is judged to be larger than or equal to the IO difference value; if the second product value is greater than the second difference value, the difference value between the first quantity value and the second quantity value is smaller than the IO difference value.

For convenience of understanding, it is assumed that a first quantity of the IO issued by the first controller is denoted as owercount, a second quantity of the IO issued by the second controller is denoted as nenoewnercount, the first quantity and the second quantity are added to obtain a total IO quantity which is denoted as totalCount, and if the totalCount is 0, it is determined that a difference value between the first quantity value and the second quantity value is smaller than an IO difference value; if the totalCount is not 0, (owercount/totalCount) × 100 is calculated as the owerpercent value, and if the IO difference is totalCount, at this time, if the owerpercent value is equal to or less than (50-tolededevation), it may be determined that the difference between the first magnitude and the second magnitude is equal to or greater than the IO difference, if the owerpercent value is greater than (50-tolededevation), it may be calculated (oneowercount/totalCount) × 100 as the oneowerpercent value, if the owerpercent value is equal to or less than (50-tolededevation), it may be determined that the difference between the first magnitude and the second magnitude is equal to or greater than the IO difference, and if the oneolpercent value is greater than (50-tolededevation), it may be determined that the IO difference between the first magnitude and the second magnitude is less than or equal to the IO difference.

In the IO management method provided by the application, in the process of performing IO current limiting based on the magnitude relation between the first numerical value and the second numerical value, if the first product value is less than or equal to the second difference value, the IO of the second controller needs to be limited; if the second product value is less than or equal to the second difference value, the IO of the first controller needs to be limited.

In practical application, in the process of current limiting the IO of the second controller, because the second controller is used as a master controller, the IO is mirrored to the first controller, and the number of the mirrored IO affects the IO management efficiency between the two controllers, the number of the mirrored IO given to the first controller by the second controller can be limited to perform IO current limiting on the second controller, that is, the maximum IO value mirrored to the first controller by the second controller can be determined based on a current limiting policy, and the maximum IO value is used as the current first IO mirror value; if the second controller mirrors the IO to the first controller, subtracting 1 from the current first IO mirror value; if receiving a mirror image value returned by the first controller, adding 1 to the current first IO mirror image value; judging whether the current first IO mirror image value is zero or not; if the current first IO mirror image value is zero, the second controller is forbidden to receive IO; if the current first IO mirror image value is not zero, returning to the step of subtracting 1 from the current first IO mirror image value if the second controller mirrors IO to the first controller; and if the first product value is larger than the second difference value, the first controller returns a mirror image value to the second controller after releasing IO of the mirror image of the second controller. It should be noted that the second controller may remind the first controller to release the mirrored IO after the IO is dropped.

Correspondingly, in the process of limiting the IO of the first controller, if the first controller is the master controller and the issued IO can reach the first controller first, the dual-control storage server may determine a second IO maximum value mirrored to the second controller by the first controller based on the current limiting policy, and take the second IO maximum value as a current second IO mirror value; if the first controller mirrors IO to the second controller, subtracting 1 from the current second IO mirror value; if the mirror image value returned by the second controller is received, adding 1 to the current second IO mirror image value; judging whether the current second IO mirror image value is zero or not; if the current second IO mirror image value is zero, the second controller is forbidden to receive IO; if the current second IO mirror image value is not zero, returning to the step of subtracting 1 from the current second IO mirror image value if the first controller mirrors IO to the second controller; and if the second product value is larger than the second difference value, the second controller returns a mirror image value to the first controller after releasing IO of the mirror image of the first controller.

In a specific application scenario, a situation that the first controller is a main controller but the issued IO can be transmitted to the first controller only through the second controller exists, at this time, during the process of limiting the IO of the first controller, the dual-control storage server may determine a second IO maximum value mirrored from the first controller to the second controller based on a current limiting policy, and take the second IO maximum value as a current second IO mirror value; if the second controller mirrors IO to the first controller, subtracting 1 from the current second IO mirror value; if the mirror image value returned by the first controller is received, adding 1 to the current second IO mirror image value; judging whether the current second IO mirror image value is zero or not; if the current second IO mirror image value is zero, forbidding the second controller to mirror IO to the first controller; if the current second IO mirror image value is not zero, returning to the step of subtracting 1 from the current second IO mirror image value if the second controller mirrors IO to the first controller; and if the second product value is larger than the second difference value, the first controller returns the mirror image value to the second controller after the first controller falls to the IO of the mirror image of the second controller.

It should be noted that the first IO maximum value and the second IO maximum value may be the same or different, and the application is not specifically limited herein.

For ease of understanding, assume that the first controller is a and the second controller is B, each of a and B having two pools: the OWNER pool and the NONE _ OWNER pool are used for respectively caching IO issued by the local terminal and IO mirrored by the opposite terminal; a and B both have state variable states, and the states have only three states: NONE, OWNER, NONE _ OWNER, represent not limiting, OWNER pool limiting, NONE _ OWNER pool limiting respectively; let credit represent the maximum value of the corresponding mirror IO; starting current limiting of an OWNER pool when the value of owerPercent is less than or equal to (50-tolleredDeviation), setting the state of the controller at the local end as OWNER, starting current limiting of a NON _ OWNER pool when the value of nonewnerPercent is less than or equal to (50-tolleredDeviation), and setting the state of the controller at the local end as NON _ OWNER; the current limiting process may be as follows:

assuming that the issued IO belongs to the A control, that is, the A is the main controller, the issued IO is firstly put into the A control OWNER pool, then the issued IO is mirrored to the B control NONE _ OWNER pool, the marginal is consumed in the mirroring process, each IO is mirrored to the opposite end, the value of the marginal at the local end is reduced by one, after the IO controlled by the A falls off the disk, the B control NONE _ OWNER pool is informed to release the past IO of the mirror, and after the IO is released by the B control, the state of the pool corresponding to the B control is judged: if the state is NONE _ OWNER, not returning the credit to the A control, and simultaneously informing the A control that the release is successful, if the state is NONE _ OWNER, returning all credits to the A control, and simultaneously informing the A control that the release is successful, when the credit of the A control is reduced to 0, processing IO after waiting for the B control to return the credit, or waiting;

correspondingly, if the issued IO belongs to B-control, that is, B is the main control, but at this time, the IO still reaches a first time, the issued IO may be placed into an a-control NONE _ ower pool first, and then mirrored into a B-control ower pool, a credit may be consumed in the mirroring process, a credit value decreases by one for each IO of the opposite-end mirror, after the IO of B-control falls, the past IO of the ower pool mirror may be released, and after the IO of B-control is released, the state of the pool corresponding to B-control may be determined: if the state is OWNER, not returning the credit to the A control, and simultaneously informing that the A control has been successfully released, if the state is NONE or NONE _ OWNER, returning all credits to the A control, and simultaneously informing that the A control has been successfully released, when the credit of the A control is reduced to 0, processing IO after waiting for the B control to return the credit, or waiting for the other; at this time, it may also be that the issued IO is first put into the B-controlled OWNER pool, and then mirrored to the a-controlled NONE _ OWNER pool, credit may be consumed in the mirroring process, and each time an IO is mirrored to the opposite end, the value of the credit at the local end is reduced by one, after the IO controlled by B falls, the IO mirrored from the NONE _ OWNER pool may be released by a, and after the IO is released by a control, the state of the pool corresponding to the a-control may be determined: if the state is NONE _ OWNER, not returning the credit to the B control, and simultaneously informing that the B control has been successfully released, if the state is NONE _ OWNER, returning all credits to the B control, and simultaneously informing that the B control has been successfully released, when the credit of the B control is reduced to 0, processing IO after waiting for the A control to return the credit, or else, waiting.

In the IO management method provided by the application, the double-control storage server can determine the number of the cached IOs in the process of determining the first quantity value of the IOs issued by the first controller; judging whether the IO quantity is larger than a preset value or not; and if the IO quantity is larger than the preset value, executing the step of determining the first quantity value of the IO sent by the first controller. That is, the IO management method provided by the present application may be executed only when the resources of the dual-control storage server are in shortage, and in addition, in practical application, the IO management method provided by the present application may also be executed at regular time, and the present application is not limited specifically herein.

In the IO management method provided by the application, in the process that the dual-control storage server determines the second quantity value of the IO sent by the second controller, because the number of the IO of the second controller image is also the number of the IO sent by the second controller, the second quantity value of the IO of the second controller image received by the first controller can be determined.

Referring to fig. 2, fig. 2 is a schematic structural diagram of an IO management system according to an embodiment of the present disclosure.

An IO management system provided in an embodiment of the present application, applied to a dual-control storage server, may include:

a first determining module 101, configured to determine a first quantity value of an IO issued by a first controller;

a second determining module 102, configured to determine a second numerical value of the IO issued by the second controller;

the first obtaining module 103 is configured to obtain a preset IO difference value, where the IO difference value represents a deviation value between the IO processing efficiency of the first controller and the IO processing efficiency of the second controller;

a first determining module 104, configured to determine whether a difference between the first numerical value and the second numerical value is greater than or equal to an IO difference; if the difference between the first numerical value and the second numerical value is larger than or equal to the IO difference, IO current limitation is performed based on the magnitude relation between the first numerical value and the second numerical value, so that the difference between the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is within a preset range.

The IO management system provided in the embodiment of the present application is applied to a dual-control storage server, and the first determining module may include:

a first calculation unit for calculating a sum of the first and second numerical values;

a first judgment unit configured to judge whether the sum is zero; if the sum is zero, judging that the difference value of the first numerical value and the second numerical value is smaller than the IO difference value; if the sum value is not zero, calculating a first ratio of the first numerical value to the sum value, calculating a first product value of the first ratio and 100, calculating a second ratio of the second numerical value to the sum value, calculating a second product value of the second ratio and 100, calculating a second difference value of the 50 and IO difference values, and judging whether the first product value is smaller than the second difference value; if the first product value is smaller than or equal to the second difference value, judging that the difference value between the first quantity value and the second quantity value is larger than or equal to the IO difference value, and if the first product value is larger than the second difference value, judging whether the second product value is smaller than the second difference value; if the second product value is smaller than or equal to the second difference value, the difference value between the first numerical value and the second numerical value is judged to be larger than or equal to the IO difference value; if the second product value is greater than the second difference value, the difference value between the first quantity value and the second quantity value is smaller than the IO difference value.

The IO management system provided in the embodiment of the present application is applied to a dual-control storage server, and the first determining module may include:

the first current limiting unit is used for limiting the IO of the second controller if the first product value is smaller than or equal to the second difference value;

and the second current limiting unit is used for limiting the IO of the first controller if the second product value is less than or equal to the second difference value.

The IO management system provided in the embodiment of the present application is applied to a dual-control storage server, and the first current limiting unit may specifically be configured to: determining a first IO maximum value mirrored to the first controller by the second controller based on a current limiting strategy, and taking the IO maximum value as a current first IO mirror value; if the second controller mirrors the IO to the first controller, subtracting 1 from the current first IO mirror value; if receiving a mirror image value returned by the first controller, adding 1 to the current first IO mirror image value; judging whether the current first IO mirror image value is zero or not; if the current first IO mirror image value is zero, the second controller is forbidden to receive IO; if the current first IO mirror image value is not zero, returning to the step of subtracting 1 from the current first IO mirror image value if the second controller mirrors IO to the first controller; and if the first product value is larger than the second difference value, the first controller returns a mirror image value to the second controller after releasing IO of the mirror image of the second controller.

The IO management system provided in the embodiment of the present application is applied to a dual-control storage server, and the second current limiting unit may specifically be configured to: determining a second IO maximum value mirrored from the first controller to the second controller based on the current limiting strategy, and taking the second IO maximum value as a current second IO mirror value; if the second controller mirrors IO to the first controller, subtracting 1 from the current second IO mirror value; if the mirror image value returned by the first controller is received, adding 1 to the current second IO mirror image value; judging whether the current second IO mirror image value is zero or not; if the current second IO mirror image value is zero, forbidding the second controller to mirror IO to the first controller; if the current second IO mirror image value is not zero, returning to the step of subtracting 1 from the current second IO mirror image value if the second controller mirrors IO to the first controller; and if the second product value is larger than the second difference value, the first controller returns the mirror image value to the second controller after the first controller falls to the IO of the mirror image of the second controller.

An IO management system provided in an embodiment of the present application is applied to a dual-control storage server, where the first determining module may include:

the first determining unit is used for determining the number of the cached IOs;

the second judging unit is used for judging whether the IO quantity is larger than a preset value or not; and if the IO quantity is larger than the preset value, executing the step of determining the first quantity value of the IO sent by the first controller.

The IO management system provided in the embodiment of the present application is applied to a dual-control storage server, and the second determining module may include:

and the second determining unit is used for determining a second numerical value of IO of the second controller image received by the first controller.

The application also provides an IO management device and a computer readable storage medium, which both have the corresponding effects of the IO management method provided by the embodiment of the application. Referring to fig. 3, fig. 3 is a schematic structural diagram of an IO management device according to an embodiment of the present disclosure.

The IO management device provided in the embodiment of the present application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program:

determining a first quantity value of IO issued by a first controller;

determining a second numerical value of IO issued by a second controller;

acquiring a preset IO difference value, wherein the IO difference value represents a deviation value of IO efficiency processing of the first controller and IO efficiency processing of the second controller;

judging whether the difference value of the first numerical value and the second numerical value is larger than or equal to the IO difference value or not;

if the difference between the first numerical value and the second numerical value is larger than or equal to the IO difference, IO current limitation is performed based on the magnitude relation between the first numerical value and the second numerical value, so that the difference between the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is within a preset range.

The IO management device provided in the embodiment of the present application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program: calculating a sum of the first and second magnitude values; judging whether the sum value is zero or not; if the sum is zero, judging that the difference value of the first numerical value and the second numerical value is smaller than the IO difference value; if the sum value is not zero, calculating a first ratio of the first numerical value to the sum value, calculating a first product value of the first ratio and 100, calculating a second ratio of the second numerical value to the sum value, calculating a second product value of the second ratio and 100, calculating a second difference value of the 50 and IO difference values, and judging whether the first product value is smaller than the second difference value; if the first product value is smaller than or equal to the second difference value, judging that the difference value between the first quantity value and the second quantity value is larger than or equal to the IO difference value, and if the first product value is larger than the second difference value, judging whether the second product value is smaller than the second difference value; if the second product value is smaller than or equal to the second difference value, the difference value between the first numerical value and the second numerical value is judged to be larger than or equal to the IO difference value; if the second product value is greater than the second difference value, the difference value between the first quantity value and the second quantity value is smaller than the IO difference value.

The IO management device provided in the embodiment of the present application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program: if the first product value is smaller than or equal to the second difference value, limiting the IO of the second controller; and if the second product value is smaller than or equal to the second difference value, limiting the IO of the first controller.

The IO management device provided in the embodiment of the present application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program: determining a first IO maximum value mirrored to the first controller by the second controller based on a current limiting strategy, and taking the IO maximum value as a current first IO mirror value; if the second controller mirrors the IO to the first controller, subtracting 1 from the current first IO mirror value; if receiving a mirror image value returned by the first controller, adding 1 to the current first IO mirror image value; judging whether the current first IO mirror image value is zero or not; if the current first IO mirror image value is zero, the second controller is forbidden to receive IO; if the current first IO mirror image value is not zero, returning to the step of subtracting 1 from the current first IO mirror image value if the second controller mirrors IO to the first controller; and if the first product value is larger than the second difference value, the first controller returns a mirror image value to the second controller after releasing IO of the mirror image of the second controller.

The IO management device provided in the embodiment of the present application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program: determining a second IO maximum value mirrored from the first controller to the second controller based on the current limiting strategy, and taking the second IO maximum value as a current second IO mirror value; if the second controller mirrors IO to the first controller, subtracting 1 from the current second IO mirror value; if the mirror image value returned by the first controller is received, adding 1 to the current second IO mirror image value; judging whether the current second IO mirror image value is zero or not; if the current second IO mirror image value is zero, forbidding the second controller to mirror IO to the first controller; if the current second IO mirror image value is not zero, returning to the step of subtracting 1 from the current second IO mirror image value if the second controller mirrors IO to the first controller; and if the second product value is larger than the second difference value, the first controller returns the mirror image value to the second controller after the first controller falls to the IO of the mirror image of the second controller.

The IO management device provided in the embodiment of the present application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program: determining the number of cached IOs; judging whether the IO quantity is larger than a preset value or not; and if the IO quantity is larger than the preset value, executing the step of determining the first quantity value of the IO sent by the first controller.

The IO management device provided in the embodiment of the present application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program: a second numerical value of IOs of the second controller image received by the first controller is determined.

Referring to fig. 4, another IO management device provided in the embodiment of the present application may further include: an input port 203 connected to the processor 202, for transmitting externally input commands to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing result of the processor 202 to the outside; and the communication module 205 is connected to the processor 202 and is configured to implement communication between the IO management device and the outside world. The display unit 204 may be a display panel, a laser scanning display, or the like; the communication method adopted by the communication module 205 includes, but is not limited to, mobile high definition link technology (HML), Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), and wireless connection: wireless fidelity technology (WiFi), bluetooth communication technology, bluetooth low energy communication technology, ieee802.11s based communication technology.

A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps:

determining a first quantity value of IO issued by a first controller;

determining a second numerical value of IO issued by a second controller;

acquiring a preset IO difference value, wherein the IO difference value represents a deviation value of IO efficiency processing of the first controller and IO efficiency processing of the second controller;

judging whether the difference value of the first numerical value and the second numerical value is larger than or equal to the IO difference value or not;

if the difference between the first numerical value and the second numerical value is larger than or equal to the IO difference, IO current limitation is performed based on the magnitude relation between the first numerical value and the second numerical value, so that the difference between the IO processing efficiency of the first controller and the IO processing efficiency of the second controller is within a preset range.

A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: calculating a sum of the first and second magnitude values; judging whether the sum value is zero or not; if the sum is zero, judging that the difference value of the first numerical value and the second numerical value is smaller than the IO difference value; if the sum value is not zero, calculating a first ratio of the first numerical value to the sum value, calculating a first product value of the first ratio and 100, calculating a second ratio of the second numerical value to the sum value, calculating a second product value of the second ratio and 100, calculating a second difference value of the 50 and IO difference values, and judging whether the first product value is smaller than the second difference value; if the first product value is smaller than or equal to the second difference value, judging that the difference value between the first quantity value and the second quantity value is larger than or equal to the IO difference value, and if the first product value is larger than the second difference value, judging whether the second product value is smaller than the second difference value; if the second product value is smaller than or equal to the second difference value, the difference value between the first numerical value and the second numerical value is judged to be larger than or equal to the IO difference value; if the second product value is greater than the second difference value, the difference value between the first quantity value and the second quantity value is smaller than the IO difference value.

A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: if the first product value is smaller than or equal to the second difference value, limiting the IO of the second controller; and if the second product value is smaller than or equal to the second difference value, limiting the IO of the first controller.

A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: determining a first IO maximum value mirrored to the first controller by the second controller based on a current limiting strategy, and taking the IO maximum value as a current first IO mirror value; if the second controller mirrors the IO to the first controller, subtracting 1 from the current first IO mirror value; if receiving a mirror image value returned by the first controller, adding 1 to the current first IO mirror image value; judging whether the current first IO mirror image value is zero or not; if the current first IO mirror image value is zero, the second controller is forbidden to receive IO; if the current first IO mirror image value is not zero, returning to the step of subtracting 1 from the current first IO mirror image value if the second controller mirrors IO to the first controller; and if the first product value is larger than the second difference value, the first controller returns a mirror image value to the second controller after releasing IO of the mirror image of the second controller.

A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: determining a second IO maximum value mirrored from the first controller to the second controller based on the current limiting strategy, and taking the second IO maximum value as a current second IO mirror value; if the second controller mirrors IO to the first controller, subtracting 1 from the current second IO mirror value; if the mirror image value returned by the first controller is received, adding 1 to the current second IO mirror image value; judging whether the current second IO mirror image value is zero or not; if the current second IO mirror image value is zero, forbidding the second controller to mirror IO to the first controller; if the current second IO mirror image value is not zero, returning to the step of subtracting 1 from the current second IO mirror image value if the second controller mirrors IO to the first controller; and if the second product value is larger than the second difference value, the first controller returns the mirror image value to the second controller after the first controller falls to the IO of the mirror image of the second controller.

A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: determining the number of cached IOs; judging whether the IO quantity is larger than a preset value or not; and if the IO quantity is larger than the preset value, executing the step of determining the first quantity value of the IO sent by the first controller.

A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: a second numerical value of IOs of the second controller image received by the first controller is determined.

The computer-readable storage media to which this application relates include Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage media known in the art.

For a description of a relevant part in an IO management system, an IO management device, and a computer-readable storage medium provided in the embodiments of the present application, please refer to a detailed description of a corresponding part of an IO management method provided in the embodiments of the present application, which is not described herein again. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.

It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种独立冗余磁盘阵列的重构方法、装置、设备及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类