Data reconstruction node determination method, device and equipment and readable storage medium

By acquiring and analyzing the node performance parameters in the distributed storage system and selecting the idle node for data reconstruction, the problem of low data reconstruction performance in the prior art is solved and more efficient system performance is achieved.

CN119645312APending Publication Date: 2025-03-18SANGFOR TECH INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411794787.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In the prior art, the data reconstruction process has low performance, resulting in poor system performance and exposure to an unstable state.

Method used

By obtaining the performance parameters of each node in the cluster, determine the operating performance of each node, and select the idle node as the reconstruction node.

Benefits of technology

By balancing the performance consumption of each node, eliminating performance hotspots, and improving the overall performance of the reconstruction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645312A_ABST
    Figure CN119645312A_ABST
Patent Text Reader

Abstract

The invention discloses a data reconstruction node determination method, device and equipment and a readable storage medium, and is applied to the technical field of distributed storage, and the method comprises the following steps: obtaining a plurality of performance parameters corresponding to each node in a cluster; wherein the performance parameters are parameters related to node operation performance; determining the operation performance of each node according to the plurality of performance parameters; and determining the most idle node from the nodes according to the operation performance of each node, and taking the most idle node as a reconstruction node. Compared with the mode that a node corresponding to a fault disk is directly used as a reconstruction node for data reconstruction at present and whether the node corresponding to the fault disk becomes a performance hotspot or not is not considered, the operation performance of each node is determined according to the performance parameter of each node; therefore, the most idle node is determined as the reconstruction node from all the nodes according to the operation performance, and the reconstruction task is allocated to the most idle reconstruction node, so that the performance consumption of each node is balanced, and the operation performance of the whole system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed storage technology, and in particular to a method, device, equipment and readable storage medium for determining a data reconstruction node. Background Art

[0002] In distributed storage systems, data is mainly stored in erasure codes. Erasure codes (EC) add redundant data to ensure that the original data is not lost when part of the data is lost. When reconstructing any data block, erasure codes need to read multiple copies of other data from the disk and transmit them over the network. This results in poor performance during the reconstruction process and exposes the system to an unstable state.

[0003] Therefore, in the current data reconstruction process, the node corresponding to the faulty disk is directly used as the reconstruction node, making the faulty node a performance hotspot of the entire system, thereby resulting in poor performance of the reconstruction process. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a data reconstruction node determination method, device, equipment and readable storage medium, which solves the technical problem of low performance of the reconstruction process in the prior art.

[0005] In order to solve the above technical problems, the present invention provides a method for determining a data reconstruction node, comprising:

[0006] Obtaining performance parameters corresponding to each node in the cluster; wherein the performance parameters are parameters related to the node operation performance;

[0007] Determining the operating performance of each node according to the performance parameters;

[0008] The idlest node is determined from the nodes according to the operation performance of each node, and the idlest node is used as the reconstruction node.

[0009] Optionally, the performance parameters include central processing unit utilization, network bandwidth utilization and disk utilization.

[0010] Optionally, determining the operating performance of each node according to the performance parameter includes:

[0011] Determine a parameter value corresponding to the performance parameter of each node; wherein the parameter value is a parameter for determining the performance level;

[0012] The operating performance of each node is determined according to the parameter value.

[0013] Optionally, determining a parameter value corresponding to the performance parameter of each node includes:

[0014] Determine multiple parameter values ​​corresponding to the multiple performance parameters of each node within a preset time period; wherein the multiple performance parameters have the same performance parameter type but different time periods;

[0015] Determining weights corresponding to the multiple parameter values ​​according to different time nodes;

[0016] According to the multiple parameter values ​​and their corresponding weights, weighted averaging the multiple parameter values ​​corresponding to the performance parameter is performed to determine a weighted average parameter value corresponding to each node;

[0017] Accordingly, determining the operating performance of each node according to the parameter value includes:

[0018] The operating performance of each node is determined according to the weighted average parameter value of each node.

[0019] Optionally, determining a parameter value corresponding to the performance parameter of each node includes:

[0020] Determining a plurality of parameter values ​​corresponding to the plurality of performance parameters of each node; wherein the plurality of performance parameters have different performance parameter types;

[0021] According to all parameter values ​​corresponding to each node, determine the total parameter value corresponding to each node;

[0022] Accordingly, determining the operating performance of each node according to the parameter value includes:

[0023] The operating performance of each node is determined according to the total parameter value.

[0024] Optionally, after determining the parameter value corresponding to the performance parameter of each node, the method further includes:

[0025] Determine whether there is a shard data reading task at the current node; wherein the shard data reading task is a task for reading shard data during the reconstruction process;

[0026] When it is determined that the current node has the task of reading the shard data, it is determined that the parameter value corresponding to the current node is reduced by a first preset parameter value to obtain a first adjusted parameter value;

[0027] When it is determined that the task of reading the sharded data does not exist in the current node, it is determined not to adjust the parameter value corresponding to the current node.

[0028] Optionally, after determining the parameter value corresponding to the performance parameter of each node, the method further includes:

[0029] Get the historical operation rules of the current node;

