CC verification method and related device

By analyzing historical IO delay change information, CC verification execution parameters are configured to avoid conflicts with the upper-level business, the problem of impact of CC work on RAID groups is solved, CC verification is achieved in low-delay time periods, and users are enhanced Experience and RAID group performance.

CN118963650APending Publication Date: 2024-11-15XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410984663.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the scenario where software RAID controls RAID groups, CC verification work may be performed simultaneously with the upper-level services, resulting in larger IO delays and lower read and write speeds, affecting the user experience.

Method used

By analyzing the delay change information of historical IO operations, determining the low-delay time period, and configuring the execution parameters of CC verification, such as detection time period and detection period, to avoid CC work from preempting the logical resources of the upper-level business. Reduce adverse effects on upper-level businesses.

Benefits of technology

It effectively reduces the adverse impact of CC work on the upper-level business, improves the user experience, and completes CC verification without the user's perception, ensuring the integrity of RAID group data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118963650A_ABST
    Figure CN118963650A_ABST
Patent Text Reader

Abstract

The CC verification method comprises the following steps: acquiring time delay change information of a historical IO operation on a Raid card; determining at least one low-delay time period according to the delay change information; and determining an execution parameter of CC verification according to the at least one low-delay time period. According to the method and the device, the CC is arranged in the time period with the relatively low IO time delay of the upper-layer service, so that the CC is prevented from working to preempt logic resources of the upper-layer service, the adverse effect of the CC working on the upper-layer service is reduced, and the working performance of the upper-layer service is ensured, so that the CC working can be performed under the condition that a user does not perceive, and the use experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of servers, and in particular to a CC verification method and related devices. Background Art

[0002] With the development of virtual hard disk technology, software RAID has been widely used. In the scenario where software RAID controls a RAID group, in order to ensure the integrity of the data in the RAID group, a consistency check (CC) is required. Generally, the CC execution cycle is set to periodic execution by default, so there may be a situation where CC and upper-layer services are executed at the same time, which has an adverse impact on the upper-layer services, such as increased IO latency, lower read and write speeds, and other problems. Summary of the invention

[0003] The embodiments of the present application provide a CC verification method and related devices, which reduce the adverse impact of CC work on upper-layer services and improve user experience.

[0004] In a first aspect, an embodiment of the present application provides a CC verification method, including: obtaining latency change information of historical IO operations on a Raid card; determining at least one low latency time period based on the latency change information; and determining execution parameters of CC verification based on at least one low latency time period.

[0005] In the technical solution of the present application, the execution parameters of CC verification are configured by analyzing the time periods of lower IO latency when the upper-layer business reads and writes the RAID disk group in the past. In other words, by setting the CC verification in the time period of lower IO latency of the upper-layer business, the CC work is prevented from "seizing" the logical resources of the upper-layer business, the adverse impact of the CC work on the upper-layer business is reduced, and the working performance of the upper-layer business is guaranteed. In addition, CC work can be performed without the user's perception, which improves the user experience.

[0006] In a possible implementation, the execution parameter includes a start time. The above-mentioned determining the execution parameter of the CC check according to at least one low latency time period includes: determining a detection time period according to at least one low latency time period; and determining a parameter value of the start time according to the start time of the detection time period.

[0007] In this implementation, by analyzing at least one low-latency time period, a detection time period that meets user needs is obtained, and the starting time of the detection time period is the start time of CC, ensuring that CC verification is performed during a time period when the IO delay of the upper-layer business is low. Exemplarily, by analyzing the delay change information of historical IO operations on the Raid card, it is obtained that the low-latency time period is from 1:00 to 3:00 a.m. every Monday, then the detection time period of CC verification is set to 1:00 to 3:00 a.m. every Monday, and the parameter value of the startup time is set to 1:00 a.m. every Monday.

[0008] In a possible implementation, determining the detection time period based on at least one low-latency time period includes: calculating an overlapping portion of at least one low-latency time period; and determining the detection time period based on a time period corresponding to the overlapping portion.

[0009] In this implementation, the overlapping part of at least one low-latency time period is set as the detection time period, thereby ensuring that in different cycles, CC verification work is performed in the time period with low IO delay of the upper-layer business, reducing the adverse effects of CC work in different cycles on the upper-layer business. Selecting the time period corresponding to the overlapping parts in multiple first cycles and determining it as the startup time can avoid the adverse effects of CC on the upper-layer business to the greatest extent. Exemplarily, by analyzing the latency change information of historical IO operations on the Raid card for one month, the low-latency time period of the first and third weeks is obtained to be from 1 am to 3 am on Monday, the low-latency time period of the second and fourth weeks is from 2 am to 4 am on Monday, and the overlapping part of the low-latency time period of the four weeks in the month corresponds to the time period from 2 am to 3 am on Monday, then the detection time period of CC verification is set to 2 am to 3 am every Monday, and then the parameter value of the startup time is set to 2 am every Monday.

[0010] In a possible implementation, the execution parameter includes a detection period. The above-mentioned determining the execution parameter of the CC check according to at least one low-latency time period includes: determining the detection period according to at least one low-latency time period; and determining the parameter value of the detection period of the CC check according to the cycle period of the detection period.

[0011] In this implementation, the execution parameters also include a detection cycle. According to the cycle period of the detection time period, the parameter value of the detection cycle of the CC check is determined, so that the CC check can be periodically executed. Exemplarily, by analyzing the latency change information of the historical IO operations on the Raid card, it is obtained that the low latency time period is from 1:00 to 3:00 a.m. every Monday, then the detection time period of the CC check is set to 1:00 to 3:00 a.m. every Monday, and the cycle period of the detection time period is weekly, then the parameter value of the detection cycle of the CC check is determined to be set to weekly, that is, every seven days. Exemplarily, by analyzing the latency change information of historical IO operations on the Raid card, it is obtained that the low latency time period is from 1:00 to 3:00 a.m. every five days, such as 1:00 to 3:00 a.m. on Sunday in the first week, 1:00 to 3:00 a.m. on Friday in the second week, 1:00 to 3:00 a.m. on Wednesday in the third week, and 1:00 to 3:00 a.m. on Monday in the fourth week. The detection time period of CC verification is set to 1:00 to 3:00 a.m. every five days, and the cycle period of the detection time period is every five days, so the parameter value of the detection period of CC verification is determined to be set to every five days.

[0012] In a possible implementation, the above-mentioned determining the parameter value of the detection period of the CC check according to the cycle period of the detection time period includes: when the first cycle is used as the cycle period and there is an overlapping part in the detection time period, determining the first cycle as the parameter value of the detection period; when the first cycle is used as the cycle period and there is no overlapping part in the detection time period, determining the second cycle as the parameter value of the detection period, and the second cycle is a cycle having a cycle length greater than the first cycle.

