Reconstruction rate interval determination method based on RAID, electronic equipment and storage medium

By dynamically adjusting the utilization rate of CPU and hard disk, the problem of unbalanced resource allocation in soft RAID systems during data reconstruction is solved, and more efficient resource utilization and system performance improvement is achieved.

CN119537087APending Publication Date: 2025-02-28AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411687375.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the prior art, soft RAID systems will occupy the system resources of the operating system when reconstructing data, resulting in the impact of system performance and the problem of unbalanced system resource allocation.

Method used

The CPU and target hard disk are sampled multiple times by preset acquisition frequency to obtain the utilization rate of the CPU and hard disk, calculate the ratio of the CPU and hard disk based on these data, and adjust the current reconstruction rate interval to achieve the purpose of balancing the allocation of system resources.

Benefits of technology

It realizes that while ensuring the data reconstruction rate, it improves resource utilization, avoids unnecessary resource occupation, and achieves the effect of balanced allocation of system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537087A_ABST
    Figure CN119537087A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an RAID-based reconstruction rate interval determination method, electronic equipment and a storage medium, and is applied to the technical field of computers. The method comprises the following steps: sampling a central processing unit (CPU) and a target hard disk for multiple times according to a preset acquisition frequency to obtain a plurality of first CPU utilization rates and a plurality of first hard disk utilization rates; if the current reconstruction speed, the plurality of first CPU utilization rates and the plurality of first hard disk utilization rates meet preset conditions, determining a first CPU proportion of the number of target first CPU utilization rates to the total number of the first CPU utilization rates based on the plurality of first CPU utilization rates; based on the multiple first hard disk utilization rates, determining a first hard disk proportion of the number of the target first hard disk utilization rates to the total number of the first hard disk utilization rates; according to the first CPU proportion and the first hard disk proportion, the current reconstruction rate interval is adjusted, and a target reconstruction rate interval is obtained. The method is used for achieving the effect of evenly distributing system resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method for determining a reconstruction rate interval based on RAID, an electronic device, and a storage medium. Background Art

[0002] Storage technology plays a vital role in computer systems. Redundant Array of Independent Disks (RAID) is a common data storage technology that combines multiple disks to achieve data redundancy and performance improvement. When a failed disk appears in a RAID group, data reconstruction is required to restore data integrity. For soft RAID systems, data reconstruction will occupy system resources of the operating system and may affect system performance.

[0003] The current method to solve the reconstruction performance of the soft RAID system is mainly to optimize the reconstruction rate by adjusting the maximum reconstruction rate that the RAID can achieve without IO load and the minimum reconstruction rate that can be achieved under IO load.

[0004] Therefore, the prior art solves the technical problem of unbalanced allocation of system resources. Summary of the invention

[0005] The embodiments of the present application provide a RAID-based reconstruction rate interval determination method, an electronic device, and a storage medium to achieve the technical effect of evenly allocating system resources.

[0006] In a first aspect, an embodiment of the present application provides a method for determining a reconstruction rate interval based on RAID, comprising:

[0007] Sampling the central processing unit CPU and the target hard disk multiple times according to a preset acquisition frequency to obtain multiple first CPU utilizations and multiple first hard disk utilizations, where the target hard disk is a hard disk in a non-reconstruction state;

[0008] If the current reconstruction speed, the multiple first CPU utilizations, and the multiple first hard disk utilizations meet the preset conditions, then based on the multiple first CPU utilizations, a first CPU ratio of the number of target first CPU utilizations to the total number of first CPU utilizations is determined, and the target first CPU utilization is the first CPU utilization that is greater than the preset CPU utilization among the multiple first CPU utilizations;

[0009] Based on the multiple first hard disk utilizations, determining the first hard disk ratio of the number of target first hard disk utilizations to the total number of first hard disk utilizations, the target first hard disk utilization being the first hard disk utilization among the multiple first hard disk utilizations that is equal to the preset hard disk utilization;

[0010] According to the first CPU ratio and the first hard disk ratio, the current reconstruction rate interval is adjusted to obtain a target reconstruction rate interval.

[0011] In a possible implementation manner, the preset condition includes at least one of the following preset sub-conditions:

[0012] The current reconstruction speed is greater than the preset reconstruction speed;

[0013] The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is not 0, the hard disk utilization threshold is not 0, and the first CPU utilization average of the multiple first CPU utilizations is greater than the CPU utilization threshold;

[0014] The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is not 0, the hard disk utilization threshold is not 0, and the first hard disk utilization average of the multiple first hard disk utilizations is greater than the hard disk utilization threshold;

[0015] The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is 0, and the hard disk utilization threshold is 0.

[0016] In a possible implementation, adjusting the current reconstruction rate interval according to the first CPU ratio and the first hard disk ratio to obtain the target reconstruction rate interval includes:

[0017] If the first CPU ratio is greater than or equal to the preset CPU ratio, determining the value of the first CPU usage state to be a first value;

[0018] If the first CPU ratio is less than the preset CPU ratio, determining the value of the first CPU usage state to be a second value;

[0019] If the first hard disk ratio is greater than or equal to the preset hard disk ratio, determining the value of the first hard disk usage status to be a first value;

[0020] If the first hard disk ratio is less than the preset hard disk ratio, determining the value of the first hard disk usage status to be a second value;

[0021] According to the value of the first CPU usage state and the value of the first hard disk usage state, the current reconstruction rate interval is adjusted to obtain a target reconstruction rate interval.

[0022] In a possible implementation, adjusting the current reconstruction rate interval according to the value of the first CPU usage state and the value of the first hard disk usage state to obtain the target reconstruction rate interval includes:

[0023] If the current reconstruction speed is not greater than the preset reconstruction speed, and the value of the first CPU usage state and the value of the first hard disk usage state are both the second value, determining the target reconstruction rate interval according to the type of the target hard disk and a preset mapping relationship, where the preset mapping relationship is used to indicate the correspondence between the type of the hard disk and the reconstruction rate interval;

[0024] If the value of the first CPU usage state is the first value, or the value of the first hard disk usage state is the first value, the current reconstruction rate interval is adjusted to the initial reconstruction rate interval.

[0025] In a possible implementation, after sampling the CPU and the target hard disk multiple times according to a preset acquisition frequency to obtain multiple first CPU utilizations and multiple first hard disk utilizations, the method further includes:

[0026] When the current reconstruction speed is not greater than the preset reconstruction speed, calculating a first CPU utilization average of the plurality of first CPU utilizations and a first hard disk utilization average of the plurality of first hard disk utilizations;

[0027] If the first CPU utilization average value is not greater than the CPU utilization threshold, and the first hard disk utilization average value is not greater than the hard disk utilization threshold, a target reconstruction rate range is determined according to the type of the target hard disk and a preset mapping relationship.

[0028] In a possible implementation, the method further includes:

[0029] After data reconstruction is performed based on the target reconstruction rate interval, the CPU and the target hard disk are sampled again multiple times according to the preset acquisition frequency to obtain multiple second CPU utilizations and multiple second hard disk utilizations, where the target hard disk is a hard disk in a non-reconstruction state;