[0030] Determine whether the current node has a data processing task at a preset reconstruction time according to the historical operation rule of the current node; wherein the preset reconstruction time is the preset time required for subsequent data reconstruction;

[0031] When the current node has a data processing task at the preset reconstruction time, determining that the parameter value is reduced by a second preset parameter value to obtain a second adjusted parameter value;

[0032] When the current node does not have a data processing task at the preset reconstruction time, it is determined not to adjust the parameter value.

[0033] Optionally, after determining the idlest node from the nodes according to the running performance of each node and taking the idlest node as the reconstruction node, the method further includes:

[0034] Using the reconstruction node to send a remote procedure call protocol request, and reading the data slice according to the remote procedure call protocol request;

[0035] Calculate the checksum value according to the data slices to obtain reconstructed data;

[0036] The reconstructed data is sent to the node corresponding to the failed disk, so that the node corresponding to the failed disk writes the reconstructed data to the selected non-faulty disk according to the redundancy selection strategy.

[0037] The present invention also provides a data reconstruction node determination device, comprising:

[0038] A performance parameter acquisition module is used to obtain the performance parameters corresponding to each node in the cluster; wherein the performance parameters are parameters related to the node operation performance;

[0039] A performance determination module, used to determine the operating performance of each node according to the performance parameters;

[0040] The reconstruction node determination module is used to determine the idlest node from the nodes according to the operation performance of each node, and use the idlest node as the reconstruction node.

[0041] The present invention also provides a data reconstruction node determination device, comprising:

[0042] Memory for storing computer programs;

[0043] A processor is used to implement the steps of the above-mentioned data reconstruction node determination method when executing the computer program.

[0044] The present invention also provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned data reconstruction node determination method are implemented.

[0045] It can be seen that the present invention obtains the performance parameters corresponding to each node in the cluster; wherein the performance parameters are parameters related to the node operation performance. The operation performance of each node is determined according to the performance parameters. The most idle node is determined from the nodes according to the operation performance of each node, and the most idle node is used as the reconstruction node. The beneficial effect of the present invention is that by determining the most idle node in the cluster according to the performance parameters, the most idle node is used as the reconstruction node. Since the reconstruction node is not the node corresponding to the faulty disk, the performance consumption of each node can be balanced, the performance hotspot is eliminated, and the overall performance of the reconstruction process is improved.

[0046] In addition, the present invention also provides a data reconstruction node determination device, equipment and readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0048] Figure 1 A flowchart of a method for determining a data reconstruction node provided by an embodiment of the present invention;

[0049] Figure 2 An example flow chart of a method for determining a data reconstruction node provided by an embodiment of the present invention;

[0050] Figure 3 A schematic diagram of each node in a method for determining a data reconstruction node provided by an embodiment of the present invention;

[0051] Figure 4 A schematic diagram of a cluster provided by an embodiment of the present invention;

[0052] Figure 5 A flowchart of a data reconstruction method provided by an embodiment of the present invention;

[0053] Figure 6 A schematic diagram of the structure of a data reconstruction node determination device provided by an embodiment of the present invention;

[0054] Figure 7 A schematic diagram of the structure of a data reconstruction node determination device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] Some of the terms that appear in the description of the embodiments of the present application may be interpreted as follows:

[0057] Fault domain: The fault domain of a distributed storage system refers to a specific area or component in the system where a failure may occur. These fault domains can be physical, such as racks, servers, hard disks, etc., or logical, such as network subnets, data centers, etc. In a distributed storage system, in order to improve the reliability and fault tolerance of the system, data and computing tasks are usually distributed across multiple fault domains. In this way, when a fault domain fails, the system can still continue to operate without causing data loss or service interruption. For example, the host fault domain of data distribution is when a host fails. The remaining hosts can maintain the normal operation of the system.

[0058] Disk reconstruction: In a distributed storage cluster, if a hard disk fails and cannot be accessed, the storage system will restore the data on the failed disk to other hard disks in the fault domain according to the redundancy strategy and fault domain restrictions.

[0059] Please refer to Figure 1 , Figure 1 A flowchart of a method for determining a data reconstruction node provided by an embodiment of the present invention. The method may include:

[0060] S101, obtaining performance parameters corresponding to each node in the cluster; wherein the performance parameters are parameters related to the node operation performance.

[0061] This embodiment does not limit the specific execution subject. The execution subject of this embodiment may be a node in a cluster; or the execution subject in this embodiment may also be other devices. This embodiment does not limit the specific performance parameters. For example, the performance parameter in this embodiment may be the utilization of the network bandwidth; or the performance parameter in this embodiment may also be the utilization of the CPU (central processing unit); or the performance parameter in this embodiment may also be the utilization of the central processing unit, the network bandwidth utilization, and the disk utilization. This embodiment does not limit the specific type of performance parameters. For example, in this embodiment, there may be multiple performance parameters, and only the performance parameter value of each performance parameter is obtained; or the performance parameter in this embodiment may be single, and each performance parameter corresponds to multiple parameter values ​​(values ​​at different time stages); or when there are multiple performance parameters in this embodiment, each performance parameter may correspond to multiple parameter values ​​of the same parameter type and different parameter acquisition times.

[0062] S102: Determine the operating performance of each node according to the performance parameters.