[0013] In this implementation, a method for determining the parameter value of the detection cycle is disclosed. Exemplarily, when the first cycle is used as the cycle and there is an overlapping part in the detection time period, the first cycle is determined as the parameter value of the detection cycle. When there is no periodic low-latency time period (i.e., overlapping part) in the first cycle, a low-latency time period in the second cycle can be used as the start time, thereby realizing CC work with the second cycle as the detection cycle. Thereby, CC verification is performed with the first cycle with a shorter cycle to the greatest extent, so as to ensure the timeliness of CC verification and reduce the risk of data loss. For example, in practice, the allowed detection cycle of CC work is once a week and once a month, but this does not constitute a limitation on the present application, that is, the implementation method only limits the size relationship between the first cycle and the second cycle, but does not limit the specific content of the first cycle and the second cycle, that is, the first cycle and the second cycle can be determined by analyzing the low-latency time period. Exemplarily, by analyzing the latency change information of historical IO operations on the Raid card for one month, it is obtained that the low latency time period of the first and second weeks is from 1:00 to 3:00 a.m. on Monday, and the low latency time period of the third and fourth weeks is from 2:00 to 4:00 a.m. on Monday. The low latency time period of the four weeks in the month does not appear periodically, but the detection time period can be set by using the repeated appearance of the overlapping part. For example, the time period corresponding to the overlapping part is from 2:00 to 3:00 a.m. on Monday, then the detection time period of CC verification is set to 2:00 to 3:00 a.m. every Monday, and then the parameter value of the detection cycle is set to weekly. Exemplarily, by analyzing the latency change information of historical IO operations on the Raid card for one month, it is obtained that the low latency time period of the first and second weeks is from 1:00 to 3:00 a.m. on Monday, and the low latency time period of the third and fourth weeks is from 5:00 to 7:00 a.m. on Monday. The low latency time period of the four weeks in the month does not appear periodically, and there is no overlapping time period. The parameter value of the detection cycle is set to the second cycle with a longer period, such as every two weeks, every month, etc. Optionally, since it is uncertain whether the detection time period will be repeated in the second cycle, it is necessary to perform a determination of the low-latency time period and the detection time period once every second cycle.

[0014] In one possible implementation, at least one low-latency time period is determined based on the delay variation information, including: obtaining at least one time period formed by delay variation information lower than the average value based on the average value of the delay variation information; and obtaining at least one low-latency time period from at least one time period.

[0015] In this implementation, a method for determining a detection time period is disclosed. By comparing with the average delay, at least one corresponding low-latency time period is obtained. According to at least one low-latency time period, the start time of the CC is determined, so that when the CC is working, the delay of the upper-layer task is low, thereby reducing the adverse effect of the CC on the upper-layer task. In other implementations, the low-latency time period can also be determined according to a threshold set by the user, that is, the low-latency time period is determined from at least one time period below the threshold. Exemplarily, the average latency of historical IO operations is 100 milliseconds, and the time period with a latency value lower than 100 milliseconds in a week is determined as the time period from 1 am to 3 am on Monday, 2 am to 3 am on Wednesday, and 1 am to 2 am on Friday. A time period is selected from these three time periods as the low-latency time period of this week.

[0016] In a possible implementation, obtaining at least one low-latency time period from at least one time period includes: determining a time period with the longest duration in the at least one time period as the low-latency time period.

[0017] In this implementation, the time period with the longest duration is determined as the low-latency time period. In other implementations, the time period whose duration meets the threshold requirement can also be determined as the low-latency time period. Exemplarily, the average latency of historical IO operations is 100 milliseconds, and the time periods with latency values ​​lower than 100 milliseconds in a week are 1:00 to 3:00 a.m. on Monday, 2:00 to 3:00 a.m. on Wednesday, and 1:00 to 2:00 a.m. on Friday. From these three time periods, a time period with the longest duration is selected as the low-latency time period of this week, and the low-latency time period of this week is 1:00 to 3:00 a.m. on Monday.

[0018] In a possible implementation, the execution parameter includes a detection speed. The above-mentioned determination of the execution parameter of the CC check according to at least one low-latency time period includes: determining the detection time period according to at least one low-latency time period; determining the parameter value of the detection speed of the CC check according to the detection time period and the disk group capacity corresponding to the Raid card.

[0019] In this implementation, the detection speed of CC can also be configured. According to the detection time period and the capacity of the RAID group, the parameter value of the CC detection speed is determined, and according to the parameter value, the detection speed of CC is configured. That is to say, in addition to configuring the startup time and detection cycle of CC, the speed of CC can also be configured to achieve CC completion at a stable speed in a low-latency time period, which can prevent the CC detection speed from being too high and causing excessive IO delay or the CC detection speed from being too low and causing the detection duration to exceed the low-latency time period. Exemplarily, according to at least one low-latency time period, the detection time period is determined to be from 1:00 to 3:00 a.m. on Monday, and the disk group capacity corresponding to the Raid card is 50TB. Then, according to the detection time period from 1:00 to 3:00 a.m. on Monday and the disk group capacity corresponding to the Raid card of 50TB, the maximum detection speed of CC verification can be calculated, thereby determining the parameter value of the detection speed of CC verification according to the maximum detection speed of CC verification.

[0020] In a possible implementation, a ratio of the capacity of the RAID group to the startup time is calculated, and the ratio is used as the detection speed of the CC check.

[0021] In this implementation, the capacity of the RAID group is the maximum data storage capacity of the RAID group, and the ratio of the capacity of the RAID group to the startup time is used as the detection speed of the CC check. Even when the RAID group reaches the maximum data storage capacity, the CC work can be completed within the startup time. Therefore, the ratio of the capacity of the RAID group to the startup time is used as the detection speed of the CC check, which can ensure that the CC work is completed within the startup time. Exemplarily, based on at least one low-latency time period, the detection time period is determined to be from 1:00 to 3:00 in the morning of Monday, and the disk group capacity corresponding to the Raid card is 50TB. The ratio of the capacity of the RAID group to the startup time is 6944.44GB / S, and the parameter value of the CC check detection speed is set to 6944.44GB / S.

[0022] In a possible implementation, during the CC check, the smaller value between the detection speed parameter value and the speed threshold is determined as the actual detection speed of the CC check, and the speed threshold represents the maximum speed allowed when reading and writing the RAID group.

[0023] In this implementation, since CC is in a low-latency time period of the upper-layer business, the hard disk IO bottleneck speed (i.e., speed threshold) when reading and writing the RAID group can be considered as the maximum IO speed allowed for CC operation under the pressure of the upper-layer business. Therefore, when the detection speed exceeds the hard disk IO bottleneck speed, it is necessary to reduce the detection speed of CC to the speed threshold to reduce the adverse impact of CC operation on the upper-layer business. Exemplarily, the parameter value of the detection speed of CC verification is set to 6944.44GB / S, and the speed threshold is 5000GB / S, then the actual detection speed of CC verification is 5000GB / S. Exemplarily, the parameter value of the detection speed of CC verification is set to 6944.44GB / S, and the speed threshold is 8000GB / S, then the actual detection speed of CC verification is 6944.44GB / S.

[0024] In a possible implementation, the method also includes: configuring and starting CC verification according to the execution parameters of CC verification; during the CC verification process, monitoring the detection speed of CC verification and the current IO delay of the Raid card; when the current IO delay is detected to be greater than the delay threshold, reducing the detected CC verification detection speed.

[0025] In this implementation, after configuring the startup time and detection cycle of CC, in the process of CC, the detection speed of CC and the IO delay when the Raid card performs IO operations can also be detected. When it is monitored that the current IO delay is greater than the delay threshold, the detection speed of the monitored CC is reduced. When it is found that CC has an adverse effect on the upper-layer business, the detection speed of CC can be further reduced when it is found that CC has an adverse effect on the upper-layer business, until the adverse effect of CC on the upper-layer business is reduced to an allowable range. In other words, in the CC process, it is necessary to monitor the IO delay when the RAID card performs IO operations, and reduce the detection speed of CC in time to minimize the adverse effect of CC on the upper-layer business. Exemplarily, the delay threshold is 600 milliseconds. When the current IO delay is monitored to be 1100 milliseconds, the detection speed of the monitored CC check is reduced.

[0026] In a possible implementation, the detection speed of the monitored CC check is reduced according to a preset coefficient until the current IO delay is less than or equal to the delay threshold.