[0030] Determining a value of a second CPU usage state based on the plurality of second CPU utilizations and a preset CPU ratio;

[0031] Determining a value of the second hard disk usage state based on a plurality of second hard disk utilization rates and a preset hard disk ratio;

[0032] The CPU utilization threshold, the hard disk utilization threshold, and the target reconstruction rate interval are updated according to the value of the first CPU usage state, the value of the second CPU usage state, the value of the first hard disk usage state, and the value of the second hard disk usage state.

[0033] In a possible implementation, the CPU utilization threshold, the hard disk utilization threshold, and the target reconstruction rate interval are updated according to the value of the first CPU usage state, the value of the second CPU usage state, the value of the first hard disk usage state, and the value of the second hard disk usage state, including:

[0034] If the value of the first CPU usage state, the value of the second CPU usage state, the value of the first hard disk usage state, and the value of the second hard disk usage state are all second values, determining whether an average second CPU utilization of the plurality of second CPU utilizations is greater than a CPU utilization threshold, and whether an average second hard disk utilization of the plurality of second hard disk utilizations is greater than a hard disk utilization threshold;

[0035] If the second CPU utilization average value of the plurality of second CPU utilization values ​​is greater than the CPU utilization threshold value, and the second hard disk utilization average value of the plurality of second hard disk utilization values ​​is greater than the hard disk utilization threshold value, then the CPU utilization threshold value is updated to the second CPU utilization average value, and the hard disk utilization threshold value is updated to the second CPU utilization average value;

[0036] If the value of any one of the first CPU usage state, the second CPU usage state, the first hard disk usage state, and the second hard disk usage state is the first value, the target reconstruction rate interval is updated to the initial reconstruction rate interval.

[0037] In a second aspect, an embodiment of the present application provides a RAID-based reconstruction rate interval determination device, comprising:

[0038] An acquisition module is used to perform multiple sampling of a central processing unit CPU and a target hard disk according to a preset acquisition frequency to obtain multiple first CPU utilization rates and multiple first hard disk utilization rates, wherein the target hard disk is a hard disk in a non-reconstruction state;

[0039] A first processing module is used to determine, based on the multiple first CPU utilizations, a first CPU ratio of the number of target first CPU utilizations to the total number of first CPU utilizations when the current reconstruction speed, the multiple first CPU utilizations, and the multiple first hard disk utilizations meet a preset condition, the target first CPU utilization being a first CPU utilization greater than a preset CPU utilization among the multiple first CPU utilizations;

[0040] A second processing module is used to determine a first hard disk ratio of a target number of first hard disk utilizations to a total number of first hard disk utilizations based on a plurality of first hard disk utilizations, wherein the target first hard disk utilization is a first hard disk utilization that is equal to a preset hard disk utilization among the plurality of first hard disk utilizations;

[0041] The third processing module is used to adjust the current reconstruction rate interval according to the first CPU ratio and the first hard disk ratio to obtain a target reconstruction rate interval.

[0042] In a possible implementation manner, the preset condition includes at least one of the following preset sub-conditions:

[0043] The current reconstruction speed is greater than the preset reconstruction speed;

[0044] The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is not 0, the hard disk utilization threshold is not 0, and the first CPU utilization average of the multiple first CPU utilizations is greater than the CPU utilization threshold;

[0045] The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is not 0, the hard disk utilization threshold is not 0, and the first hard disk utilization average of the multiple first hard disk utilizations is greater than the hard disk utilization threshold;

[0046] The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is 0, and the hard disk utilization threshold is 0.

[0047] In a possible implementation manner, the third processing module is further configured to:

[0048] When the first CPU ratio is greater than or equal to the preset CPU ratio, determining that the value of the first CPU usage state is a first value;

[0049] When the first CPU ratio is less than the preset CPU ratio, determining the value of the first CPU usage state to be a second value;

[0050] When the first hard disk ratio is greater than or equal to the preset hard disk ratio, determining the value of the first hard disk usage state to be a first value;

[0051] When the first hard disk ratio is less than the preset hard disk ratio, determining the value of the first hard disk usage state to be a second value;

[0052] According to the value of the first CPU usage state and the value of the first hard disk usage state, the current reconstruction rate interval is adjusted to obtain a target reconstruction rate interval.

[0053] In a possible implementation manner, the third processing module is further configured to:

[0054] When the current reconstruction speed is not greater than the preset reconstruction speed, and the value of the first CPU usage state and the value of the first hard disk usage state are both the second value, determining the target reconstruction rate interval according to the type of the target hard disk and a preset mapping relationship, where the preset mapping relationship is used to indicate the correspondence between the type of the hard disk and the reconstruction rate interval;

[0055] When the value of the first CPU usage state is the first value, or the value of the first hard disk usage state is the first value, the current reconstruction rate interval is adjusted to the initial reconstruction rate interval.

[0056] In a possible implementation, the acquisition module is further used to:

[0057] When the current reconstruction speed is not greater than the preset reconstruction speed, calculating a first CPU utilization average of the plurality of first CPU utilizations and a first hard disk utilization average of the plurality of first hard disk utilizations;

[0058] If the first CPU utilization average value is not greater than the CPU utilization threshold, and the first hard disk utilization average value is not greater than the hard disk utilization threshold, a target reconstruction rate range is determined according to the type of the target hard disk and a preset mapping relationship.

[0059] In a possible implementation manner, the device further includes a fourth processing module, configured to:

[0060] After data reconstruction is performed based on the target reconstruction rate interval, the CPU and the target hard disk are sampled again multiple times according to the preset acquisition frequency to obtain multiple second CPU utilizations and multiple second hard disk utilizations, where the target hard disk is a hard disk in a non-reconstruction state;

[0061] Determining a value of a second CPU usage state based on the plurality of second CPU utilizations and a preset CPU ratio;

[0062] Determining a value of the second hard disk usage state based on a plurality of second hard disk utilization rates and a preset hard disk ratio;

[0063] The CPU utilization threshold, the hard disk utilization threshold, and the target reconstruction rate interval are updated according to the value of the first CPU usage state, the value of the second CPU usage state, the value of the first hard disk usage state, and the value of the second hard disk usage state.

[0064] In a possible implementation manner, the fourth processing module is further configured to:

[0065] When the value of the first CPU usage state, the value of the second CPU usage state, the value of the first hard disk usage state, and the value of the second hard disk usage state are all second values, determining whether an average second CPU utilization of the plurality of second CPU utilizations is greater than a CPU utilization threshold, and whether an average second hard disk utilization of the plurality of second hard disk utilizations is greater than a hard disk utilization threshold;

[0066] When the second CPU utilization average value of the plurality of second CPU utilization values ​​is greater than the CPU utilization threshold value, and the second hard disk utilization average value of the plurality of second hard disk utilization values ​​is greater than the hard disk utilization threshold value, updating the CPU utilization threshold value to the second CPU utilization average value, and updating the hard disk utilization threshold value to the second CPU utilization average value;