[0063] This embodiment does not limit the specific method of determining the operating performance of each node according to the performance parameter. For example, this embodiment can determine the operating performance of each node according to the parameter value corresponding to the performance parameter. Or this embodiment can determine the corresponding parameter score according to the parameter value corresponding to the performance parameter, thereby determining the operating performance of each node according to the parameter score.

[0064] It should be further explained that, in order to improve the accuracy of determining the operating performance, the above-mentioned determination of the operating performance of each node according to the performance parameters may include: determining the parameter value corresponding to the performance parameter of each node; wherein the parameter value is a parameter for determining the performance level; and determining the operating performance of each node according to the parameter value. This embodiment does not limit the specific method for determining the parameter value according to the performance parameter. For example, this embodiment may determine the operating performance of each node according to the corresponding relationship between the value of the performance parameter and the parameter value, for example, 1 point for a hard disk utilization rate of less than 20%, 2 points for 20% to 50%, 3 points for 50% to 80%, etc. Or this embodiment may determine the parameter value according to the value of the performance parameter using a pre-trained model, and the pre-trained model may comprehensively evaluate the performance of the hard disk by analyzing multiple performance indicators of the hard disk (such as IOPS (the number of input and output requests that the system can process per second), throughput, average access time, etc.). This embodiment determines the operating performance of each node by determining the parameter value of the performance parameter.

[0065] It should be further explained that, in order to improve the accuracy of determining the reconstructed node, the parameter value corresponding to the performance parameter of each node may include:

[0066] S1021, determining multiple parameter values ​​corresponding to multiple performance parameters of each node within a preset time period; wherein the multiple performance parameters have the same performance parameter type but different time periods;

[0067] S1022, determining weights corresponding to a plurality of parameter values ​​according to different time nodes;

[0068] S1023, performing weighted averaging on the multiple parameter values ​​corresponding to the performance parameter according to the multiple parameter values ​​and their corresponding weights, to determine a weighted average parameter value corresponding to each node;

[0069] Accordingly, the operating performance of each node is determined according to the parameter value, including:

[0070] S1024: Determine the operating performance of each node according to the weighted average parameter value of each node.

[0071] The same performance parameter type and different time of multiple performance parameters in this embodiment refer to the values ​​of performance parameters corresponding to the same performance parameter at different time nodes. For example, when the performance parameter is CPU utilization, multiple performance parameters are CPU utilization at different time nodes, that is, the multiple performance parameters in this embodiment are the parameter values ​​corresponding to each performance parameter of each node at different time nodes. For example, the CPU utilization is 40% at the latest time, and the CPU utilization is 20% 1 hour ago. At this time, the weight corresponding to each parameter value can be determined according to the weight determination method (the earlier the value, the lower the weight, and the closer the weight, the greater the weight), for example, the latest time weight is 4, and the weight at 1 hour ago is 2. In this embodiment, the weight value corresponding to each time node is determined according to the different time nodes, wherein the time node is proportional to the weight value, that is, the closer the time node is to the present, the greater the weight, and the farther from the current time, the smaller the weight. Thus, according to multiple parameter values ​​and their corresponding weights, the multiple parameter values ​​corresponding to the performance parameter are weighted averaged to determine the weighted average parameter value corresponding to each node. For ease of understanding, for example, the weight corresponding to the utilization rate of the latest time is 80%, the weight corresponding to the utilization rate 1 hour ago is 20%, the score of the latest time is 14, and the score 1 hour ago is 18. The weighted average score = (the score of the latest time * the first weight + the score 1 hour ago * the second weight) / (the first weight + the second weight) = (11.2 + 3.6) / 1 = 14.8. In summary, this embodiment will also perform weighted averaging when determining the parameter value corresponding to the performance parameter of each time node, thereby improving the accuracy of the parameter value determination, thereby improving the accuracy of the subsequent reconstruction node determination.

[0072] It should be further explained that, in order to improve the accuracy of the determination of the operating performance, the above-mentioned determination of the parameter values ​​corresponding to the performance parameters of each node may include: determining multiple parameter values ​​corresponding to multiple performance parameters of each node; wherein the performance parameter types of the multiple performance parameters are different; according to all the parameter values ​​corresponding to each node, the total parameter value corresponding to each node is determined; accordingly, the above-mentioned determination of the operating performance of each node according to the parameter value includes: determining the operating performance of each node according to the total parameter value. The different performance parameter types of the multiple performance parameters in this embodiment refer to the performance parameters in this embodiment as CPU utilization, memory utilization, etc., that is, this embodiment is divided into multiple performance parameters according to type. In this embodiment, when determining multiple parameter values ​​corresponding to multiple performance parameters, the total parameter value will be determined according to all the performance parameters corresponding to each node, and the total parameter value corresponding to each node is obtained, so as to evaluate the performance of each node from multiple aspects and improve the accuracy of the determination of the operating performance of each node. It can be understood that when there are multiple performance parameters in this embodiment, the parameter value corresponding to each performance parameter can also determine multiple parameter values ​​according to different time nodes.