[0027] In this implementation, the detection speed of the monitored CC can be reduced by multiplying the detection speed by a preset coefficient. The preset coefficient can be set according to the user's business needs to control the reduction of the detection speed of CC. Exemplarily, the preset coefficient is 90%, the delay threshold is 600 milliseconds, and the detection speed of the monitored CC check is 6944.44GB / S. When the current IO delay is monitored to be 1100 milliseconds, the detection speed of the monitored CC check is reduced to 6944.44GB / S*90%=6250GB / S. The current IO delay is monitored again as 800 milliseconds, and the detection speed of the monitored CC check is reduced to 6250GB / S*90%=5625GB / S. The current IO delay is monitored again as 500 milliseconds, which is lower than the delay threshold of 600 milliseconds, and the detection speed of CC check is no longer reduced, and CC check work continues.

[0028] In a possible implementation manner, the delay threshold is a maximum value in the delay variation information.

[0029] In this implementation, the delay threshold can be understood as the threshold corresponding to the delay-related parameters. There are many ways to implement the delay threshold, such as obtaining it based on the user's historical experience; obtaining it based on the maximum value of the delay parameter in the delay change information; obtaining it based on the limit value of the delay parameter allowed when reading and writing the RAID group, etc. Obtaining the delay threshold based on the maximum value in the delay change information can ensure the consistency of the delay performance of the upper-layer service in different detection cycles, so that CC work can be performed without the user's perception, improving the user experience. Exemplarily, if the maximum value of the delay in the delay change information is 600 milliseconds, the delay threshold is set to 600 milliseconds.

[0030] In a possible implementation, CC check is turned off; values ​​of delay-related parameters are monitored to obtain delay variation information.

[0031] In this implementation, the delay-related parameters may include various parameters that can reflect IO delay, such as await parameters, svctm parameters, util parameters, etc. After closing the CC check, the delay change information can be obtained through the values ​​of the delay-related parameters, so that the delay change information is independent of CC, which facilitates the analysis of the IO delay law of the upper-layer business, and thus finds the low-latency time period of the upper-layer business to perform CC work. This application does not limit which specific parameters are used as delay-related parameters. Exemplarily, the value of the await parameter is detected to obtain the delay change information.

[0032] In the second aspect, an embodiment of the present application provides a CC verification device, including: an acquisition module, used to obtain delay change information of historical IO operations on the Raid card; a processing module, used to determine at least one low-latency time period based on the delay change information; and determine the execution parameters of the CC verification based on at least one low-latency time period.

[0033] In a possible implementation, the execution parameter includes a start time. The processing module is specifically configured to: determine a detection time period according to at least one low latency time period; and determine a parameter value of the start time according to a start time of the detection time period.

[0034] In a possible implementation, the processing module is specifically configured to: calculate an overlapping portion of at least one low-latency time period; and determine a detection time period according to a time period corresponding to the overlapping portion.

[0035] In a possible implementation manner, the processing module is specifically configured to: determine a detection time period according to at least one low-latency time period; and determine a parameter value of a detection period of CC verification according to a cycle period of the detection time period.

[0036] In one possible implementation, the processing module is specifically used to: when the first cycle is used as the cycle period and there is an overlapping part in the detection time period, determine the first cycle as the parameter value of the detection cycle; when the first cycle is used as the cycle period and there is no overlapping part in the detection time period, determine the second cycle as the parameter value of the detection cycle, and the second cycle is a cycle having a cycle length greater than the first cycle.

[0037] In a possible implementation, the processing module is specifically used to: obtain at least one time period formed by delay variation information lower than the average value according to the average value of the delay variation information; and obtain at least one low-delay time period from the at least one time period.

[0038] In a possible implementation manner, the processing module is specifically configured to: determine a time period with the longest duration in at least one time period as a low-latency time period.

[0039] In a possible implementation, the execution parameter includes a detection speed. The processing module is specifically used to: determine the execution parameter of the CC check according to at least one low latency time period, including: determining the detection time period according to at least one low latency time period; determining the parameter value of the detection speed of the CC check according to the detection time period and the disk group capacity corresponding to the Raid card.

[0040] In a possible implementation, the processing module is specifically configured to calculate a ratio between the capacity of the RAID group and the startup time, and use the ratio as a detection speed of the CC check.

[0041] In a possible implementation, the processing module is specifically used to: during the execution of the CC check, determine the smaller value between the parameter value of the detection speed and the speed threshold as the actual detection speed of the CC check, and the speed threshold represents the maximum speed allowed when reading and writing the RAID group.

[0042] In a possible implementation, the processing module is also used to: configure and start CC verification according to the execution parameters of CC verification; during the CC verification process, monitor the detection speed of CC verification and the current IO delay of the Raid card; when the current IO delay is detected to be greater than the delay threshold, reduce the detected CC verification detection speed.

[0043] In a possible implementation, the processing module is specifically configured to: reduce the detection speed of the monitored CC check according to a preset coefficient until the current IO delay is less than or equal to the delay threshold.

[0044] In a possible implementation manner, the delay threshold is a maximum value in the delay variation information.

[0045] In a possible implementation, the processing module is specifically used to: disable CC check; monitor the values ​​of delay-related parameters to obtain delay variation information.

[0046] In a third aspect, an embodiment of the present application provides a computing device, the computing device comprising: a processor and a memory. The memory stores instruction operations or codes. The processor is configured to communicate with the memory and execute the instruction operations or codes in the memory to perform the method of any one of the above-mentioned first aspect and its implementation.

[0047] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a computer, the computer executes the method of any one of the above-mentioned first aspect and its implementation methods.

[0048] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed by a computing device, enables the computing device to execute a method of any one of the above-mentioned first aspect and its implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The following is a brief introduction to the drawings required for use in the embodiments or technical descriptions.

[0050] Figure 1 A schematic diagram of an application scenario of a server provided in an embodiment of the present application;

[0051] Figure 2 A flowchart of a CC verification method provided in an embodiment of the present application;

[0052] Figure 3 A flowchart of an example of a CC verification method provided in an embodiment of the present application;

[0053] Figure 4 A schematic diagram of a method for determining a startup time provided in an embodiment of the present application;

[0054] Figure 5 A schematic diagram of the composition of a CC verification device provided in an embodiment of the present application;

[0055] Figure 6 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0057] The term "and / or" in this article is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.

[0058] The terms "first" and "second" in the specification and claims herein are used to distinguish different objects rather than to describe a specific order of the objects. For example, a first response message and a second response message are used to distinguish different response messages rather than to describe a specific order of the response messages.

[0059] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0060] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two. For example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.

[0061] In order to facilitate understanding of the solution provided by the embodiment of the present application, some terms involved in the solution are first briefly introduced.

[0062] Redundant Array of Independent Disks (RAID), also known as Redundant Array of Inexpensive Disks, refers to the use of multiple independent disks to form a large disk system, thereby achieving better storage performance and higher reliability than a single disk. RAID includes multiple types of redundant disk arrays such as RAID0, RAID1, RAID3, RAID5, RAID6, RAID10, RAID50 and RAID60. RAID group refers to the disk system composed of multiple independent disks in RAID.

[0063] Software RAID (Intel Virtual RAID on CPU, INTELVROC), also known as virtual disk array, software RAID group, soft RAID, software RAID controller, etc., is a simpler RAID solution implemented through Intel Volume Management Device (Intel VMD), which can implement RAID without adding an additional RAID controller card. Soft RAID aggregates several hard disks or partitions of the same capacity into a large virtual RAID device (or RAID0, or RAID1, or RAID5, or RAID10...) according to different usage directions. If the capacity of each hard disk or partition is inconsistent, the hard disk or partition with the smallest capacity is used as the basis. The members of soft RAID are the entire hard disk or partition.