[0067] When the value of any one of the first CPU usage state, the second CPU usage state, the first hard disk usage state, and the second hard disk usage state is the first value, the target reconstruction rate interval is updated to the initial reconstruction rate interval.

[0068] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;

[0069] Memory stores computer-executable instructions;

[0070] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0071] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.

[0072] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0073] The embodiment of the present application provides a method, electronic device and storage medium for determining a reconstruction rate interval based on RAID. The CPU and the target hard disk are sampled multiple times at a preset acquisition frequency to obtain multiple first CPU utilizations and multiple first hard disk utilizations; a judgment is made based on the current RAID reconstruction rate, multiple first CPU utilizations, and multiple first hard disk utilizations to determine whether the preset conditions are met; when the preset conditions are met, the first CPU ratio is calculated based on the multiple first CPU utilizations, and the first hard disk ratio is calculated based on the multiple first hard disk utilizations; the current reconstruction rate interval is adjusted according to the first hard disk ratio and the first CPU ratio to obtain the target reconstruction rate interval. Compared with the prior art, the present application dynamically adjusts the reconstruction rate interval in combination with the CPU utilization and the hard disk utilization during RAID data reconstruction, thereby improving the utilization of resources while ensuring the reconstruction rate, and achieving the effect of balanced distribution of system resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0075] Figure 1 Schematic diagram of the process of determining the reconstruction rate interval based on RAID provided in this application Figure 1 ;

[0076] Figure 2 Schematic diagram of the process of determining the reconstruction rate interval based on RAID provided in this application Figure 2 ;

[0077] Figure 3 A schematic diagram of a reconstruction rate parameter setting matching table provided in an embodiment of the present application;

[0078] Figure 4 Schematic diagram of the process of determining the reconstruction rate interval based on RAID provided in this application Figure 3 ;

[0079] Figure 5 Schematic diagram of the process of determining the reconstruction rate interval based on RAID provided in this application Figure 4 ;

[0080] Figure 6 A schematic diagram of the structure of a RAID-based reconstruction rate interval determination device provided in the present application;

[0081] Figure 7 A schematic diagram of the structure of the electronic device provided in this application.

[0082] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0083] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0084] In the prior art, when a soft RAID system is performing data reconstruction, it needs to perform data reconstruction through a software system, which increases the occupation of system resources. In order to solve the problem of data reconstruction in a soft RAID system, the maximum reconstruction rate that can be achieved by RAID without IO load and the minimum reconstruction rate that can be achieved under IO load are adjusted; thus, the reconstruction rate of RAID is constrained and limited.

[0085] However, when adjusting the reconstruction rate, if the reconstruction rate is lowered to reduce resource usage, the data redundancy of the data reconstruction device will increase; if the reconstruction rate is increased to increase the reconstruction rate, a large amount of system resources will be occupied. For example, if a hard disk fails in the RAID, the data in the hard disk needs to be migrated and reconstructed. At this time, the device to which the hard disk belongs is running a large number of data processing services; the hard disk itself has a large amount of data that needs to be reconstructed. In order to ensure rapid reconstruction of the data, the data reconstruction rate is increased. At this time, more system resources are needed to achieve data reconstruction, resulting in the inability to effectively process the current data processing business; thus, there is a technical problem of unbalanced allocation of system resources.

[0086] In response to the above technical problems, the present application proposes the following technical concept: the adjustment of the reconstruction rate in the prior art does not take into account the system load during the actual data reconstruction, which leads to the problem of unbalanced resource allocation. Therefore, it is possible to consider dynamic rate adjustment based on the current system operation status. Specifically: based on the preset acquisition frequency, for the RAID of the current data reconstruction, collect the corresponding CPU utilization and hard disk utilization; combine the current running CPU utilization and hard disk utilization, calculate the proportion of utilization exceeding the preset utilization; this proportion can reflect the current CPU load and hard disk load; based on the CPU load and hard disk load, judge whether the current situation can increase the reconstruction rate, or whether the reconstruction rate needs to be reduced; thereby realizing dynamic reconstruction rate interval adjustment, while ensuring the data reconstruction rate, avoiding unnecessary resource occupation, thereby achieving the technical effect of balanced allocation of system resources.

[0087] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0088] Figure 1 Schematic diagram of the process of determining the reconstruction rate interval based on RAID provided in this application Figure 1 ,like Figure 1 As shown, the method includes:

[0089] S101 . Sampling a central processing unit (CPU) and a target hard disk multiple times according to a preset sampling frequency to obtain multiple first CPU utilizations and multiple first hard disk utilizations.

[0090] In this step, the target hard disk is a hard disk in a non-reconstruction state. The preset acquisition frequency refers to the time period of the acquisition.

[0091] Optionally, a possible implementation manner of acquiring a plurality of first CPU utilizations and a plurality of first hard disk utilizations according to a preset collection frequency is:

[0092] S1011. When a RAID-triggered reconstruction action is detected, the first preset duration is used as the total sampling period, the second preset duration is used as the unit sampling period, the first preset number of unit sampling periods is used as the sampling window width, and the second preset number of unit sampling periods is used as the sliding window step.

[0093] For example, the first preset duration is set to 60 seconds, the second preset duration is set to 1 second, the first preset number is set to 10, and the second preset number is set to 5, and finally 11 sample data are obtained, as well as 11 first CPU utilizations and 11 first hard disk utilizations.

[0094] S1012. Poll the CPU utilization and the hard disk utilization based on the sliding window and the sampling window to obtain a plurality of first CPU utilizations and a plurality of first hard disk utilizations.

[0095] Optionally, after obtaining the plurality of first CPU utilizations and the plurality of first hard disk utilizations, the method further includes calculating an average utilization and adjusting the reconstruction rate interval based on the average utilization, specifically:

[0096] S1013: When the current reconstruction speed is not greater than the preset reconstruction speed, calculate a first CPU utilization average of a plurality of first CPU utilizations and a first hard disk utilization average of a plurality of first hard disk utilizations.

[0097] In this step, if the number of collected first CPU utilizations is 10, then the first CPU utilization average corresponding to the 10 first CPU utilizations is calculated, and the calculation method of the first hard disk utilization average is the same as the calculation method of the first CPU utilization average.

[0098] S1014: If the first CPU utilization average value is not greater than the CPU utilization threshold, and the first hard disk utilization average value is not greater than the hard disk utilization threshold, determine a target reconstruction rate range according to the type of the target hard disk and a preset mapping relationship.

[0099] In this step, the preset mapping relationship includes the type of the target hard disk and the target reconstruction rate interval corresponding to the target hard disk. It should be noted that when the first CPU utilization average value is not greater than the CPU utilization threshold, and the first hard disk utilization average value is not greater than the hard disk utilization threshold, it indicates that the current CPU load and hard disk load are idle, and more system resources can be used for RAID data reconstruction. Therefore, the target reconstruction rate interval can be obtained according to the target hard disk type and its preset mapping relationship, and the current reconstruction rate interval is adjusted to the target reconstruction rate interval.