[0073] It should be further explained that, in order to improve the accuracy of determining the total parameter value, this embodiment can assign a weight to each type of performance parameter, and when calculating the total parameter value, calculate the weighted average value, thereby improving the accuracy of determining the total parameter value. Assuming that we want to evaluate the performance of a server node, consider the following four performance parameters and their corresponding weights: CPU utilization (weight: 30%). CPU utilization is a key indicator to measure how busy the CPU is. High CPU utilization may mean that the processor is processing a large number of computing tasks, while low utilization may indicate that the processor is idle or the computing tasks are light. Memory usage (weight: 25%). Memory usage reflects the occupancy of memory resources. High memory usage may cause the system to run slowly, especially when multitasking, while low memory usage may indicate that there are surplus memory resources and more tasks can be performed. Disk I / O rate (weight: 20%). Disk I / O rate is an indicator to measure the speed of disk read and write operations. A high disk I / O rate means that data can be read or written faster, while a low rate may cause a data processing bottleneck and affect overall performance. Network throughput (weight: 25%). Network throughput refers to the ability of a network to transmit data. High network throughput is critical for application scenarios that require a lot of network communication, while low throughput may cause network delays and data transmission bottlenecks. The weighted average is calculated as follows: Set: CPU utilization = 70%; memory utilization = 60%; disk I / O rate = 150 MB / s; network throughput = 1 Gbps; calculate the score of each parameter (assuming 100 is the full score): CPU score = (70 / 100) * 30 = 21 points; memory score = (60 / 100) * 25 = 15 points; disk score = (150 / 200) * 20 = 15 points (assuming the maximum disk I / O rate is 200 MB / s); network score = (1 / 1.2) * 25 = 20.83 points (assuming the maximum network throughput is 1.2 Gbps); weighted average score: weighted average score = (CPU score * CPU weight + memory score * memory weight + disk score * disk weight + network score * network weight) / (CPU weight + memory weight + disk weight + network weight). Weighted average score = (21 + 0.3 + 15*0.25 + 15*0.2 + 20.83*0.25) / (0.3 + 0.25 + 0.2 + 0.25); Weighted average score = (6.3 + 3.75 + 3 + 5.2075) / 1. Weighted average score ≈ 18.26 This weighted average score reflects the comprehensive performance of the server node. In this way, we can evaluate the operating performance of the node more comprehensively, rather than relying solely on a single performance indicator.

[0074] It should be further explained that in order to improve the accuracy of parameter value determination, after determining the parameter value corresponding to the performance parameter of each node, it can also include: determining whether the current node has a task of reading shard data; wherein the task of reading shard data is a task of reading shard data during the reconstruction process; when it is determined that the current node has a task of reading shard data, it is determined that the parameter value corresponding to the current node is reduced by the first preset parameter value to obtain the first adjusted parameter value; when it is determined that the current node does not have a task of reading shard data, it is determined that the parameter value corresponding to the current node is not adjusted. This embodiment does not limit the specific first preset parameter value. For example, the first preset parameter value in this embodiment can be 5 points; or the first preset parameter value in this embodiment can also be 10 points. After determining the parameter value, this embodiment will also adjust the parameter value according to what needs to be done at the next moment. It can be understood that the current parameter values ​​of the two nodes are the same, but when the reconstruction is performed at the next moment, when there is a task of reading shard data, the performance will be reduced. Therefore, this embodiment will take into account the specific performance of data reconstruction at a future moment, thereby adjusting the parameter value to improve the accuracy of the adjustment.

[0075] It should be further explained that, in order to improve the accuracy of parameter value determination, after determining the parameter value corresponding to the performance parameter of each node, the following may also be included: obtaining the historical operation law of the current node; judging whether the current node has a data processing task at the preset reconstruction time according to the historical operation law of the current node; wherein the preset reconstruction time is the time required for the preset subsequent data reconstruction; when the current node has a data processing task at the preset reconstruction time, determining that the parameter value is reduced by the second preset parameter value to obtain the second adjusted parameter value; when the current node does not have a data processing task at the preset reconstruction time, determining that the parameter value is not adjusted. The historical operation law in this embodiment refers to whether the node generally has other tasks in which time period, or whether it is idle. This embodiment does not limit specific data processing tasks. For example, the data processing tasks in this embodiment may be data storage, data backup, data recovery, data transmission, etc. The preset reconstruction time in this embodiment refers to the time period for subsequent data reconstruction. If it is predicted that there is a data processing task at the preset data reconstruction time, the parameter value is reduced by the second preset parameter value to obtain the second adjusted parameter value. This embodiment does not limit the specific second preset parameter value. The second preset parameter value in this embodiment may be 5, 10, 15, etc.

[0076] S103, determining the idlest node from the nodes according to the operation performance of each node, and using the idlest node as the reconstruction node.

[0077] In this embodiment, the node with the best operating performance can be selected from the nodes according to the operating performance of each node, so as to be the idlest node, and the idlest node can be used as the reconstruction node. The reconstruction node in this embodiment refers to a node that calculates the EC (erasure code) value based on the data of other shards.