[0064] Consistency Check (CC) is a technical means to ensure the data integrity of the RAID group. It checks the disks in the RAID group to ensure data consistency and repair block errors. This process requires reading all parts of the stripe and performing data comparison and verification on the data part of the stripe. Among them, RAID0 does not have redundancy function, so RAID0 does not have CC operation.

[0065] Upper layer services: In the embodiment of the present application, upper layer services are also detected as services, which refer to any services other than CC related to the RAID group, such as the service of writing data to a disk of the RAID group.

[0066] The delay variation information refers to the IO delay information when the upper-layer business reads and writes the RAID disk group data within a certain time period. According to the delay variation information, the IO delay law of the upper-layer business in the certain time period can be known, so that the low-latency time period can be found, and then CC work can be performed. In other words, in the embodiment of the present application, the low-peak period of the layer business can be automatically found, and CC work can be performed during the low-peak period of the upper-layer business, thereby reducing the adverse effects of CC work on the upper-layer business.

[0067] The current IO latency refers to the IO latency information when the upper-layer service reads and writes RAID disk group data at the current moment in the CC process. Based on the current IO latency, the current IO latency information when the upper-layer service and CC exist at the same time can be obtained. When the current IO latency is large, the performance of the upper-layer service can be guaranteed by reducing the detection speed of CC, which can reduce the adverse effects of CC work on the upper-layer service. In addition, CC work can be performed without the user's perception, so that CC work will not reduce the user experience.

[0068] The embodiment of the present application provides a CC verification method and related devices, which can automatically adjust the cycle of CC actions and their IO speed under software RAID, reducing the adverse impact of CC on upper-layer services. In some implementations, during the CC process, the relevant parameters of the CC action can also be continuously modified according to the delay situation, thereby minimizing the adverse impact of the CC process on the upper-layer services.

[0069] For example, when the server deploys related services and is configured with software RAID, the server's iostat (IO statistics, input / output statistics) is continuously monitored during the operation of the related services, and the CC startup time and cycle are set according to the delay data fluctuation rules; the speed required for CC action is calculated in combination with the RAID group capacity, and relevant parameter settings are performed. In the next CC detection cycle, the server's iostat is continuously monitored, and the CC parameters are automatically adjusted according to the delay data fluctuation rules.

[0070] Before introducing the technical solution of the embodiment of the present application, the following first introduces an application scenario of the technical solution of the embodiment of the present application, so as to better understand the technical solution of the embodiment of the present application. It should be noted that the introduction of this application scenario does not constitute a limitation on the scope of use of the technical solution of the embodiment of the present application. In other words, the technical solution of the embodiment of the present application can be applied to any application scenario that requires CC action.