[0100] S102: If the current reconstruction speed, the utilization rates of the multiple first CPUs, and the utilization rates of the multiple first hard disks meet preset conditions, determine a first CPU ratio of the number of target first CPU utilization rates to the total number of first CPU utilization rates based on the multiple first CPU utilization rates.

[0101] In this step, the target first CPU utilization is a first CPU utilization among multiple first CPU utilizations that is greater than a preset CPU utilization.

[0102] Exemplarily, the preset CPU utilization is set to 90%, there are 20 first CPU utilizations, of which 16 are greater than the preset CPU utilization, and the calculated first CPU ratio is 80%.

[0103] Optionally, the preset condition includes at least one of the following preset sub-conditions:

[0104] S1021. The current reconstruction speed is greater than the preset reconstruction speed.

[0105] Exemplarily, the preset reconstruction speed is set to a maximum reconstruction rate of 200000 when there is no IO, and a minimum reconstruction rate of 1000 when there is IO. When the current reconstruction rate exceeds the interval, it can be determined that the current RAID data reconstruction scenario is a high reconstruction rate scenario.

[0106] S1022: The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is not 0, the hard disk utilization threshold is not 0, and the first CPU utilization average of the multiple first CPU utilizations is greater than the CPU utilization threshold.

[0107] In this step, if the current reconstruction rate is not greater than the preset reconstruction rate, it indicates that the current scene is a low reconstruction rate scene; in the low reconstruction rate scene, if the current CPU utilization threshold and the hard disk utilization threshold are not empty, it is necessary to determine whether the current CPU utilization average value is greater than the corresponding CPU utilization threshold. The average value of CPU utilization is used to characterize the current CPU load; if the average value of CPU utilization exceeds the CPU utilization threshold, it is necessary to combine the first CPU ratio and the first hard disk ratio to determine whether it is necessary to update the CPU utilization threshold or adjust the reconstruction rate range.

[0108] S1023: The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is not 0, the hard disk utilization threshold is not 0, and the first hard disk utilization average of the multiple first hard disk utilizations is greater than the hard disk utilization threshold.

[0109] This step is consistent with the corresponding explanation in S1022. It should be noted that in a low reconstruction rate scenario, if the current CPU utilization threshold and the hard disk utilization threshold are not empty, as long as any one of the first CPU utilization average value and the first hard disk utilization average value is greater than the corresponding threshold, it indicates that the corresponding threshold needs to be updated and the reconstruction rate range needs to be adjusted.

[0110] S1024: The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is 0, and the hard disk utilization threshold is 0.

[0111] In this step, if the current reconstruction speed is not greater than the preset reconstruction speed, it indicates that in the current processing of the low reconstruction rate scenario, if the CPU utilization threshold and the hard disk utilization threshold are both 0, it indicates that both are in the default initial state, and the CPU utilization threshold and the hard disk utilization threshold need to be updated, and during the update process, it is determined whether the reconstruction rate range needs to be adjusted.

[0112] S103 . Determine, based on the plurality of first hard disk utilizations, a first hard disk ratio of the number of target first hard disk utilizations to the total number of first hard disk utilizations.

[0113] In this step, the target first hard disk utilization is a first hard disk utilization among a plurality of first hard disk utilizations that is equal to a preset hard disk utilization.

[0114] Exemplarily, the preset hard disk utilization is set to 100%, there are 20 first hard disk utilizations, of which 16 are target first hard disk utilizations that are equal to the preset hard disk utilization, and the calculated first hard disk ratio is 80%.

[0115] S104: Adjust the current reconstruction rate interval according to the first CPU ratio and the first hard disk ratio to obtain a target reconstruction rate interval.

[0116] In this step, a possible implementation method for adjusting the current reconstruction rate range according to the first CPU ratio and the first hard disk ratio is: according to the first CPU ratio and the first hard disk ratio, respectively calculate the value of the first CPU usage status and the value of the first hard disk usage status, which can reflect the current CPU usage status and the hard disk usage status; and based on the usage status value, it can be judged whether the current CPU and hard disk have sufficient idle system resources for data reconstruction; if so, the reconstruction rate range can be adjusted according to the mapping relationship between the type of the target hard disk and the reconstruction rate.

[0117] It should be noted that in this step, how to adjust the reconstruction rate range based on the first CPU ratio and the first hard disk ratio is described below. Figure 2 Further detailed explanation is given in the illustrated embodiment and unnecessary elaboration is omitted here.

[0118] The method for determining the reconstruction rate interval based on RAID provided in the embodiment of the present application performs multiple sampling of the CPU and the target hard disk at a preset acquisition frequency to obtain multiple first CPU utilizations and multiple first hard disk utilizations; judges whether the preset conditions are met based on the current RAID reconstruction rate, multiple first CPU utilizations, and multiple first hard disk utilizations; calculates the first CPU ratio based on multiple first CPU utilizations and the first hard disk ratio based on multiple first hard disk utilizations when the preset conditions are met; adjusts the current reconstruction rate interval based on the first hard disk ratio and the first CPU ratio to obtain the target reconstruction rate interval. Compared with the prior art, the present application dynamically adjusts the reconstruction rate interval in combination with the CPU utilization and the hard disk utilization during RAID data reconstruction, thereby improving the utilization of resources while ensuring the reconstruction rate, and achieving the effect of evenly allocating system resources.

[0119] Figure 2 Schematic diagram of the process of determining the reconstruction rate interval based on RAID provided in this application Figure 2 ,like Figure 2 As shown, in this embodiment Figure 1 Based on the illustrated embodiment, the adjustment of the reconstruction rate interval in S04 is further described in detail. The method includes:

[0120] S201: If the current reconstruction speed is not greater than the preset reconstruction speed, determine whether the value of the first CPU usage state and the value of the first hard disk usage state are both the second value.

[0121] In this step, if the current reconstruction speed is not greater than the preset reconstruction speed, it indicates that the current reconstruction rate is low.

[0122] S202: When the value of the first CPU usage state and the value of the first hard disk usage state are both the second value, determine a target reconstruction rate range according to the type of the target hard disk and a preset mapping relationship.

[0123] In this step, the preset mapping relationship is used to represent the corresponding relationship between the hard disk type and the reconstruction rate range.

[0124] Optionally, before adjusting the reconstruction rate interval according to the state value, it is also necessary to obtain the value of the first CPU usage state and the value of the first hard disk usage state. A possible implementation of the acquisition method is:

[0125] It should be noted that, in the following steps, the first value is set to 0, and the second value is set to 1. This is only an exemplary setting, and the present application does not limit the setting of the first value and the second value.

[0126] S2021: If the first CPU ratio is greater than or equal to the preset CPU ratio, determine that the value of the first CPU usage state is a first value.

[0127] S2022: If the first CPU ratio is less than the preset CPU ratio, determine that the value of the first CPU usage status is a second value.

[0128] Exemplarily, when the preset CPU ratio is 70%, if the current first CPU ratio is lower than 70%, the value of the first CPU usage status is 1, otherwise it is 0.