[0078] It should be further explained that, in order to improve the accuracy of data reconstruction, after determining the idlest node from the nodes according to the operating performance of each node and using the idlest node as the reconstruction node, it can also include: using the reconstruction node to send a remote procedure call protocol request, reading the data slice according to the remote procedure call protocol request; calculating the check value according to the data slice to obtain the reconstructed data; sending the reconstructed data to the node corresponding to the faulty disk, so that the node corresponding to the faulty disk writes the reconstructed data to the selected non-faulty disk according to the redundancy selection strategy. In this embodiment, when the reconstructed data is obtained, the slice data is read back, and after calculating the check value, the check value is used as the reconstructed data and returned to the reconstruction task of the node corresponding to the faulty disk. At this time, the reconstruction task is then executed to write the data to the hard disk without fault. In this embodiment, only the request is sent according to the node corresponding to the faulty disk, so the network consumption is small.

[0079] The data reconstruction method provided by the embodiment of the present invention may include: S101, obtaining the performance parameters corresponding to each node in the cluster; wherein the performance parameters are parameters related to the node operation performance. S102, determining the operation performance of each node according to the performance parameters. S103, determining the most idle node from the nodes according to the operation performance of each node, and using the most idle node as the reconstruction node. Compared with the current method of directly using the node corresponding to the faulty disk as the reconstruction node, the present application will determine the most idle node among the nodes according to the performance parameters of each node, so as to balance the load of the entire system. In addition, when determining the parameter value corresponding to the performance parameter of each time node, the embodiment will also perform weighted averaging, thereby improving the accuracy of parameter value determination, thereby improving the accuracy of subsequent reconstruction node determination; and, when determining multiple parameter values ​​corresponding to multiple performance parameters in the embodiment, the total parameter value will be determined according to all performance parameters corresponding to each node, and the total parameter value corresponding to each node will be obtained, thereby evaluating the performance of each node from multiple aspects, and improving the accuracy of the operation performance determination of each node; and, the embodiment will take into account the specific performance when reconstructing data at a future moment, thereby adjusting the parameter value and improving the accuracy of the adjustment.

[0080] In order to make the present invention easier to understand, please refer to Figure 2 , Figure 2 A flowchart of a method for determining a data reconstruction node provided by an embodiment of the present invention may specifically include:

[0081] S201, obtaining a plurality of performance parameters corresponding to each node according to a preset time period.

[0082] The execution subject of this embodiment may be a node.

[0083] S202, determining multiple parameter values ​​corresponding to each performance parameter at different preset time points, and obtaining multiple parameter values ​​corresponding to each node; the larger the parameter value, the busier the node.

[0084] S203: Determine weights corresponding to multiple parameter values ​​of each node according to the generation time of the performance parameters.

[0085] S204, performing weighted averaging according to the weight and multiple parameter values ​​to determine a weighted average parameter value corresponding to the current performance parameter of each node.

[0086] S205: Determine a total parameter value corresponding to each node according to all weighted average parameter values ​​corresponding to each node.

[0087] S206, determining whether the node has a task to read the data shard.

[0088] S207: When it exists, subtract the preset parameter value from the total parameter value to obtain the target total parameter value.

[0089] S208: When it does not exist, the weighted average parameter value is used as the target total parameter value.

[0090] S209, determining a node with a minimum target total parameter value according to the target total parameter value corresponding to each node, and taking the node with the minimum target total parameter value as a reconstruction node.

[0091] This embodiment will give priority to the most idle node as the reconstruction node, thereby eliminating performance hotspots (the node corresponding to the failed disk needs to reconstruct data and read data). During reconstruction, the overall processing capacity provided by the entire cluster to the outside is enhanced, and the maximum performance provided to the outside during the reconstruction process is improved by about 10%.

[0092] In order to make the present invention easier to understand, please refer to Figure 3 , Figure 3 A schematic diagram of each node in a data reconstruction node determination method provided by an embodiment of the present invention, each node may specifically include: a performance collection module, a performance prediction module and a reconstruction module.

[0093] 1) Performance collection module: regularly collects the running status of nodes, mainly including the CPU utilization of nodes and network bandwidth utilization, and also obtains the performance of other nodes.

[0094] The performance search module in this embodiment can collect the parameter values ​​(CPU utilization and network bandwidth utilization) corresponding to the performance parameters of each node once every preset time period (half an hour, one display light), and score them. For example, 1 point for utilization below 20%, 2 points for 20% to 50%, 3 points for 50% to 80%, and 10 points for more than 80% (indicates busy, try not to select this node) to store the performance scores of the last 3 days. After the data is obtained, it will be broadcast to all nodes in the cluster. This solution is mainly used in smaller-scale clusters, with a maximum of dozens of nodes, and the broadcast volume is not large.

[0095] 2) Performance prediction module: When the reconstruction module finds that the disk to be reconstructed is on its own node, it will call the performance prediction module to find the most idle node in the future reconstruction execution time period to perform the reconstruction data part task. In the above figure, node 2 is selected, and the reconstruction module will send the task to the reconstruction module of node 2 to help read data and calculate EC value, and then bring back the calculation results and write them to the local reconstruction target disk.

[0096] 3) Reconstruction module: completes the specific work of hard disk reconstruction. Its main work is to read the data shards that still exist in the EC stripe, calculate the checksum (this is the data on the bad disk), and then write the newly selected shards. In this solution, the reconstruction module adds a function to help other nodes read data, calculate the checksum, and then return the data.