[0071] Figure 1 A schematic diagram of an application scenario of a server provided in an embodiment of the present application. Figure 1As shown, a server includes a host, a hard disk backplane, and multiple disks (eg Figure 1 The host includes the server's central processing unit (CPU) and operating system. The operating system runs on the processor, and the host can run various software, such as software RAID. Software RAID is used to provide RAID technology to merge multiple disks into a logical disk storage space. Multiple disks are plugged into the hard disk backplane, which is connected to the host and provides storage space for the host. The host manages multiple disks through software RAID.

[0072] In order to ensure the integrity of the data in the RAID group, a consistency check (CC) is required. During the CC operation, the system's IO (Input / Output) resources are occupied, which has an adverse impact on the execution of upper-layer services and a poor user experience. In other words, when the upper-layer services and CC are executed at the same time, the hard disk IO latency increases, the execution performance of the upper-layer services deteriorates, and the user experience is poor.

[0073] For example, in the Linux system, the function of software RAID is realized by associating the mdadm tool. The CC function of the mdadm tool for the RAID group is turned on by default and is executed regularly every 7 days. If a RAID group with redundancy function is formed, CC will perform consistency detection on the data in the RAID group. From the perspective of the CC processing process, when CC performs consistency detection, if data inconsistency is encountered, the correct data will be written through the RAID group's algorithm, such as mirroring or parity checking. Therefore, the entire CC process will occupy IO logical resources and affect the execution of upper-level services.

[0074] In view of this, the technical solution of the embodiment of the present application can automatically adjust the cycle of CC actions and their IO speed under the software RAID by configuring CC work, thereby reducing the adverse impact on upper-layer services. In some implementations, during the CC process, the relevant parameters of the CC action can also be continuously modified according to the delay situation, thereby minimizing the adverse impact of the CC process on the upper-layer services.

[0075] In the embodiment of the present application, the above-mentioned disk can be various types of disks, such as a solid state drive (SSD) or a hard disk drive (HDD), and can be various interface protocols, such as a serial attached small computer system interface (SAS), a disk or a serial advanced technology attachment (SATA), a logical device interface specification (NVME) and other interface protocols. That is to say, in the embodiment of the present application, there is no specific limitation on the specific type of the disk and the interface protocol used.

[0076] In the embodiment of the present application, the host and the hard disk backplane can be communicatively connected in a variety of ways, such as a wired connection through a peripheral component interconnect (PCI) bus, a peripheral component interconnect express (PCIe) bus, etc.; the connection between the RAID card, the hard disk backplane and the multiple disks can be a variety of interface protocols, such as a serial attached small computer system interface (SAS), a disk or serial advance technology attachment (SATA), a logical device interface specification (non-volatile memory express, NVME) and other interface protocols. The embodiment of the present application does not limit the connection method between the host and the RAID card, the RAID card, the hard disk backplane and the multiple disks, and a suitable communication connection method can be selected according to actual conditions.

[0077] In the embodiment of the present application, the host may carry an upper layer service, and during the operation of the upper layer service, the data stored in the disk array may be read through the connection between the host and the disk array, or data may be written to the disk array. The technical solution of the embodiment of the present application is to perform CC work in a low latency time period according to the IO latency of the upper layer service in the reading and writing process, thereby avoiding the upper layer service and CC from performing read and write operations on the RAID group at the same time, and reducing the adverse effect of CC on the upper layer service.

[0078] Understandably, Figure 1The structure of the server shown does not constitute a limitation on the structure of the server, and the server may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, in some servers, the server may include more or fewer disks, etc.

[0079] Figure 1 The server shown may be a variety of servers, such as an X86 architecture server, specifically a blade server, a high-density server, a rack server or a high-performance server, etc. In other words, the embodiment of the present application does not specifically limit the specific type of server.

[0080] The following is combined with Figure 2 The process of a CC verification method provided in an embodiment of the present application is further explained.

[0081] Figure 2 A flow chart of a CC verification method provided in an embodiment of the present application. Figure 2 As shown, in a scenario where software RAID controls a RAID group, in order to configure CC verification of RAID group data, an embodiment of the present application provides a CC verification method, which is applied to a processor, such as a central processing unit (CPU), and the processor executes instruction operations or codes to perform the following steps:

[0082] Step S210, obtaining the delay variation information of the historical IO operation on the Raid card. Exemplarily, the delay variation information indicates the IO delay that occurs when the upper layer service reads the RAID disk group when the CC check is not performed.

[0083] Optionally, turn off CC check; monitor the values ​​of delay-related parameters when the upper-layer business on the Raid card reads and writes the RAID disk group to obtain delay change information. Delay-related parameters may include various parameters that can reflect IO delay, such as await parameters, svctm parameters, util parameters, etc. This application does not limit which parameters are used as delay-related parameters.

[0084] Exemplarily, input / output statistics (IO statistics, iostat) are used by the server to monitor the disk operation activities of the system. Iostat can collect statistics on the read and write status of the disk group and the CPU usage, so as to understand the overall operation of the system. The parameters that reflect the read and write status of the disk group in iostat include await parameters, svctm parameters, util parameters, etc. The await parameter is used to indicate the average waiting time for each device IO operation; the svctm parameter is used to indicate the average service time for each device IO operation; the util parameter is used to indicate the percentage of time in one second used for IO operations, or how much time in one second the IO queue is non-empty. Therefore, through the parameter values ​​of the await parameter, svctm parameter, util parameter, etc., the delay change information such as the read and write waiting time, read and write duration, and read and write time ratio corresponding to each IO operation of the disk group can be obtained. The delay change information can then reflect the low-latency time period when the IO operation is working at low peak.

[0085] Furthermore, after closing CC verification, by monitoring the values ​​of delay-related parameters, delay change information unrelated to CC can be obtained, which facilitates the analysis of the IO delay rules of upper-layer services and finds the low-latency time period of upper-layer services for CC work.

[0086] Step S220: Determine at least one low latency time period according to the latency variation information.

[0087] Optionally, at least one time period formed by delay variation information lower than the average value is obtained according to the average value of the delay variation information; at least one low-delay time period is obtained from the at least one time period. Alternatively, the low-delay time period may be determined according to a threshold set by a user, that is, the low-delay time period is determined from at least one time period lower than the threshold.

[0088] Optionally, the longest time period in at least one time period is determined as the low latency time period. Alternatively, a time period whose duration meets a threshold requirement may be determined as the low latency time period. Alternatively, a time period whose IO latency value is lower than a first threshold and whose duration is greater than a second threshold is determined as the low latency time period.

[0089] Step S230: determining execution parameters of CC verification according to at least one low latency time period.

[0090] Optionally, the execution parameters include the start time. The above-mentioned determination of the execution parameters of the CC check according to at least one low-latency time period includes: determining the detection time period according to at least one low-latency time period; and determining the parameter value of the start time according to the start time of the detection time period. This ensures that the CC check work is performed in the time period when the IO latency of the upper-layer service is low.

[0091] Optionally, the overlapping part of at least one low-latency time period is calculated; and the detection time period is determined according to the time period corresponding to the overlapping part. The time periods corresponding to the overlapping parts in multiple first cycles are selected and determined as the start time, so as to avoid the adverse impact of CC on upper layer services to the greatest extent.

[0092] Optionally, the detection period of CC can be selected from known detection periods (such as weekly and monthly). The detection period of CC can be obtained by analyzing the delay regularity of the low delay time period, and is not limited to known detection periods such as weekly and monthly.

[0093] Among them, the delay change information within the detection cycle can be analyzed to obtain at least one corresponding low-latency time period, and the detection cycle and startup time of the CC can be obtained according to at least one low-latency time period. Exemplarily, the low-latency time period is a time period in which the IO delay is lower than the average delay, and the average delay is the average value of the IO delay of the delay change information within the detection cycle.

[0094] Furthermore, the start time of the CC is determined according to at least one low latency time period, so that when the CC is working, the latency of the upper layer task is low, thereby reducing the adverse effect of the CC on the upper layer task.

[0095] Optionally, if the detection cycle of CC verification includes the first cycle, it is necessary to determine the low-latency time period (i.e., the first time period) when the detection cycle is the first cycle. When there is an overlap in the first time periods in multiple first cycles, the start time of the time period corresponding to the overlap is determined as the start time. For example, if the first cycle is weekly and the overlap is a time period on Tuesday night every week, the start time of the time period on Tuesday night can be determined as the start time of CC.

[0096] That is, a time period corresponding to the overlapping parts in the plurality of first cycles is selected and determined as the detection time period, the start time of the detection time period is determined as the start time, and the cycle period of the detection time period is determined as the detection period. This can avoid conflicts with the process of reading RAID group data of the upper layer business, and can avoid adverse effects of CC on the upper layer business to the greatest extent.

[0097] Furthermore, for upper-layer services with obvious low-latency periodicity, CC work can be performed in the low-latency time period of the upper-layer services. When the upper-layer services read and write the RAID group, the latency is low, which indicates that the upper-layer services read and write the RAID group less frequently. Performing CC work at this time can avoid the adverse effects of CC on the upper-layer services to the greatest extent.

[0098] Optionally, the detection period of CC operation also includes a second period, and the second period includes multiple first periods. When there is no overlapping part in the low-latency time periods in multiple first periods, the starting time of the low-latency time period of the second period (i.e., the second time period) is determined as the start time, and the detection period is the second period. That is to say, when there is no periodic regularity in the low-latency time period in the first period, the second period with a larger period length can be determined as the detection period. Exemplarily, since the period length of the second period can be understood as the upper limit of the allowed period length, it is no longer determined whether the low-latency time period is repeated in the second period.

[0099] Exemplarily, the first cycle is a smaller cycle, such as weekly, and the second cycle is a larger cycle, such as monthly. A month including four weeks is used as an example for explanation. When the low-latency time periods in the four weeks do not appear periodically, that is, a time period that is a low-latency time period cannot be found in the four weeks, each month can be used as the execution cycle of CC, and a low-latency time period can be found in each month as the detection time period, thereby determining the start time and the detection cycle.

[0100] Generally, the allowed detection cycle of CC work is once a week or once a month, but this does not constitute a limitation to the present application. That is, the present application only limits the size relationship between the first cycle and the second cycle, but does not limit the specific content of the first cycle and the second cycle.

[0101] Optionally, the detection speed of the CC check is determined according to the detection time period and the capacity of the RAID group. For example, a ratio of the capacity of the RAID group and the detection time period is calculated, and the ratio is used as the detection speed of the CC check.

[0102] Furthermore, the capacity of the RAID group is the maximum data storage capacity of the RAID group, and the ratio of the capacity of the RAID group to the detection time period is the detection speed of the CC check. Even when the RAID group reaches the maximum data storage capacity, the CC work can be completed within the detection time period. Therefore, the ratio of the capacity of the RAID group to the detection time period is the detection speed of the CC check, which can ensure that the CC work is completed within the detection time period.

[0103] Optionally, the method further includes: during the CC check process, the detection speed also needs to be lower than a speed threshold, the speed threshold represents the hard disk IO bottleneck speed of the RAID group, thereby ensuring good read and write performance during CC check work.

[0104] That is to say, the detection speed obtained according to the delay variation information is not fixed, and the detection speed of CC can be adaptively adjusted during the CC operation. For example, when the detection speed exceeds the hard disk IO bottleneck speed (speed threshold) of the RAID group, the detection speed needs to be adjusted to the speed threshold to avoid the reduction of IO performance.

[0105] Furthermore, since CC is in a low-latency time period for upper-layer services, the hard disk IO bottleneck speed of the RAID group can be considered as the maximum allowed IO speed of CC. Therefore, when the detection speed exceeds the hard disk IO bottleneck speed (i.e., the speed threshold), it is necessary to reduce the detection speed of CC to the speed threshold to ensure that there is no IO performance degradation when CC is running.

[0106] Optionally, the method further includes: in the process of performing the CC check, monitoring the current IO delay of the upper layer service performing the IO operation on the RAID group; when it is monitored that the current IO delay is greater than the delay threshold, reducing the detection speed of the monitored CC.

[0107] That is to say, during the CC operation, the adaptive adjustment of the CC detection speed is also related to the IO delay when the RAID card performs IO operations. For example, when the current IO delay is greater than the delay threshold, the CC detection speed can be reduced to reduce the adverse impact of CC on upper-layer services.

[0108] That is to say, the configuration parameters of CC can be modified in real time based on the real-time monitoring of the IO delay when the RAID card performs IO operations to reduce the impact of CC on upper-layer services. For example, when the current IO delay is detected to be greater than the delay threshold, the detection speed of the monitored CC is reduced.

[0109] In some application scenarios, due to the reduction in CC detection speed, the CC detection time will become longer and may exceed the low latency time period of the upper-layer business. For example, when the detection speed exceeds the hard disk IO bottleneck speed (i.e., the speed threshold), the CC detection speed needs to be reduced to the speed threshold, which will increase the CC detection time and there is a possibility of exceeding the detection time period. In order to reduce the adverse impact of CC on upper-layer businesses, it is necessary to further reduce the CC detection speed until the adverse impact of CC on upper-layer businesses is reduced to an allowable range. In other words, during the CC process, it is necessary to monitor the IO delay when the RAID card performs IO operations, and timely reduce the CC detection speed, or even reduce the CC detection speed to zero (i.e., shut down CC), so as to minimize the adverse impact of CC on upper-layer businesses.

[0110] Optionally, the delay threshold is a maximum value in the delay variation information, which can ensure that the read and write performance of the current IO operation of the upper layer service is not lower than the read and write performance of the historical IO operation, thereby improving the user experience.

[0111] Furthermore, there are many ways to implement the delay threshold, such as obtaining it based on the user's historical experience; obtaining it based on the maximum value in the delay change information; obtaining it based on the delay parameter, etc. Obtaining the delay threshold based on the maximum value in the delay change information can ensure the consistency of IO performance of the same service before and after different cycles, so that CC work can be performed without the user's perception, improving the user experience.

[0112] Generally, in the scenario where software RAID controls RAID groups, the execution cycle of CC is set to periodic execution by default, which easily causes CC to affect the performance of upper-layer services. The technical solution of the present application determines the detection time period of CC by analyzing the IO latency when the upper-layer services and RAID cards perform IO operations, and determines the detection speed of CC according to the detection time period and the capacity of the RAID group, thereby modifying the configuration parameters of CC. In other words, by setting CC in the time period when the IO latency of the upper-layer services is low, CC work is avoided from "seizing" the logical resources of the upper-layer services, reducing the adverse effects of CC work on the upper-layer services, and ensuring the working performance of the upper-layer services, so that CC work can be performed without the user's perception, thereby improving the user experience.

[0113] In order to further illustrate the technical solution of the embodiment of the present application, Figure 3 and attached Figure 4 , is further explained in an exemplary manner, but the relevant description of this example is intended to explain the technical solution provided in the embodiment of the present application so that those skilled in the art can understand the technical solution provided in the embodiment of the present application more specifically, and does not constitute a limitation on the implementation method of the technical solution provided in the embodiment of the present application.

[0114] Figure 3 A flowchart of an example of a CC verification method provided in an embodiment of the present application. Figure 3 As shown, based on Figure 2 The CC verification method shown in the embodiment of the present application also provides an example. Figure 3 This example is described illustratively.

[0115] Optionally, step S210 further includes step S211 and step S212.

[0116] Step S211, annotating the execution code related to CC, the purpose is to stop the operation of CC, so as to record and summarize the IO delay rules of upper-layer services, and then reasonably arrange the startup time and detection speed of CC.

[0117] For example, taking the Linux system as an example, when using soft RAID, the mdadm tool needs to be installed synchronously under the Linux system. The mdadm tool comes with a scheduled raid-check script code to perform CC actions. The so-called scheduling means that the CC action is automatically executed once every 7 days. The default startup time is 1:00 a.m. every Sunday of the system time.

[0118] For example, in a Linux system, in order to stop the running of CC, it is necessary to annotate the CC-related execution code, namely the raid-check script code. For example, the annotated raid-check script code is:

[0119] “[root@localhost~]#cat / etc / cron.d / raid-check”; “#Run system wideraid-checkonceaweekonSundayat 1ambydefault 01**Sun root / usr / sbin / raid-check”. The “#” indicates that the following content is comment text and no code execution action is performed.

[0120] Step S212, monitor iostat (IO statistics, input / output statistics) in the second cycle, and record the maximum value of the await parameter as A1. Among them, iostat is used to output statistical information related to CPU and disk IO, and the await parameter is a parameter in iostat. Wait represents the average waiting time for each device IO operation, which can be used to indicate the degree of IO latency.

[0121] In other examples, other parameters may be used to characterize IO latency, such as the util parameter. The util parameter indicates the percentage of time in one second used for IO operations, or the percentage of time in one second when the IO queue is not empty. If the util parameter is close to 100%, it means that too many IO requests are generated, the IO system is already fully loaded, and the disk may have a bottleneck.

[0122] That is to say, in order to obtain the latency change information when the upper-layer business reads and writes RAID disk group data, a feasible implementation method is: after forming the RAID, first comment the content of the raid-check script, that is, do not execute the CC action first; take seven days as the first cycle and one month as the second cycle, and count the wait parameters of the drive letter corresponding to the RAID group in iostat, and count a second cycle in total; analyze the fluctuation pattern of the wait parameter value in iostat every day in each first cycle, that is, obtain the latency change information when the upper-layer business reads and writes RAID disk group data.

[0123] Optionally, step S220 further includes step S221.

[0124] Step S221, determining a first time period and a second time period, wherein the first time period refers to a low latency time period in a first cycle, and the second time period refers to a low latency time period in a second cycle.

[0125] Optionally, step S230 further includes step S231, step S232 and step S233.

[0126] Step S231, determining whether there is an overlap in the first time period within the first cycle. If there is an overlap, executing step S232; if there is no overlap, executing step S233.

[0127] Step S232: when there is an overlapping part, the overlapping part of the first time period is determined as a detection time period, the start time of the detection time period is used as the start time, and the detection period of CC is the first period.

[0128] Step S233: when there is no overlapping part, the second time period is determined as the detection time period, the start time of the detection time period is used as the start time, and the detection period of CC is the first period.

[0129] In order to further illustrate a method for determining the start time and the detection cycle, the following is combined with the attached Figure 4 An exemplary description is given.

[0130] Figure 4 A flowchart of a method for determining a startup time provided in an embodiment of the present application. Figure 4 As shown, step S221 further includes step S221-1, step S221-2, step S221-3, step S221-4 and step S221-5.

[0131] Step S221-1, calculate the average value A- of the await parameter in the first cycle.

[0132] Step S221-2, take the continuous time period Ta1*-Tb1* in which the await parameter value A is less than the average value A-. The time period Tx-Ty involved in the embodiment of the present application indicates that the start time of the time period is Tx and the end time is Ty. Optionally, there can be multiple continuous time periods Ta1*-Tb1*, such as time period Ta11-Tb11, time period Ta12-Tb12, etc.

[0133] Step S221-3, calculate the maximum value of the duration of multiple time periods Ta1*-Tb1*, and assign it to the first time period Ta1-Tb1. The method of obtaining the first time period here is only an example. In other examples, the first time period Ta1-Tb1 can also be several time periods with larger durations.

[0134] Step S221-4, the first time period Ta2-Tb2 in other first cycles is obtained in the same way. This step refers to the calculation method of the first time period Ta1-Tb1 in the first first cycle, which will not be repeated here.

[0135] For example, assuming that each week is the first cycle and each month is the second cycle, there are four first cycles in one second cycle, namely the first week, the second week, the third week, and the fourth week. The first time period of the first week is Ta1-Tb1, the first time period of the second week is Ta2-Tb2, the first time period of the third week is Ta3-Tb3, and the first time period of the fourth week is Ta4-Tb4.

[0136] Step S221-5, determine the second time period in the second cycle. Exemplarily, referring to the determination method of the first time period Ta1-Tb1, according to the average value of IO latency in the second cycle, determine the time period corresponding to the IO latency lower than the average value as the second time period.

[0137] like Figure 4 As shown, step S231 further includes step S231-1; step S232 further includes step S232-1; step S233 further includes step S233-1.

[0138] Step S231-1, determine whether there are overlapping parts in the first time periods Ta1-Tb1, Ta2-Tb2, etc. in multiple first cycles. If there are overlapping parts, execute step S222-1, record the time period of the overlapping part as Ta-Tb, and the obtained detection time period is Ta-Tb. If there is no overlapping part, execute step S223-1, and obtain the detection time period Tc-Td according to the second time period in the second cycle.

[0139] Step S232-1, record the overlapping time period as the detection time period Ta-Tb, and the obtained start time is Ta.

[0140] Step S233-1, obtaining a detection time period Tc-Td according to a second time period in a second cycle.

[0141] That is to say, find out the first time period Ta1-Tb1, Ta2-Tb2, Ta3-Tb3 and Ta4-Tb4 with the lowest io pressure and the longest duration in each first cycle, and get the detection time period Ta-Tb by weight. Ta-Tb can be specific to the hour and minute of the day of the week. The duration of the startup time is recorded as T1 in S, and the CC startup time is set to Ta.

[0142] Further, if the first time periods Ta1-Tb1, Ta2-Tb2, Ta3-Tb3 and Ta4-Tb4 cannot be weighed, the second time period Tc-Td with the lowest io pressure and the longest duration in the second cycle is determined as the detection time period. Tc-Td can be specific to the date, hour and minute. The duration of Tc-Td is T2, the unit is S, and the CC start time is set to Tc.

[0143] like Figure 3 As shown, the method may further include step S241, calculating a CC detection speed parameter value, and step S242, configuring relevant parameters of the CC.

[0144] Optionally, the method may further include: step S241, calculating a parameter value of the detection speed of the CC. In the operation of the CC, in order to reduce the delay problem caused by the CC, the actual speed of the CC may be less than the parameter value. In other words, the detection time period is only a parameter value of the CC detection duration. Due to the change of the detection speed, the CC detection duration may be greater than or less than the detection time period.

[0145] For example, assuming that the capacity of the RAID group is C1, in GB, calculate the parameter value of the detection speed required to complete the CC action within the IO low latency detection time period. For example, when the detection time period is Ta-Tb, the calculation formula of the parameter value of the detection speed is: S1 = C1*1024*1024 / T1, in KB / S; when the detection time period is Tc-Td, the calculation formula of the parameter value of the detection speed is: S2 = C1*1024*1024 / T2, in KB / S.

[0146] Optionally, the method may further include: step S242, modifying the configuration parameters of the CC. The configuration parameters may include the start time, detection cycle, detection speed, etc. of the CC.

[0147] Exemplarily, according to the startup time, the start time of the CC action in / etc / cron.d / raid-check is set to Ta or Tc; the detection speed of CC is set to S*, for example, the sync_speed_min parameter value is modified to S*, and S* is S1 or S2.

[0148] Optionally, in a scenario with upper-layer business pressure, when the detection speed setting value S* is greater than the hard disk IO bottleneck speed, CC is performed according to the hard disk IO bottleneck speed; when the detection speed setting value S* is less than the hard disk IO bottleneck speed, CC is performed according to the S* value.

[0149] When the configuration parameters of the CC are modified, the CC can be started normally. Optionally, during the detection period after the CC is started, the IO delay information can also be monitored, and the detection speed of the CC can be adjusted in time. The configuration process after the CC is started will be exemplarily described below through steps S251-S255.

[0150] like Figure 3 As shown, the method may further include steps S251 to S255, during the CC execution process, adjusting the CC detection speed in real time to avoid adverse effects on the latency of upper layer services, so that CC work can be performed without the user noticing.

[0151] Step S251, cancel the comment of CC code, CC works according to the modified parameters, and enters the execution cycle of CC. Optionally, in the execution cycle of CC, monitor iostat information to adjust the detection speed of CC in this detection cycle; or to adjust the startup time and detection speed of the next cycle. For determining the startup time and detection speed, refer to the relevant description, which will not be repeated here.

[0152] For example, during the CC execution cycle, the iostat operation status after the CC start time point during the statistical detection cycle is monitored to check the actual speed S of the CC action. When the actual speed S is less than S*, it can be considered that the CC detection speed is the hard disk IO bottleneck speed.

[0153] Step S252, monitor the await parameter value A2, and determine whether A2 is greater than A1. When A2 is greater than A1, execute step S253; when A2 is not greater than A1, end the configuration of the detection speed.

[0154] Step S253, stop CC operation and obtain the actual speed S of CC. For example, the code that can stop CC operation is: echo id le> / sys / block / md* / md / sync_action.

[0155] Step S254, reduce the actual speed S of CC. For example, set sync_speed_min to 9 / 10S*.

[0156] Step S255, restart CC work and execute step S252.

[0157] That is to say, when A2 is greater than A1, stop raid-check, reduce the actual speed S of CC, and trigger raid-check again. If the wait parameter value is still greater than A1, continue to reduce the actual speed S of CC until the wait value stabilizes in the A1 range.

[0158] Optionally, the start time and detection speed configured in this detection cycle can be applied to the next detection cycle, and in the next detection cycle, continue to perform steps S251-S255 to configure the detection speed of CC. For example, continue to monitor whether the value of await is stable within the A1 range after the start time point of the next detection cycle CC. If it is stable within the A1 range, the configuration of the detection cycle is completed; if it exceeds the A1 range, refer to steps S251-S255 for configuration.

[0159] Optionally, when the upper layer service changes, it is necessary to re-trigger the automatic adjustment of the configuration parameters of the CC so that the CC operation matches the new upper layer service, that is, the CC operation can be performed in the low latency time period of the new upper layer service.

[0160] In the embodiment of the present application, by monitoring the information related to IO operation on the software RAID, the CC startup time, CC cycle and CC speed are adjusted, thereby reducing the adverse impact of CC on upper-layer services.

[0161] Optionally, in an embodiment of the present application, at the beginning of the soft RAID application, the IO latency information of the upper-layer service is detected and collected, and the startup time, detection cycle and other time planning of the CC action are performed based on the IO latency information. Then, the CC detection speed is calculated based on the time planning of the CC action and the low load time of the upper-layer service. Optionally, in combination with the IO latency information after CC startup, the configuration parameters of CC are continuously and automatically adjusted to configure the impact of CC actions on the upper-layer service IO.

[0162] For example, in the first month after the device deploys the service and configures the soft RAID, during the service operation, its iostat is continuously monitored, and the CC startup time and cycle are set according to the delay data fluctuation rules. The speed required for CC action is calculated in combination with the RAID group capacity, and then the relevant parameters are set. By monitoring the delay information of the next CC detection cycle, automatic adjustment of CC parameters is achieved.

[0163] The technical solution of the embodiment of the present application can adjust the CC action of the RAID group according to the periodic performance of the business load in the soft RAID scenario to minimize its impact on the upper-layer business IO. The technical solution of the embodiment of the present application can reduce maintenance costs and improve customer experience. For example, it can reduce IO performance-related issues in the soft RAID scenario, and ensure the data consistency of the RAID group without affecting customer business, thereby improving customer recognition.

[0164] The technical solution of the embodiment of the present application can be implemented by a software tool, which is integrated into the server to provide services to users. Therefore, based on the same concept as the aforementioned CC verification method, the embodiment of the present application provides a CC verification device. Figure 5 Provide further explanation.

[0165] Figure 5 A schematic diagram of the composition of a CC verification device provided in an embodiment of the present application. Figure 5 As shown, an embodiment of the present application provides a CC verification device 500, including: an acquisition module 510, used to obtain delay change information of historical IO operations on the Raid card; a processing module 520, used to determine at least one low delay time period according to the delay change information; and determine the execution parameters of the CC verification according to at least one low delay time period.

[0166] In a possible implementation, the execution parameter includes the start time. The processing module 520 is specifically configured to: determine a detection time period according to at least one low latency time period; and determine a parameter value of the start time according to a start time of the detection time period.

[0167] In a possible implementation, the processing module 520 is specifically configured to: calculate an overlapping portion of at least one low-latency time period; and determine a detection time period according to a time period corresponding to the overlapping portion.

[0168] In a possible implementation, the processing module 520 is specifically configured to: determine a detection time period according to at least one low-latency time period; and determine a parameter value of a detection period of CC verification according to a cycle period of the detection time period.

[0169] In one possible implementation, the processing module 520 is specifically used to: when the first cycle is used as the cycle period and there is an overlapping part in the detection time period, determine the first cycle as the parameter value of the detection cycle; when the first cycle is used as the cycle period and there is no overlapping part in the detection time period, determine the second cycle as the parameter value of the detection cycle, and the second cycle is a cycle having a cycle length greater than the first cycle.

[0170] In a possible implementation, the processing module 520 is specifically used to: obtain at least one time period formed by delay variation information lower than the average value according to the average value of the delay variation information; and obtain at least one low-delay time period from the at least one time period.

[0171] In a possible implementation, the processing module 520 is specifically configured to: determine a time period with the longest duration in at least one time period as a low-latency time period.

[0172] In a possible implementation, the execution parameter includes a detection speed. The processing module 520 is specifically used to: determine the execution parameter of the CC check according to at least one low latency time period, including: determining the detection time period according to at least one low latency time period; determining the parameter value of the detection speed of the CC check according to the detection time period and the disk group capacity corresponding to the Raid card.

[0173] In a possible implementation, the processing module 520 is specifically configured to calculate a ratio between the capacity of the RAID group and the startup time, and use the ratio as a detection speed of the CC check.

[0174] In a possible implementation, the processing module 520 is specifically used to: during the execution of the CC check, determine the smaller value between the parameter value of the detection speed and the speed threshold as the actual detection speed of the CC check, and the speed threshold represents the maximum speed allowed when reading and writing the RAID group.

[0175] In one possible implementation, the processing module 520 is also used to: configure and start the CC check according to the execution parameters of the CC check; during the CC check process, monitor the detection speed of the CC check and the current IO delay of the Raid card; when the current IO delay is detected to be greater than the delay threshold, reduce the detected CC check detection speed.

[0176] In a possible implementation, the processing module 520 is specifically configured to: reduce the detection speed of the monitored CC check according to a preset coefficient until the current IO delay is less than or equal to the delay threshold.

[0177] In a possible implementation manner, the delay threshold is a maximum value in the delay variation information.

[0178] In a possible implementation, the processing module 520 is specifically configured to: disable CC check; and monitor values ​​of delay-related parameters to obtain delay variation information.

[0179] Based on the same concept as the aforementioned CC verification method, an embodiment of the present application further provides a computing device.

[0180] Figure 6A schematic diagram of the structure of a computing device provided in an embodiment of the present application. Figure 6 As shown, the computing device 600 includes at least one processor 610, a memory 620 and a communication interface 630. The processor 610, the memory 620 and the communication interface 630 are connected in communication, and the communication connection can be achieved by wired means (such as a bus) or by wireless means. The communication interface 630 is used to receive data sent by other devices; the memory 620 stores computer instructions, and the processor 610 executes the computer instructions to execute the method in the aforementioned method embodiment.

[0181] It should be understood that in the embodiment of the present application, the processor 610 may be a central processing unit CPU, and the processor 610 may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0182] The memory 620 may include a read-only memory and a random access memory, and provides instructions and data to the processor 610. The memory 620 may also include a nonvolatile random access memory.