[0129] S2023: If the first hard disk ratio is greater than or equal to the preset hard disk ratio, determine that the value of the first hard disk usage status is a first value;

[0130] S2024: If the first hard disk ratio is less than the preset hard disk ratio, determine that the value of the first hard disk usage status is a second value.

[0131] Exemplarily, when the preset hard disk ratio is 80%, if the current first hard disk ratio is lower than 80%, the value of the first hard disk usage status is 1, otherwise it is 0.

[0132] In this step, when the value of the first CPU usage status and the value of the first hard disk usage status are both 1, the AND operation is used to calculate the result of the AND operation of the value of the first CPU usage status and the value of the first hard disk usage status, and it is determined as the system load identifier. When the system load identifier is 1, the target reconstruction rate range is determined according to the type of the target hard disk and the preset mapping relationship.

[0133] Illustratively, an embodiment of the present application provides a reconstruction rate parameter setting matching table, which sets reconstruction rate intervals corresponding to different hard disk models under different system load conditions. Figure 3 A schematic diagram of a reconstruction rate parameter setting matching table provided in an embodiment of the present application, such as Figure 3 As shown, the first column of the table refers to the serial number of each target hard disk; the second column of the table refers to the current system load identifier; the third column of the table refers to the type of each target hard disk; the fourth column of the table refers to the maximum reconstruction rate (sync_speed_max) that can be achieved without IO, and the minimum reconstruction rate (sync_speed_min) that can be achieved when IO is sent, and the unit of the reconstruction rate is KB / s. The maximum reconstruction rate (sync_speed_max) that can be achieved without IO, and the minimum reconstruction rate (sync_speed_min) that can be achieved when IO is sent constitute the reconstruction rate range in this application.

[0134] exist Figure 3 In the example shown, the hard disk types include: Hard Disk Drive (HDD), Serial Advanced Technology Attachment Solid State Drive (SATA SSD), Non-Volatile Memory Express SolidState Drive (NVMe SSD). When the system load indicator is 0, the reconstruction rate intervals corresponding to the three different types of hard disks are all the same default initial value; when the system load indicator is 1, the reconstruction rate intervals corresponding to the three different types of hard disks are based on the same default initial value. Figure 3 Examples in .

[0135] S203: If the value of the first CPU usage state is the first value, or the value of the first hard disk usage state is the first value, adjusting the current reconstruction rate interval to the initial reconstruction rate interval.

[0136] In this step, when any one of the values ​​of the first CPU usage status and the first hard disk usage status is the first value, it indicates that the system load identifier calculated based on the values ​​of the first CPU usage status and the first hard disk usage status is 0, indicating that the current reconstruction rate range is the default initial reconstruction rate range.

[0137] S204: After reconstructing data based on the target reconstruction rate interval, sampling the CPU and the target hard disk multiple times again according to a preset acquisition frequency to obtain multiple second CPU utilizations and multiple second hard disk utilizations.

[0138] In this step, the target hard disk is a hard disk in a non-reconstruction state. After adjusting the target reconstruction rate interval, resample the utilization to obtain multiple second CPU utilizations and second hard disk utilizations after the reconstruction rate interval adjustment. The purpose of resampling is to check whether the reconstruction rate after adjustment is appropriate, to avoid excessively high reconstruction rate occupying a large amount of system resources, thereby affecting the system business operation of the journey.

[0139] S205: Determine a value of the second CPU usage state based on the plurality of second CPU utilizations and a preset CPU ratio.

[0140] Optionally, the value of the second CPU usage status may be determined in the following manner:

[0141] S2051. Determine a second CPU ratio of a target number of second CPU utilizations to a total number of second CPU utilizations based on multiple second CPU utilizations, wherein the target second CPU utilization refers to a second CPU utilization greater than a preset CPU utilization among the multiple second CPU utilizations.

[0142] S2052: Determine whether the second CPU ratio is less than the preset CPU ratio. If so, the value of the second CPU usage status is 1; if not, the value of the second CPU usage status is 0.

[0143] S206: Determine a value of the second hard disk usage status based on the utilization rates of the plurality of second hard disks and a preset hard disk ratio.

[0144] Optionally, the value of the second hard disk usage status may be determined by:

[0145] S2061. Based on multiple second hard disk utilizations, determine the second hard disk ratio of the target second hard disk utilization number and the total second hard disk utilization number, wherein the target second hard disk utilization refers to the second hard disk utilization among the multiple second hard disk utilizations that is greater than the preset hard disk utilization.

[0146] S2062: Determine whether the second hard disk ratio is less than the preset hard disk ratio. If so, the value of the second hard disk usage status is 1; if not, the value of the second hard disk usage status is 0.

[0147] S207 . Update the CPU utilization threshold, the hard disk utilization threshold, and the target reconstruction rate interval according to the value of the first CPU usage state, the value of the second CPU usage state, the value of the first hard disk usage state, and the value of the second hard disk usage state.

[0148] Optionally, a possible implementation method for updating the CPU utilization threshold, the hard disk utilization threshold, and the target reconstruction rate interval is:

[0149] S2071. If the value of the first CPU usage status, the value of the second CPU usage status, the value of the first hard disk usage status, and the value of the second hard disk usage status are all second values, determine whether the average second CPU utilization of multiple second CPU utilizations is greater than the CPU utilization threshold, and whether the average second hard disk utilization of multiple second hard disk utilizations is greater than the hard disk utilization threshold.

[0150] In this step, the judgment method for the first CPU usage status value, the second CPU usage status value, the first hard disk usage status value, and the second hard disk usage status value to be all the second value may be:

[0151] The first system load identifier is calculated based on the value of the first CPU usage state and the value of the first hard disk usage state, and the second system load identifier is calculated based on the value of the second CPU usage state and the value of the second hard disk usage state. An AND operation is performed based on the first system load identifier and the second system load identifier, and it is determined whether the calculation result is 1, and if it is 1, it indicates that the values ​​of the qualification usage states are all the second values.

[0152] Exemplarily, the value of the first CPU usage status is 1, the value of the second CPU usage status is 1, the value of the first hard disk usage status is 1, and the value of the second hard disk usage status is 0; then the first system load identifier obtained by the AND operation is 1, and the second system load identifier is 0. The result of the AND operation based on the first system load identifier and the second system load identifier is 0, indicating that the current system load is too high, and the reconstruction rate range needs to be adjusted to the default initial reconstruction rate range.

[0153] In this step, the purpose of judging whether the second CPU utilization average value of multiple second CPU utilization values ​​is greater than the CPU utilization threshold, and whether the second hard disk utilization average value of multiple second hard disk utilization values ​​is greater than the hard disk utilization threshold is to judge whether the CPU utilization threshold and the hard disk utilization threshold need to be updated.

[0154] S2072. If the second CPU utilization average value of multiple second CPU utilization values ​​is greater than the CPU utilization threshold, and the second hard disk utilization average value of multiple second hard disk utilization values ​​is greater than the hard disk utilization threshold, then update the CPU utilization threshold to the second CPU utilization average value, and update the hard disk utilization threshold to the second CPU utilization average value.