[0097] The reconstruction of an EC stripe often takes a while, and may take minutes at the fastest. In order to prevent a node from being selected for reconstruction when it is relatively idle at the beginning and becomes busy during the reconstruction process, this solution can design a busy-idle judgment solution based on historical values, rather than simply selecting the currently idlest node. This embodiment can perform a weighted average on the collected performance values, where the earlier the value, the lower the weight, and the more recent the value, the greater the weight. The node with the smallest score is selected for execution. If this node has the data shard to be reconstructed and is read, 10 points will be deducted and it will be given priority. For the sake of convenience, let's take the simplest example. For example, there is Figure 4 The 4 nodes shown, Figure 4A schematic diagram of a cluster provided for an embodiment of the present invention uses EC2+1 to store data. Suppose an EC stripe is composed of disk 1 of nodes 1, 2, and 3. At this time, disk 1 of node 1 fails and needs to be reconstructed. The reconstructed data is stored on disk 3 of node 1. At this time, there will be a reconstruction task on node 1, which reads the data of nodes 2 and 3, calculates the EC value, and then writes it to disk 3 of node 1. At this time, nodes 2, 3, and 4 are candidates to perform the tasks of reading and calculating the checksum value. Specifically, the weighted busy scores of the three nodes are calculated first. Since nodes 2 and 3 have data to be read, they are corrected by deducting 10 points after calculation. Find the node with the smallest score among the three nodes to perform the reconstruction delegation task. The characteristics of the EC algorithm When reconstructing, the existing shards are read and the missing shards are calculated. This is a complete process and is usually executed together. However, in a distributed system, reading data slices often requires reading data on the hard disks of other nodes through the network, so it will cause relatively large pressure on the network of the reconstruction node. After the data is read back, a large amount of data needs to be checked, which will cause greater pressure on the CPU. This solution separates these two cost-intensive steps from the reconstruction process into a separate process that is performed on idle nodes. For example, if disk 1 of node 1 is broken, a stripe needs to be reconstructed to disk 3 of node 1. In this way, the reconstruction task is initiated on node 1. After the reconstruction task is initiated on node 1, the performance prediction module is used to select an idle node, send an RPC request (remote procedure call protocol), read the data in the corresponding areas of disk 1 of node 2 and disk 1 of node 3, and calculate the EC checksum. Only the request is sent, so the network consumption is small. According to the above algorithm, nodes 2 and 3 will be preferred to execute this request, reducing one cross-network read. If both nodes 2 and 3 are busy, node 4 is relatively idle, and this task will also be executed on 4. After the data is read back and the checksum is calculated, the checksum is used as the return value of the RPC request and returned to the reconstruction task of node 1. At this time, the reconstruction task continues to execute and writes the data to hard disk 3. The reconstruction process is completed.

[0098] The present invention selects auxiliary nodes for reconstruction tasks based on historically collected values ​​of performance data, and the auxiliary nodes only help read and calculate data, sharing most of the processing overhead of the reconstruction task.

[0099] In the reconstruction process of this embodiment, since the number of nodes started is increased (the node corresponding to the failed disk performs reconstruction data writing, data reading node, and reconstruction node), the reconstruction speed is improved by about 15%.

[0100] For easier understanding, please refer to Figure 5 , Figure 5 A flowchart of a data reconstruction method provided by an embodiment of the present invention is provided. The method may specifically include:

[0101] S301. Use the node corresponding to the failed disk to send a reconstruction task request to the reconstruction node.

[0102] In this embodiment, the initiating node of the reconstruction task is the node corresponding to the failed disk. The reconstruction node in this embodiment is the node determined according to the above method.

[0103] S302: Use the reconstruction node to obtain data shard data, and calculate the check value according to the data shard data to obtain reconstructed data.

[0104] In this embodiment, when reading shard data, the node with shard data can be used for reading, and the read shard data is sent to the reconstruction node for data reconstruction. That is, this embodiment selects the node with shard data to read the data, so that one less cross-network read can be performed.

[0105] S303: Send the reconstructed data to the node corresponding to the failed disk.

[0106] S304: Use the node corresponding to the failed disk to write the reconstructed data to the data disk determined according to the redundancy selection strategy.

[0107] The following is an introduction to a data reconstruction node determination device provided in an embodiment of the present invention. The data reconstruction node determination device described below and the data reconstruction node determination method described above can refer to each other.

[0108] Please refer to Figure 6 , Figure 6 A schematic diagram of a data reconstruction node determination device provided by an embodiment of the present invention may include:

[0109] The performance parameter acquisition module 100 is used to acquire the performance parameters corresponding to each node in the cluster; wherein the performance parameters are parameters related to the node operation performance;

[0110] The performance determination module 200 is used to determine the operation performance of each node according to the performance parameters;

[0111] The reconstruction node determination module 300 is used to determine the idlest node from the nodes according to the operation performance of each node, and use the idlest node as the reconstruction node.

[0112] Further, based on the above embodiment, the performance determination module 200 may include:

[0113] A parameter value determination unit, used to determine a parameter value corresponding to the performance parameter of each node; wherein the parameter value is a parameter for determining the performance level;