[0183] The memory 620 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct ram bus RAM (DR RAM).

[0184] It should be understood that the computing device 600 according to the embodiment of the present application can execute the method mentioned in the embodiment of the present application. The detailed description of the implementation of the method is shown above, and for the sake of brevity, it will not be repeated here.

[0185] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer instructions are executed by a processor, the above-mentioned method is implemented.

[0186] An embodiment of the present application provides a computer program or a computer program product, wherein the computer program or the computer program product comprises instructions, and when the instructions are executed, the computer is caused to execute the above-mentioned method.

[0187] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0188] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented by hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0189] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A CC verification method, characterized in that: include: Get the latency change information of historical IO operations on the Raid card; Determine at least one low latency time period according to the latency change information; An execution parameter of the CC check is determined according to the at least one low latency time period.

2. The method according to claim 1, characterized in that The execution parameter includes a start time, and the determining the execution parameter of the CC check according to the at least one low latency time period includes: Determining a detection time period according to the at least one low latency time period; The parameter value of the start time is determined according to the start time of the detection time period.

3. The method according to claim 2, characterized in that The determining the detection time period according to the at least one low latency time period includes: Calculating an overlap of the at least one low latency time period; A detection time period is determined according to the time period corresponding to the overlapping portion.

4. The method according to any one of claims 1 to 3, characterized in that: The execution parameter includes a detection period, and the determining the execution parameter of the CC check according to the at least one low latency time period includes: Determining a detection time period according to the at least one low latency time period; According to the cycle period of the detection time period, a parameter value of the detection period of the CC check is determined.