[0155] In this step, when the second CPU utilization average value is greater than the CPU utilization threshold, and the second hard disk utilization average value is greater than the hard disk utilization threshold, it is necessary to update the CPU utilization threshold and the hard disk utilization threshold.

[0156] Exemplarily, the CPU utilization threshold is 80%, and the hard disk utilization threshold is 60%; the currently calculated second CPU utilization average value is 90%, and the second hard disk utilization average value is 70%; it can be determined that the second CPU utilization average value is greater than the CPU utilization threshold, and the second hard disk utilization average value is greater than the hard disk utilization threshold; and the CPU utilization threshold is updated to 90%, and the hard disk utilization threshold is updated to 70%.

[0157] S2073: If the value of any one of the first CPU usage state, the second CPU usage state, the first hard disk usage state, and the second hard disk usage state is the first value, update the target reconstruction rate interval to the initial reconstruction rate interval.

[0158] In this step, when the value of any one of the first CPU usage state, the second CPU usage state, the first hard disk usage state, and the second hard disk usage state is the first value, the final calculated result of the AND operation of the first system load identifier and the second system load identifier is 0, indicating that the system load caused by the current reconstruction rate is high, and the reconstruction rate needs to be reduced to reduce the system load, so the target reconstruction rate interval is updated to the initial reconstruction rate interval.

[0159] In this embodiment, it is described how to determine whether it is necessary to adjust the reconstruction rate range and update the CPU utilization threshold and the hard disk utilization threshold based on the currently calculated CPU usage status value and the hard disk usage status value, so as to ensure the dynamic adjustment of the reconstruction rate range, ensure system performance while ensuring the efficiency of RAID data reconstruction.

[0160] On the basis of the above embodiments, the embodiments of the present application further provide a method for dynamically adjusting the reconstruction rate interval in a low reconstruction rate scenario. Figure 4 Schematic diagram of the process of determining the reconstruction rate interval based on RAID provided in this application Figure 3 ,like Figure 4 As shown, the method includes:

[0161] A1. Set the CPU utilization threshold L cpu To 0, set the hard disk utilization threshold L disk is 0.

[0162] A2. With 1 second as the first sampling period, 10 first sampling periods as the sampling window width, 5 first sampling periods as the sliding window step, and 55 seconds as the second sampling period, the CPU utilization and the target hard disk utilization are polled.

[0163] In this step, the number of CPU utilizations sampled is 10, and the number of hard disk utilizations corresponding to each target hard disk is 10.

[0164] A3. Calculate the average CPU utilization U in the second sampling period cpu And the average disk utilization U disk .

[0165] In this step, the average CPU utilization U cpu And the average hard disk utilization U disk The calculation formula is:

[0166]

[0167] In formula 1, U cpu Refers to the average CPU utilization, c i It refers to the sampling value corresponding to the CPU utilization at the i-th second in the sampling window, and 10 refers to the number of CPU utilizations obtained by sampling.

[0168]

[0169] In formula 2, U disk refers to the average disk utilization, N refers to the number of target hard disks, d ni It refers to the sampled value of the utilization of the nth target hard disk in the i-th second in the sampling window, and 10 refers to the number of hard disk utilizations sampled for each target hard disk.

[0170] A4. Determine whether the CPU utilization threshold and the hard disk utilization threshold are both 0. If so, jump to step A7.

[0171] A5. When both the CPU utilization threshold and the hard disk utilization threshold are empty, determine whether the average CPU utilization is less than or equal to the CPU utilization threshold, and the average hard disk utilization is less than or equal to the hard disk utilization threshold; if not, jump to step A7.

[0172] A6. If the average CPU utilization in A5 is less than or equal to the CPU utilization threshold, and the average hard disk utilization is less than or equal to the hard disk utilization threshold, the current reconstruction rate range is adjusted to the target reconstruction rate range according to the type of the target hard disk and the preset mapping relationship.

[0173] A7. Collect the sampled values ​​of CPU utilization and compare them with the CPU criteria. If the CPU criteria are met, determine the CPU usage status J cpu is 1, otherwise J is determined cpu is 0.

[0174] Among them, the CPU criterion is: CPU utilization c in the window i The number of sample values ​​greater than 90% is less than 70% of the total number of samples.

[0175] A8. Count the sampled values ​​of hard disk utilization and compare them with the hard disk criterion. If the hard disk criterion is met, determine the hard disk usage status. disk is 1, otherwise J is determined disk is 0.

[0176] The hard disk criterion is: the hard disk utilization rate d in the window ni The number of sample values ​​equal to 100% is less than 60% of the total number of samples.

[0177] A9. Calculate the system load indicator R according to the CPU usage status value and the hard disk usage status value, where R = J cpu &J disk .

[0178] A10. Determine whether the system load flag is 1.

[0179] A11. When the system load flag is not 1, the reconstruction rate interval of the RAID data reconstruction is determined as the initial reconstruction rate interval.

[0180] A12. When the system load indicator is 1, the current reconstruction rate range is increased and adjusted to the target reconstruction rate range according to the type of the target hard disk and the preset mapping relationship.

[0181] A13. 5 seconds after the reconstruction rate is increased, resample and calculate the average CPU utilization, average hard disk utilization and system load indicator R' after resampling in the above manner.

[0182] A14. Calculate the AND result of the system load identifier R before the update and the system load identifier R' after the update, and determine whether it is equal to 1. If it is equal to 1, execute step A16; if it is not equal to 1, execute step A15.

[0183] A15. Determine a reconstruction rate interval for RAID data reconstruction as an initial reconstruction rate interval.

[0184] A16. Determine the average CPU utilization U after the update cpu 'Is it greater than the CPU utilization threshold L cpu , and the average hard disk utilization U disk 'Is it greater than the hard disk utilization threshold L disk .

[0185] A17. If the judgment in A16 is established, the judgment threshold is refreshed and the average CPU utilization U after the update is cpu 'Determine the CPU utilization threshold L cpu , the average hard disk utilization U disk'Determine the hard disk utilization threshold L disk .

[0186] On the basis of the above embodiments, the embodiments of the present application further provide a method for dynamically adjusting the reconstruction rate interval in a high reconstruction rate scenario. Figure 5 Schematic diagram of the process of determining the reconstruction rate interval based on RAID provided in this application Figure 4 ,like Figure 5 As shown, the method includes:

[0187] B1. With 1 second as the first sampling period, 10 first sampling periods as the sampling window width, 5 first sampling periods as the sliding window step, and 55 seconds as the second sampling period, the CPU utilization and the target hard disk utilization are polled.

[0188] B2. Collect the sampled values ​​of CPU utilization and compare them with the CPU criteria. If the CPU criteria are met, determine the CPU usage status J cpu is 1, otherwise J is determined cpu is 0.

[0189] Among them, the CPU criterion is: CPU utilization c in the window i The number of sample values ​​greater than 90% is less than 70% of the total number of samples.