[0114] An operating performance determination unit is used to determine the operating performance of each node according to the parameter value.

[0115] Further, based on the above embodiment, the parameter value determination unit may include:

[0116] A first plurality of parameter value determination subunit, configured to determine a plurality of parameter values ​​corresponding to a plurality of the performance parameters of each node within a preset time period; wherein the plurality of performance parameters have the same performance parameter type but different time periods;

[0117] A weight determination subunit, used to determine the weights corresponding to the multiple parameter values ​​according to different time nodes;

[0118] A weighted averaging unit, configured to perform weighted averaging on the multiple parameter values ​​corresponding to the performance parameter according to the multiple parameter values ​​and the corresponding weights, and determine the weighted average parameter value corresponding to each node;

[0119] Accordingly, the operating performance determination unit includes:

[0120] The operating performance determination subunit is used to determine the operating performance of each node according to the weighted average parameter value of each node.

[0121] Further, based on the above embodiment, the parameter value determination unit may include:

[0122] A second plurality of parameter value determination subunit, configured to determine a plurality of parameter values ​​corresponding to a plurality of the performance parameters of each node; wherein the plurality of performance parameters have different performance parameter types;

[0123] A total parameter value determination subunit, used to determine the total parameter value corresponding to each node according to all parameter values ​​corresponding to each node;

[0124] Accordingly, the operating performance determination unit includes:

[0125] The operating performance determination subunit is used to determine the operating performance of each node according to the total parameter value.

[0126] Further, based on the above embodiment, the above data reconstruction node determination method may also include:

[0127] The first judgment module is used to determine whether the current node has a task of reading shard data; wherein the task of reading shard data is a task of reading shard data during the reconstruction process;

[0128] A first adjustment module is used to, when it is determined that the current node has the task of reading the shard data, determine that the parameter value corresponding to the current node is reduced by a first preset parameter value to obtain a first adjusted parameter value;

[0129] The first non-adjustment module is used to determine not to adjust the parameter value corresponding to the current node when it is determined that the current node does not have the task of reading the shard data.

[0130] Further, based on the above embodiment, the above data reconstruction node determination method may also include:

[0131] The historical operation rule acquisition module is used to obtain the historical operation rule of the current node;

[0132] A second judgment module is used to judge whether the current node has a data processing task at a preset reconstruction time according to the historical operation rule of the current node; wherein the preset reconstruction time is the preset time required for subsequent data reconstruction;

[0133] A second adjustment module is used to determine that the parameter value is reduced by a second preset parameter value to obtain a second adjusted parameter value when the current node has a data processing task at a preset reconstruction time;

[0134] The second non-adjustment module is used to determine not to adjust the parameter value when there is no data processing task at the current node at a preset reconstruction time.

[0135] Further, based on the above embodiment, the above data reconstruction node determination method may also include:

[0136] A data shard reading module, used to send a remote procedure call protocol request using the reconstruction node, and read the data shard according to the remote procedure call protocol request;

[0137] A data reconstruction module, used to calculate a check value according to the data slices to obtain reconstructed data;

[0138] The reconstructed data sending module is used to send the reconstructed data to the node corresponding to the failed disk, so that the node corresponding to the failed disk writes the reconstructed data to the selected non-faulty disk according to the redundancy selection strategy.

[0139] It should be noted that the order of the modules and units in the above-mentioned data reconstruction node determination device can be changed without affecting the logic.

[0140] The data reconstruction node determination device provided by the embodiment of the present invention may include: a performance parameter acquisition module 100, used to obtain the performance parameters corresponding to each node in the cluster; wherein the performance parameters are parameters related to the node operation performance; a performance determination module 200, used to determine the operation performance of each node according to the performance parameters; a reconstruction node determination module 300, used to determine the most idle node from the nodes according to the operation performance of each node, and use the most idle node as the reconstruction node. Compared with the current method of directly using the node corresponding to the faulty disk as the reconstruction node, the present application will determine the most idle node among the nodes according to the performance parameters of each node, so as to balance the load of the entire system.

[0141] A data reconstruction node determination device provided in an embodiment of the present invention is introduced below. The data reconstruction node determination device described below and the data reconstruction node determination method described above can refer to each other.

[0142] Please refer to Figure 7 , Figure 7 A schematic diagram of a data reconstruction node determination device provided by an embodiment of the present invention may include:

[0143] A memory 10, used for storing computer programs;

[0144] The processor 20 is used to execute a computer program to implement the above-mentioned data reconstruction node determination method.

[0145] The memory 10 , the processor 20 , and the communication interface 30 all communicate with each other via a communication bus 40 .

[0146] In the embodiment of the present invention, the memory 10 is used to store one or more programs, and the program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:

[0147] Get the performance parameters corresponding to each node in the cluster; where the performance parameters are parameters related to the node's operating performance.

[0148] The operating performance of each node is determined based on the performance parameters.

[0149] The idlest node is determined from the nodes according to the running performance of each node, and the idlest node is used as the reconstruction node.

[0150] In a possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.

[0151] In addition, the memory 10 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include an NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.

[0152] The processor 20 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, a microprocessor or any conventional processor, etc. The processor 20 may call a program stored in the memory 10 .