5. The method according to claim 4, characterized in that The determining, according to the cycle period of the detection time period, a parameter value of the detection period of the CC check includes: When the first cycle is used as the cycle period and there is an overlapping part in the detection time periods, the first cycle is determined as the parameter value of the detection cycle; When the first cycle is used as the cycle period and there is no overlapping part in the detection time periods, the second cycle is determined as the parameter value of the detection cycle, and the second cycle is a cycle whose cycle length is greater than the first cycle.

6. The method according to any one of claims 1 to 5, characterized in that: The execution parameter includes a detection speed, and determining the execution parameter of the CC check according to the at least one low latency time period includes: Determining a detection time period according to the at least one low latency time period; The parameter value of the detection speed of the CC check is determined according to the detection time period and the disk group capacity corresponding to the Raid card.

7. The method according to claim 6, characterized in that During the execution of the CC check, the actual detection speed of the CC check is the smaller value between the parameter value of the detection speed and a speed threshold, and the speed threshold represents the maximum read and write speed allowed by the disk group of the Raid card.

8. The method according to any one of claims 1 to 7, characterized in that: Also includes: Configuring and starting the CC check according to the execution parameters of the CC check; During the CC check, monitoring the detection speed of the CC check and the current IO delay of the Raid card; When it is monitored that the current IO delay is greater than the delay threshold, the detection speed of the monitored CC check is reduced.

9. The method according to claim 8, characterized in that The reducing the monitored detection speed of the CC check includes: According to the preset coefficient, the monitored detection speed of the CC check is reduced until the current IO delay is less than or equal to the delay threshold.

10. A computing device, characterized in that The computing device comprises: a processor and a memory; the memory stores instruction operations or codes; the processor is configured to communicate with the memory and execute the instruction operations or codes in the memory to perform any method in claims 1-9.