[0190] B3. Count the sampled values ​​of hard disk utilization and compare them with the hard disk criterion. If the hard disk criterion is met, determine the hard disk usage status J disk is 1, otherwise J is determined disk is 0.

[0191] The hard disk criterion is: the hard disk utilization rate d in the window ni The number of sample values ​​equal to 100% is less than 60% of the total number of samples.

[0192] B4. Calculate the system load indicator R according to the CPU usage status value and the hard disk usage status value, where R = J cpu &J disk .

[0193] B5. Determine whether the system load indicator is 1.

[0194] B6. When the system load indicator is 1, the current reconstruction rate range is kept unchanged.

[0195] B7. When the system load flag is not 1, the reconstruction rate interval is set to the initial reconstruction rate interval.

[0196] exist Figure 4 and Figure 5In the illustrated embodiment, examples are given of how to adjust the reconstruction rate according to different system load conditions in a low reconstruction rate scenario and a high reconstruction rate scenario.

[0197] Figure 6 A schematic diagram of the structure of the RAID-based reconstruction rate interval determination device provided in this application, such as Figure 6 As shown, the RAID-based reconstruction rate interval determination device 60 provided in this embodiment includes:

[0198] The acquisition module 601 is used to perform multiple sampling of the central processing unit CPU and the target hard disk according to a preset acquisition frequency to obtain multiple first CPU utilization rates and multiple first hard disk utilization rates, where the target hard disk is a hard disk in a non-reconstruction state;

[0199] The first processing module 602 is used to determine, based on the multiple first CPU utilizations, a first CPU ratio of the number of target first CPU utilizations to the total number of first CPU utilizations when the current reconstruction speed, the multiple first CPU utilizations, and the multiple first hard disk utilizations meet a preset condition, the target first CPU utilization being a first CPU utilization greater than a preset CPU utilization among the multiple first CPU utilizations;

[0200] The second processing module 603 is used to determine the first hard disk ratio of the number of target first hard disk utilizations to the total number of first hard disk utilizations based on the multiple first hard disk utilizations, the target first hard disk utilization being the first hard disk utilization that is equal to the preset hard disk utilization among the multiple first hard disk utilizations;

[0201] The third processing module 604 is used to adjust the current reconstruction rate interval according to the first CPU ratio and the first hard disk ratio to obtain a target reconstruction rate interval.

[0202] In a possible implementation, the preset condition includes at least one of the following preset sub-conditions:

[0203] The current reconstruction speed is greater than the preset reconstruction speed;

[0204] The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is not 0, the hard disk utilization threshold is not 0, and the first CPU utilization average of the multiple first CPU utilizations is greater than the CPU utilization threshold;

[0205] The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is not 0, the hard disk utilization threshold is not 0, and the first hard disk utilization average of the multiple first hard disk utilizations is greater than the hard disk utilization threshold;

[0206] The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is 0, and the hard disk utilization threshold is 0.

[0207] In a possible implementation, the third processing module 604 is further configured to:

[0208] When the first CPU ratio is greater than or equal to the preset CPU ratio, determining that the value of the first CPU usage state is a first value;

[0209] When the first CPU ratio is less than the preset CPU ratio, determining the value of the first CPU usage state to be a second value;

[0210] When the first hard disk ratio is greater than or equal to the preset hard disk ratio, determining the value of the first hard disk usage state to be a first value;

[0211] When the first hard disk ratio is less than the preset hard disk ratio, determining the value of the first hard disk usage state to be a second value;

[0212] According to the value of the first CPU usage state and the value of the first hard disk usage state, the current reconstruction rate interval is adjusted to obtain a target reconstruction rate interval.

[0213] In a possible implementation, the third processing module 604 is further configured to:

[0214] When the current reconstruction speed is not greater than the preset reconstruction speed, and the value of the first CPU usage state and the value of the first hard disk usage state are both the second value, determining the target reconstruction rate interval according to the type of the target hard disk and a preset mapping relationship, where the preset mapping relationship is used to indicate the correspondence between the type of the hard disk and the reconstruction rate interval;

[0215] When the value of the first CPU usage state is the first value, or the value of the first hard disk usage state is the first value, the current reconstruction rate interval is adjusted to the initial reconstruction rate interval.

[0216] In a possible implementation, the acquisition module 601 is further configured to:

[0217] When the current reconstruction speed is not greater than the preset reconstruction speed, calculating a first CPU utilization average of the plurality of first CPU utilizations and a first hard disk utilization average of the plurality of first hard disk utilizations;

[0218] If the first CPU utilization average value is not greater than the CPU utilization threshold, and the first hard disk utilization average value is not greater than the hard disk utilization threshold, a target reconstruction rate range is determined according to the type of the target hard disk and a preset mapping relationship.

[0219] In a possible implementation, the device further includes a fourth processing module 605, configured to:

[0220] After data reconstruction is performed based on the target reconstruction rate interval, the CPU and the target hard disk are sampled again multiple times according to the preset acquisition frequency to obtain multiple second CPU utilizations and multiple second hard disk utilizations, where the target hard disk is a hard disk in a non-reconstruction state;

[0221] Determining a value of a second CPU usage state based on the plurality of second CPU utilizations and a preset CPU ratio;

[0222] Determining a value of the second hard disk usage state based on a plurality of second hard disk utilization rates and a preset hard disk ratio;

[0223] The CPU utilization threshold, the hard disk utilization threshold, and the target reconstruction rate interval are updated according to the value of the first CPU usage state, the value of the second CPU usage state, the value of the first hard disk usage state, and the value of the second hard disk usage state.

[0224] In a possible implementation, the fourth processing module 605 is further configured to:

[0225] When the value of the first CPU usage state, the value of the second CPU usage state, the value of the first hard disk usage state, and the value of the second hard disk usage state are all second values, determining whether an average second CPU utilization of the plurality of second CPU utilizations is greater than a CPU utilization threshold, and whether an average second hard disk utilization of the plurality of second hard disk utilizations is greater than a hard disk utilization threshold;

[0226] When the second CPU utilization average value of the plurality of second CPU utilization values ​​is greater than the CPU utilization threshold value, and the second hard disk utilization average value of the plurality of second hard disk utilization values ​​is greater than the hard disk utilization threshold value, the CPU utilization threshold value is updated to the second CPU utilization average value, and the hard disk utilization threshold value is updated to the second CPU utilization average value;

[0227] When the value of any one of the first CPU usage state, the second CPU usage state, the first hard disk usage state, and the second hard disk usage state is the first value, the target reconstruction rate interval is updated to the initial reconstruction rate interval.

[0228] The (device subject) provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be described in detail here.

[0229] Figure 7 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 7 As shown, the electronic device 70 provided in this embodiment includes: at least one processor 701 and a memory 702. Optionally, the device 70 further includes a communication component 703. The processor 701, the memory 702 and the communication component 703 are connected via a bus 704.

[0230] In a specific implementation process, at least one processor 701 executes the computer-executable instructions stored in the memory 702, so that at least one processor 701 executes the above method.