[0153] The communication interface 30 may be an interface of a communication module, and is used to connect to other devices or systems.

[0154] Of course, it should be noted that Figure 7 The structure shown does not constitute a limitation on the data reconstruction node determination device in the embodiment of the present invention. In actual applications, the data reconstruction node determination device may include Figure 7 More or fewer components than shown, or combinations of certain components.

[0155] The following is an introduction to a readable storage medium provided in an embodiment of the present invention. The readable storage medium described below and the method for determining a data reconstruction node described above may refer to each other.

[0156] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data reconstruction node determination method are implemented.

[0157] The readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0158] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0159] Professionals may 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 the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians 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 the present invention.

[0160] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0161] The above is a detailed introduction to a data reconstruction node determination method, device, equipment and readable storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for determining a data reconstruction node, characterized in that: include: Obtaining performance parameters corresponding to each node in the cluster; wherein the performance parameters are parameters related to the node operation performance; Determining the operating performance of each node according to the performance parameters; The idlest node is determined from the nodes according to the operation performance of each node, and the idlest node is used as the reconstruction node.

2. The method for determining data reconstruction nodes according to claim 1, characterized in that: Determining the operating performance of each node according to the performance parameter includes: Determine a parameter value corresponding to the performance parameter of each node; wherein the parameter value is a parameter for determining the performance level; The operating performance of each node is determined according to the parameter value.

3. The method for determining data reconstruction nodes according to claim 2, characterized in that: The determining a parameter value corresponding to the performance parameter of each node includes: Determine multiple parameter values ​​corresponding to the multiple performance parameters of each node within a preset time period; wherein the multiple performance parameters have the same performance parameter type but different time periods; Determining weights corresponding to the multiple parameter values ​​according to different time nodes; According to the multiple parameter values ​​and their corresponding weights, weighted averaging the multiple parameter values ​​corresponding to the performance parameter is performed to determine a weighted average parameter value corresponding to each node; Accordingly, determining the operating performance of each node according to the parameter value includes: The operating performance of each node is determined according to the weighted average parameter value of each node.

4. The method for determining data reconstruction nodes according to claim 2, characterized in that: The determining a parameter value corresponding to the performance parameter of each node includes: Determining a plurality of parameter values ​​corresponding to the plurality of performance parameters of each node; wherein the plurality of performance parameters have different performance parameter types; According to all parameter values ​​corresponding to each node, determine the total parameter value corresponding to each node; Accordingly, determining the operating performance of each node according to the parameter value includes: The operating performance of each node is determined according to the total parameter value.

5. The method for determining data reconstruction nodes according to claim 2, characterized in that: After determining the parameter value corresponding to the performance parameter of each node, the method further includes: Determine whether there is a shard data reading task at the current node; wherein the shard data reading task is a task for reading shard data during the reconstruction process; When it is determined that the current node has the task of reading the shard data, it is determined that the parameter value corresponding to the current node is reduced by a first preset parameter value to obtain a first adjusted parameter value; When it is determined that the task of reading the sharded data does not exist in the current node, it is determined not to adjust the parameter value corresponding to the current node.

6. The method for determining data reconstruction nodes according to claim 2, characterized in that: After determining the parameter value corresponding to the performance parameter of each node, the method further includes: Get the historical operation rules of the current node; Determine whether the current node has a data processing task at a preset reconstruction time according to the historical operation rule of the current node; wherein the preset reconstruction time is the preset time required for subsequent data reconstruction; When the current node has a data processing task at the preset reconstruction time, determining that the parameter value is reduced by a second preset parameter value to obtain a second adjusted parameter value; When the current node does not have a data processing task at the preset reconstruction time, it is determined not to adjust the parameter value.

7. The method for determining data reconstruction nodes according to claim 1, characterized in that: After determining the idlest node from the nodes according to the operation performance of each node and taking the idlest node as the reconstruction node, the method further includes: Using the reconstruction node to send a remote procedure call protocol request, and reading the data slice according to the remote procedure call protocol request; Calculate the checksum value according to the data slices to obtain reconstructed data; The reconstructed data is sent to the node corresponding to the failed disk, so that the node corresponding to the failed disk writes the reconstructed data to the selected non-faulty disk according to the redundancy selection strategy.

8. A data reconstruction node determination device, characterized in that: include: A performance parameter acquisition module is used to obtain the performance parameters corresponding to each node in the cluster; wherein the performance parameters are parameters related to the node operation performance; A performance determination module, used to determine the operating performance of each node according to the performance parameters; The reconstruction node determination module is used to determine the idlest node from the nodes according to the operation performance of each node, and use the idlest node as the reconstruction node.

9. A data reconstruction node determination device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the data reconstruction node determination method according to any one of claims 1 to 7 when executing the computer program.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data reconstruction node determination method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and system for backing up and recovering data in cluster systems

    CN108733509A

  • A method and an apparatus for selecting a storage node for erasure code data reconstruction of a distributed file system

    CN108958973A

  • Data recovery method and device, equipment and storage medium

    CN114237981A

  • Performance metric-based selection of one or more database server instances to perform database recovery

    US20060015542A1