[0231] The specific implementation process of the processor 701 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0232] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0233] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0234] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0235] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0236] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0237] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0238] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0239] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0240] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0241] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0242] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0243] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0244] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for determining a reconstruction rate interval based on RAID, characterized in that: include: Sampling the central processing unit CPU and the target hard disk multiple times according to a preset acquisition frequency to obtain multiple first CPU utilization rates and multiple first hard disk utilization rates, wherein the target hard disk is a hard disk in a non-reconstruction state; If the current reconstruction speed, the multiple first CPU utilizations, and the multiple first hard disk utilizations meet the preset conditions, then based on the multiple first CPU utilizations, determine the first CPU ratio of the target number of first CPU utilizations to the total number of first CPU utilizations, the target first CPU utilization being the first CPU utilization among the multiple first CPU utilizations that is greater than the preset CPU utilization; Based on the multiple first hard disk utilizations, determining a first hard disk ratio of the number of target first hard disk utilizations to the total number of first hard disk utilizations, the target first hard disk utilization being the first hard disk utilization among the multiple first hard disk utilizations that is equal to the preset hard disk utilization; According to the first CPU ratio and the first hard disk ratio, the current reconstruction rate interval is adjusted to obtain a target reconstruction rate interval.

2. The method according to claim 1, characterized in that The preset condition includes at least one of the following preset sub-conditions: The current reconstruction speed is greater than a preset reconstruction speed; The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is not 0, the hard disk utilization threshold is not 0, and the first CPU utilization average of the multiple first CPU utilizations is greater than the CPU utilization threshold; The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is not 0, the hard disk utilization threshold is not 0, and the first hard disk utilization average of the multiple first hard disk utilizations is greater than the hard disk utilization threshold; The current reconstruction speed is not greater than the preset reconstruction speed, the CPU utilization threshold is 0, and the hard disk utilization threshold is 0.

3. The method according to claim 2, characterized in that The adjusting the current reconstruction rate interval according to the first CPU ratio and the first hard disk ratio to obtain a target reconstruction rate interval includes: If the first CPU ratio is greater than or equal to the preset CPU ratio, determining that the value of the first CPU usage state is a first value; If the first CPU ratio is less than the preset CPU ratio, determining the value of the first CPU usage state to be a second value; If the first hard disk ratio is greater than or equal to the preset hard disk ratio, determining the value of the first hard disk usage status to be the first value; If the first hard disk ratio is less than the preset hard disk ratio, determining the value of the first hard disk usage status to be the second value; The current reconstruction rate interval is adjusted according to the value of the first CPU usage state and the value of the first hard disk usage state to obtain the target reconstruction rate interval.

4. The method according to claim 3, characterized in that The adjusting the current reconstruction rate interval according to the value of the first CPU usage state and the value of the first hard disk usage state to obtain the target reconstruction rate interval includes: If the current reconstruction speed is not greater than the preset reconstruction speed, and the value of the first CPU usage state and the value of the first hard disk usage state are both the second value, determining the target reconstruction rate interval according to the type of the target hard disk and a preset mapping relationship, wherein the preset mapping relationship is used to indicate the correspondence between the type of the hard disk and the reconstruction rate interval; If the value of the first CPU usage state is the first value, or the value of the first hard disk usage state is the first value, the current reconstruction rate interval is adjusted to the initial reconstruction rate interval.

5. The method according to any one of claims 2 to 4, characterized in that: After sampling the CPU and the target hard disk multiple times according to the preset acquisition frequency to obtain multiple first CPU utilizations and multiple first hard disk utilizations, the method further includes: When the current reconstruction speed is not greater than the preset reconstruction speed, calculating a first CPU utilization average of a plurality of first CPU utilizations and a first hard disk utilization average of a plurality of first hard disk utilizations; If the first CPU utilization average value is not greater than the CPU utilization threshold, and the first hard disk utilization average value is not greater than the hard disk utilization threshold, the target reconstruction rate range is determined according to the type of the target hard disk and a preset mapping relationship.

6. The method according to claim 3 or 4, characterized in that: The method further comprises: After data reconstruction is performed based on the target reconstruction rate interval, the CPU and the target hard disk are sampled again multiple times according to the preset acquisition frequency to obtain multiple second CPU utilizations and multiple second hard disk utilizations, where the target hard disk is a hard disk in a non-reconstruction state; Determining a value of a second CPU usage state based on the plurality of second CPU utilizations and the preset CPU ratio; Determining a value of a second hard disk usage state based on the plurality of second hard disk utilization rates and the preset hard disk ratio; The CPU utilization threshold, the hard disk utilization threshold, and the target reconstruction rate interval are updated according to the value of the first CPU usage state, the value of the second CPU usage state, the value of the first hard disk usage state, and the value of the second hard disk usage state.

7. The method according to claim 6, characterized in that The updating of the CPU utilization threshold, the hard disk utilization threshold, and the target reconstruction rate interval according to the value of the first CPU usage state, the value of the second CPU usage state, the value of the first hard disk usage state, and the value of the second hard disk usage state includes: If the value of the first CPU usage state, the value of the second CPU usage state, the value of the first hard disk usage state, and the value of the second hard disk usage state are all the second value, determining whether an average second CPU utilization of the plurality of second CPU utilizations is greater than a CPU utilization threshold, and whether an average second hard disk utilization of the plurality of second hard disk utilizations is greater than a hard disk utilization threshold; If the second CPU utilization average value of the multiple second CPU utilization values ​​is greater than the CPU utilization threshold value, and the second hard disk utilization average value of the multiple second hard disk utilization values ​​is greater than the hard disk utilization threshold value, then the CPU utilization threshold value is updated to the second CPU utilization average value, and the hard disk utilization threshold value is updated to the second CPU utilization average value; If the value of any one of the first CPU usage state, the second CPU usage state, the first hard disk usage state, and the second hard disk usage state is the first value, the target reconstruction rate interval is updated to the initial reconstruction rate interval.

8. A device for determining a reconstruction rate interval based on RAID, characterized in that: include: An acquisition module is used to perform multiple sampling of a central processing unit CPU and a target hard disk according to a preset acquisition frequency to obtain multiple first CPU utilization rates and multiple first hard disk utilization rates, wherein the target hard disk is a hard disk in a non-reconstruction state; A first processing module is used to determine, based on the multiple first CPU utilizations, a first CPU ratio of the number of target first CPU utilizations to the total number of first CPU utilizations when the current reconstruction speed, the multiple first CPU utilizations, and the multiple first hard disk utilizations meet a preset condition, the target first CPU utilization being a first CPU utilization greater than a preset CPU utilization among the multiple first CPU utilizations; A second processing module is used to determine, based on the multiple first hard disk utilizations, a first hard disk ratio of the number of target first hard disk utilizations to the total number of first hard disk utilizations, the target first hard disk utilization being a first hard disk utilization among the multiple first hard disk utilizations that is equal to a preset hard disk utilization; The third processing module is used to adjust the current reconstruction rate interval according to the first CPU ratio and the first hard disk ratio to obtain a target reconstruction rate interval.

9. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.