Data recovery method, device, equipment and computer-readable storage medium
By evaluating the physical upper limit and current business performance of the distributed storage system and dynamically adjusting the data recovery speed, the high availability and high performance issues of the system in the event of a failure are solved, and the data recovery speed and user experience are improved.
Patent Information
- Application Number
- CN202510875483.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-06-27
AI Technical Summary
Existing technologies cannot fully utilize the high availability and high performance of distributed storage systems, especially when node failures occur, where data recovery and migration operations have a significant impact on business performance.
By obtaining the physical upper limits of system performance, calculating the theoretical values of performance parameters, and detecting the current business input and output times per second and bandwidth values, the data recovery speed is dynamically adjusted to meet business needs.
While ensuring business availability, it greatly improves data recovery speed, ensures high availability and high performance of the system, and improves user experience and data security.
Smart Images

Figure CN120386663B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a data recovery method, apparatus, device, and computer-readable storage medium. Background Art
[0002] Distributed storage systems often use multiple replicas to improve system availability and performance. If a node in the system goes down or hardware failures occur (such as a damaged hard drive), data replicas must be restored and migrated. If this occurs during peak business hours and limited by the system's hardware configuration, the pressure of these restoration and migration operations can significantly impact business operations.
[0003] Currently, there are two common data recovery methods. One is to prioritize business operations by setting a fixed rate limit on data recovery and migration traffic to prevent them from impacting business performance. The other is to set an adjustable rate limit for recovery and migration. To prioritize business operations, users can set the rate limit to the lowest value; to accelerate business recovery, users can set the rate limit to the highest value. Neither of these methods fully utilizes the high availability and performance of the storage system. Summary of the Invention
[0004] The present application provides a data recovery method, apparatus, device, and computer-readable storage medium to at least solve the problem in related technologies that the high availability and high performance of storage systems cannot be fully utilized.
[0005] This application provides a data recovery method, including:
[0006] Obtaining the physical upper limit values of system performance and calculating the theoretical value of each performance parameter based on the physical upper limit values;
[0007] Detect the system's current business input and output times per second and current business bandwidth value;
[0008] Determine the target data recovery speed based on the theoretical values of each performance parameter, the number of input and output times per second of the current service, and the current service bandwidth value;
[0009] Data recovery is performed according to the target data recovery speed.
[0010] The present application also provides a data recovery device, comprising:
[0011] The performance parameter theoretical value calculation module is used to obtain the physical upper limit values of the system performance and calculate the theoretical value of each performance parameter based on the physical upper limit values;
[0012] The service performance data detection module is used to detect the system's current service input and output times per second and the current service bandwidth value;
[0013] A data recovery speed determination module is used to determine a target data recovery speed based on theoretical values of various performance parameters, the number of input and output times per second of the current service, and the current service bandwidth value;
[0014] The data recovery module is used to recover data according to the target data recovery speed.
[0015] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned data recovery methods when executing the computer program.
[0016] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned data recovery methods are implemented.
[0017] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned data recovery methods when executed by a processor.
[0018] Through this application, by evaluating the physical upper limit values of the system, calculating the theoretical values of each performance parameter based on each physical upper limit value, and detecting the number of input and output times per second of the current business of the system and the current business bandwidth value, the target data recovery speed is determined based on the theoretical values of each performance parameter, the number of input and output times per second of the current business and the current business bandwidth value, and data recovery is performed according to the target data recovery speed. That is, according to the idle state of the business, the data recovery speed is dynamically adjusted to fully guarantee the availability of the business. Therefore, the technical problem of not being able to give full play to the high availability and high performance of the storage system can be solved, and the speed of data recovery is greatly improved, which can not only guarantee the end user's user experience, but also ensure data security, and achieve the technical effect of high availability and high performance of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 A flowchart of a data recovery method according to an embodiment of the present invention;
[0021] Figure 2A flowchart of another data recovery method provided in an embodiment of the present application;
[0022] Figure 3 This is a structural block diagram of a data recovery device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0024] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0025] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0026] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the data recovery method depends, the specific application environment architecture or specific hardware architecture is described here.
[0027] The embodiments of the present application provide a data recovery method, which is described in detail in conjunction with the execution process of the data recovery method.
[0028] See also Figure 1 , Figure 1 This is a flowchart of an implementation of a data recovery method provided in an embodiment of the present application. The method may include the following steps.
[0029] S101: Acquire physical upper limits of system performance, and calculate theoretical values of performance parameters based on the physical upper limits.
[0030] The physical upper limits of system performance can be obtained based on the hardware type evaluation in the system. For example, the hardware configuration information of the system can be obtained and the physical upper limits can be determined based on the hardware configuration information.
[0031] The physical upper limit values may include the number of random read and write inputs and outputs per second for a single disk, the read ratio, the write ratio, the theoretical value of the single-node network bandwidth rate, etc.
[0032] After the hardware configuration of the distributed storage system is determined, the physical upper limit of the system performance is also determined. After obtaining the physical upper limit of the system performance, the theoretical value of each performance parameter is calculated based on the physical upper limit.
[0033] S102: Detect the number of input and output times per second and the current service bandwidth value of the system.
[0034] According to system requirements, the system's current business input and output times per second (Latest of IOPS) and current business bandwidth value (Latest of BW) can be detected at preset time intervals.
[0035] It should be noted that the preset time interval can be set and adjusted according to actual conditions, and the embodiment of the present application does not limit this. For example, it can be set to 2 seconds, 4 seconds, etc.
[0036] S103: Determine a target data recovery speed based on theoretical values of various performance parameters, the number of input and output times per second of the current service, and the current service bandwidth value.
[0037] After calculating the theoretical values of each performance parameter and detecting the current business performance data of the system, the target data recovery speed is determined based on the theoretical values of each performance parameter, the current business input and output times per second, and the current business bandwidth value. That is, the appropriate data recovery speed is dynamically generated through the theoretical values of each performance parameter and the current business performance data.
[0038] S104: Perform data recovery according to the target data recovery speed.
[0039] After determining the target data recovery speed, data recovery is performed according to the target data recovery speed. This allows the data recovery speed to be adjusted in a timely manner based on the dynamic changes in system business performance. While fully ensuring business availability, it greatly improves the data recovery speed, ensures data security, and achieves high availability and high performance of the system.
[0040] Through this application, by evaluating the physical upper limit values of the system, calculating the theoretical values of each performance parameter based on each physical upper limit value, and detecting the number of input and output times per second of the current business of the system and the current business bandwidth value, the target data recovery speed is determined based on the theoretical values of each performance parameter, the number of input and output times per second of the current business and the current business bandwidth value, and data recovery is performed according to the target data recovery speed. That is, according to the idle state of the business, the data recovery speed is dynamically adjusted to fully guarantee the availability of the business. Therefore, the technical problem of not being able to give full play to the high availability and high performance of the storage system can be solved, and the speed of data recovery is greatly improved, which can not only guarantee the end user's user experience, but also ensure data security, and achieve the technical effect of high availability and high performance of the system.
[0041] See also Figure 2 , Figure 2 This is a flowchart of another data recovery method provided in an embodiment of the present application. The method may include the following steps.
[0042] S201: Acquire physical upper limits of system performance.
[0043] S202: Obtain a write penalty value, system adjustment parameters, the total number of disks, and the total number of nodes.
[0044] The actual disk Input / Output Operations Per Second (IOPS) may differ from the standard value, so you need to adjust system tuning parameters. Furthermore, disks with Redundant Array of Independent Disks (RAID) levels (0, 1, 5, 10, etc.) will incur a write penalty, reducing the actual IOPS. Obtain the write penalty value, system tuning parameters, total number of disks, and total number of nodes.
[0045] S203: Calculate the theoretical maximum number of input and output times per second of the cluster based on the write penalty value, system adjustment parameters, the total number of disks, and the single-disk random read and write input and output times per second, the read ratio, and the write ratio in each physical upper limit value.
[0046] After obtaining the write penalty value, system adjustment parameters, total number of disks, and total number of nodes, calculate the theoretical maximum cluster IOPS (MaxIOPSofCluster) based on the write penalty value, system adjustment parameters, total number of disks, and the single-disk random read and write IOPS, read ratio, and write ratio in each physical upper limit.
[0047] For example, the theoretical maximum number of input and output times per second of a cluster can be calculated using the following formula:
[0048] MaxIOPSofCluster = Single disk random read and write input and output times per second * Total number of disks * [read ratio + write ratio / write penalty value] * system adjustment parameters.
[0049] S204: Calculate the theoretical value of the cluster maximum bandwidth according to the system adjustment parameters, the total number of nodes, and the theoretical value of the single-node network bandwidth rate in each physical upper limit value.
[0050] After obtaining the write penalty value, system adjustment parameters, total number of disks, and total number of nodes, the theoretical value of the cluster maximum bandwidth (MaxBWofCluster) is calculated based on the system adjustment parameters, total number of nodes, and the theoretical value of the single-node network bandwidth rate in each physical upper limit value. This allows the theoretical value of the cluster's maximum input and output times per second and the theoretical value of the cluster's maximum bandwidth to be calculated based on the system's hardware configuration, providing a reliable theoretical basis for the subsequent dynamic adjustment of data recovery speed.
[0051] The theoretical maximum bandwidth of a cluster can be calculated using the following formula:
[0052] MaxBWofCluster = theoretical value of single-node network bandwidth rate * total number of nodes * system adjustment parameters.
[0053] There are losses during network transmission, so system adjustment parameters also need to be added. The value range is 0~1, and the given value can be evaluated according to the system status.
[0054] S205: Detect the number of input and output times per second and the current service bandwidth value of the system.
[0055] S206: Obtain the current service input and output times per second threshold, the current service bandwidth value threshold, and the current data recovery speed.
[0056] The current service input / output times per second (IOPS) threshold and the current service bandwidth value threshold (BW) can be manually evaluated or calculated based on the specific scenario of the upper-layer system. For example, the current service input / output times per second threshold and the current service bandwidth value threshold can be evaluated based on the specific usage environment of the upper-layer system and the concurrency and latency requirements set based on daily service traffic statistics. Obtain the current service input / output times per second threshold, the current service bandwidth value threshold, and the current data recovery speed.
[0057] The system monitors data read and write latency. If the fluctuation in data read and write latency exceeds a preset percentage for a preset number of consecutive cycles, an exception message is displayed, triggering a reassessment of the service input and output times per second threshold and service bandwidth threshold. By dynamically evaluating the service input and output times per second threshold and service bandwidth threshold based on data read and write latency, the effectiveness of the service input and output times per second threshold and service bandwidth threshold settings is ensured.
[0058] S207: When it is determined that data recovery speed adjustment is required based on the current service input and output times per second threshold, the current service bandwidth value threshold, the current service input and output times per second, and the current service bandwidth value, the current data recovery speed is adjusted to obtain a target data recovery speed.
[0059] After obtaining the current business input and output times per second threshold, the current business bandwidth value threshold, and the current data recovery speed, determine whether the data recovery speed needs to be adjusted based on the current business input and output times per second threshold, the current business bandwidth value threshold, the current business input and output times per second, and the current business bandwidth value. When it is determined that the data recovery speed needs to be adjusted based on the current business input and output times per second threshold, the current business bandwidth value threshold, the current business input and output times per second, and the current business bandwidth value, adjust the current data recovery speed to obtain the target data recovery speed.
[0060] In a specific implementation of the present application, step S207 may include the following steps:
[0061] Step 1: Calculate the difference between the theoretical maximum number of input and output times per second of the cluster and the number of input and output times per second of the current business to obtain the maximum data recovery speed;
[0062] Step 2: Obtain the minimum data recovery speed;
[0063] Step 3: If the number of input and output times per second of the current service is greater than the threshold number of input and output times per second of the current service or the current service bandwidth value is greater than the threshold value of the current service bandwidth value, the minimum value of the recovery data speed is determined as the target data recovery speed;
[0064] Step 4: If the current service input and output times per second is greater than the current service input and output times per second threshold and the current service bandwidth value is greater than the current service bandwidth value threshold, determine the target data recovery speed based on the current data recovery speed and the maximum recovery data speed.
[0065] For the convenience of description, the above four steps can be combined for explanation.
[0066] After calculating the theoretical maximum cluster I / O times per second and obtaining the current service I / O times per second, the difference between the theoretical maximum cluster I / O times per second and the current service I / O times per second is calculated to obtain the maximum data recovery speed (MaxofRecovery). Since enabling RDMA on the network card increases the bandwidth of the entire cluster, enabling RDMA on the cluster automatically increases the MaxofRecovery value by a certain percentage, such as 15%.
[0067] The minimum data recovery speed (MinofRecovery) can be calculated based on a pre-set minimum data recovery speed calculation method. The minimum data recovery speed is obtained. If the current business input and output times per second are greater than the current business input and output times per second threshold or the current business bandwidth value is greater than the current business bandwidth value threshold, the minimum data recovery speed is determined as the target data recovery speed. If the current business input and output times per second are greater than the current business input and output times per second threshold and the current business bandwidth value is greater than the current business bandwidth value threshold, the target data recovery speed is determined based on the current data recovery speed and the maximum data recovery speed. By dynamically setting the business input and output times per second threshold and the business bandwidth value threshold, the target data recovery speed is determined based on the current business input and output times per second threshold and the current business bandwidth value threshold, thereby improving the accuracy of the data recovery speed determination.
[0068] In a specific implementation of the present application, obtaining the minimum value of the data recovery speed may include the following steps:
[0069] Step 1: Check whether there is a preset data recovery time limit. If so, go to step 2; if not, go to step 3;
[0070] Step 2: Obtain the amount of data to be recovered, calculate the quotient of the amount of data to be recovered and the upper limit of the data recovery time, and obtain the minimum data recovery speed;
[0071] Step 3: Obtain a first preset ratio value, and multiply the maximum value of the restored data speed by the first preset ratio value to obtain a minimum value of the restored data speed.
[0072] For the convenience of description, the above three steps can be combined for explanation.
[0073] Check whether there is a preset data recovery time upper limit (Time of Recovery). If there is a preset data recovery time upper limit, it means that the system has strict requirements on the data recovery time. Get the amount of data to be recovered, calculate the quotient of the amount of data to be recovered and the data recovery time upper limit, and get the minimum data recovery speed.
[0074] For example, if there is a preset upper limit on the data recovery time, the minimum data recovery speed can be calculated using the following formula:
[0075] MinofRecovery = amount of data to be recovered ÷ TimeofRecovery.
[0076] If there is no preset upper limit for data recovery time, it means that the system has no strict requirements for data recovery time. A first preset ratio value is obtained, and the maximum value of the data recovery speed and the first preset ratio value are multiplied to obtain the minimum value of the data recovery speed.
[0077] If there is no preset upper limit on the data recovery time, the minimum data recovery speed can be calculated using the following formula:
[0078] MinofRecovery = MaxBWofCluster * the first preset ratio value.
[0079] It should be noted that the first preset ratio value can be set and adjusted according to actual conditions, and the embodiment of the present application does not limit this. For example, it can be set to 0.05.
[0080] By setting the minimum value of the data recovery speed according to whether there is a preset upper limit of the data recovery time, the accuracy of setting the minimum value of the data recovery speed is improved.
[0081] In a specific embodiment of the present application, determining the target data recovery speed according to the current data recovery speed and the maximum data recovery speed may include the following steps:
[0082] Step 1: Determine whether the current data recovery speed reaches a second preset ratio value of the maximum data recovery speed; if so, execute step 2; if not, execute step 3;
[0083] Step 2: Determine the maximum data recovery speed as the target data recovery speed;
[0084] Step 3: Determine the current data recovery speed as the target data recovery speed.
[0085] For the convenience of description, the above three steps can be combined for explanation.
[0086] If the current service input and output times per second are greater than the current service input and output times per second threshold and the current service bandwidth value is greater than the current service bandwidth value threshold, a determination is made as to whether the current data recovery speed has reached a second preset ratio of the maximum data recovery speed. If so, the maximum data recovery speed is determined as the target data recovery speed. If not, the current data recovery speed is determined as the target data recovery speed, maintaining the data recovery speed unchanged. By using the result of comparing the current data recovery speed with the second preset ratio of the maximum data recovery speed as a basis for adjusting the data recovery speed when it is determined that the current service input and output times per second are greater than the current service input and output times per second threshold and the current service bandwidth value is greater than the current service bandwidth value threshold, the accuracy of determining the data recovery speed is further improved.
[0087] S208: When it is determined that no data recovery speed adjustment is required based on the current service input and output times per second threshold, the current service bandwidth value threshold, the current service input and output times per second, and the current service bandwidth value, the current data recovery speed is determined as the target data recovery speed.
[0088] When it is determined that no data recovery speed adjustment is required based on the current business input and output times per second threshold, the current business bandwidth value threshold, the current business input and output times per second and the current business bandwidth value, the current data recovery speed is determined as the target data recovery speed, thereby keeping the data recovery speed unchanged.
[0089] S209: Perform data recovery according to the target data recovery speed.
[0090] By detecting the system's business performance, the resource allocation between business operations and data recovery and migration operations is dynamically and timely adjusted, so that the recovery and migration operations of data copies can be completed as soon as possible while ensuring business performance, thereby maximizing the effectiveness of system resources.
[0091] You can also set up exception handling processes to capture abnormal conditions during system performance evaluation, system performance monitoring, and system performance adjustment, and manually intervene to handle abnormal conditions. During data recovery, you can perform consistency checks on completed data. If data inconsistencies are found, the recovery operation is stopped and a recovery exception log is recorded. At the same time, the data recovery task is re-recorded and an exception error message is thrown.
[0092] In a specific embodiment of the present application, after detecting the number of input and output times per second and the current service bandwidth value of the system, the method may further include the following steps:
[0093] Step 1: Compare the current business input and output times per second with the theoretical maximum input and output times per second of the cluster;
[0094] Step 2: If the current service input and output times per second is greater than the theoretical value of the cluster's maximum input and output times per second, assign the current service input and output times per second to the theoretical value of the cluster's maximum input and output times per second to update the theoretical value of the cluster's maximum input and output times per second.
[0095] Step 3: Compare the current service bandwidth value with the theoretical maximum bandwidth of the cluster;
[0096] Step 4: If the current service bandwidth value is greater than the theoretical value of the cluster maximum bandwidth, the current service bandwidth value is assigned to the theoretical value of the cluster maximum bandwidth to update the theoretical value of the cluster maximum bandwidth.
[0097] For the convenience of description, the above four steps can be combined for explanation.
[0098] After detecting the system's current business input and output times per second and the current business bandwidth value, the current business input and output times per second can be compared with the theoretical value of the cluster's maximum input and output times per second. If the current business input and output times per second is greater than the theoretical value of the cluster's maximum input and output times per second, it indicates that the estimated theoretical value of the cluster's maximum input and output times per second is inaccurate. The current business input and output times per second is assigned to the theoretical value of the cluster's maximum input and output times per second to update the theoretical value of the cluster's maximum input and output times per second. The current business bandwidth value can also be compared with the theoretical value of the cluster's maximum bandwidth. If the current business bandwidth value is greater than the theoretical value of the cluster's maximum bandwidth, it indicates that the estimated theoretical value of the cluster's maximum bandwidth is inaccurate. The current business bandwidth value is assigned to the theoretical value of the cluster's maximum bandwidth to update the theoretical value of the cluster's maximum bandwidth. By timely updating the theoretical value of the cluster's maximum input and output times per second and the theoretical value of the cluster's maximum bandwidth, the accuracy of the set theoretical values of the cluster's maximum input and output times per second and the theoretical value of the cluster's maximum bandwidth is improved.
[0099] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0100] An embodiment of the present application also provides a data recovery device.
[0101] See also Figure 3 , Figure 3 This is a structural block diagram of a data recovery device provided in an embodiment of the present application. The device may include:
[0102] The performance parameter theoretical value calculation module 31 is used to obtain the physical upper limit values of the system performance and calculate the theoretical value of each performance parameter based on the physical upper limit values;
[0103] The service performance data detection module 32 is used to detect the number of input and output times per second and the current service bandwidth value of the system;
[0104] The data recovery speed determination module 33 is used to determine the target data recovery speed based on the theoretical values of various performance parameters, the number of input and output times per second of the current service, and the current service bandwidth value;
[0105] The data recovery module 34 is configured to recover data at a target data recovery speed.
[0106] Through this application, by evaluating the physical upper limit values of the system, calculating the theoretical values of each performance parameter based on each physical upper limit value, and detecting the number of input and output times per second of the current business of the system and the current business bandwidth value, the target data recovery speed is determined based on the theoretical values of each performance parameter, the number of input and output times per second of the current business and the current business bandwidth value, and data recovery is performed according to the target data recovery speed. That is, according to the idle state of the business, the data recovery speed is dynamically adjusted to fully guarantee the availability of the business. Therefore, the technical problem of not being able to give full play to the high availability and high performance of the storage system can be solved, and the speed of data recovery is greatly improved, which can not only guarantee the end user's user experience, but also ensure data security, and achieve the technical effect of high availability and high performance of the system.
[0107] In a specific embodiment of the present application, the performance parameter theoretical value calculation module 31 may include:
[0108] The parameter acquisition submodule is used to obtain the write penalty value, system adjustment parameters, the total number of disks and the total number of nodes;
[0109] The cluster maximum I / O theoretical value calculation submodule is used to calculate the cluster maximum I / O theoretical value per second based on the write penalty value, system adjustment parameters, the total number of disks, and the single-disk random read and write I / O per second, read ratio, and write ratio in each physical upper limit value.
[0110] The cluster maximum bandwidth theoretical value calculation submodule is used to calculate the cluster maximum bandwidth theoretical value based on the system adjustment parameters, the total number of nodes and the theoretical value of the single-node network bandwidth rate in each physical upper limit value.
[0111] In a specific embodiment of the present application, the data recovery speed determination module 33 may include:
[0112] The current threshold and speed acquisition submodule is used to obtain the current service input and output times per second threshold, the current service bandwidth value threshold and the current data recovery speed;
[0113] A first speed obtaining submodule is configured to adjust the current data recovery speed to obtain a target data recovery speed when it is determined that the data recovery speed needs to be adjusted based on the current service input and output times per second threshold, the current service bandwidth value threshold, the current service input and output times per second, and the current service bandwidth value;
[0114] The second speed obtaining submodule is used to determine the current data recovery speed as the target data recovery speed when it is determined that no data recovery speed adjustment is required based on the current business input and output times per second threshold, the current business bandwidth value threshold, the current business input and output times per second and the current business bandwidth value.
[0115] In a specific embodiment of the present application, the first speed obtaining submodule may include:
[0116] The maximum speed obtaining unit is used to calculate the difference between the theoretical maximum number of input and output times per second of the cluster and the number of input and output times per second of the current business to obtain the maximum speed of data recovery;
[0117] A speed minimum value obtaining unit, used for obtaining a minimum value of the speed of restored data;
[0118] A first data recovery speed determining unit is configured to determine the minimum data recovery speed as the target data recovery speed if the number of input and output times per second of the current service is greater than a threshold number of input and output times per second of the current service or the current service bandwidth value is greater than a threshold value of the current service bandwidth value;
[0119] The second data recovery speed determination unit is used to determine the target data recovery speed according to the current data recovery speed and the maximum data recovery speed if the current business input and output times per second are greater than the current business input and output times per second threshold and the current business bandwidth value is greater than the current business bandwidth value threshold.
[0120] In a specific embodiment of the present application, the speed minimum value obtaining unit may include:
[0121] A time upper limit detection subunit is used to detect whether a preset data recovery time upper limit exists;
[0122] A first speed minimum value obtaining subunit is configured to obtain the amount of data to be recovered when it is determined that there is a preset data recovery time upper limit value, calculate the quotient of the amount of data to be recovered and the data recovery time upper limit value, and obtain the minimum data recovery speed;
[0123] The first speed minimum value obtaining subunit is used to obtain a first preset ratio value when it is determined that there is no preset data recovery time upper limit value, and multiply the maximum value of the recovery data speed by the first preset ratio value to obtain the minimum value of the recovery data speed.
[0124] In a specific implementation of the present application, the second data recovery speed determining unit may include:
[0125] A judging subunit, configured to judge whether the current data recovery speed reaches a second preset ratio value of the maximum data recovery speed;
[0126] a first data recovery speed determining subunit, configured to determine the maximum data recovery speed as a target data recovery speed when it is determined that the current data recovery speed reaches a second preset ratio value of the maximum data recovery speed;
[0127] The second data recovery speed determining subunit is configured to determine the current data recovery speed as the target data recovery speed when it is determined that the current data recovery speed does not reach a second preset ratio value of the maximum data recovery speed.
[0128] In a specific embodiment of the present application, the device may further include:
[0129] The input and output times per second comparison module is used to compare the current business input and output times per second with the theoretical value of the cluster's maximum input and output times per second after detecting the system's current business input and output times per second and the current business bandwidth value;
[0130] The cluster maximum input and output times per second theoretical value update module is used to assign the current business input and output times per second to the cluster maximum input and output times per second theoretical value if the current business input and output times per second is greater than the cluster maximum input and output times per second theoretical value, so as to update the cluster maximum input and output times per second theoretical value;
[0131] The bandwidth value comparison module is used to compare the current service bandwidth value with the theoretical maximum bandwidth value of the cluster;
[0132] The cluster maximum bandwidth theoretical value updating module is used to assign the current service bandwidth value to the cluster maximum bandwidth theoretical value if the current service bandwidth value is greater than the cluster maximum bandwidth theoretical value, so as to update the cluster maximum bandwidth theoretical value.
[0133] For the description of the features in the embodiment corresponding to the data recovery device, reference can be made to the relevant description of the embodiment corresponding to the data recovery method, which will not be repeated here.
[0134] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above data recovery method embodiments.
[0135] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned data recovery method embodiments when running.
[0136] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0137] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above data recovery method embodiments are implemented.
[0138] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned data recovery method embodiments are implemented.
[0139] 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 above description has generally described the components and steps of each example according to their functions. 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 beyond the scope of this application.
[0140] The above describes in detail a data recovery method, apparatus, device, and computer-readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core concept of the present application. It should be noted that, for those skilled in the art, without departing from the principles of the present application, several improvements and modifications may be made to the present application, and such improvements and modifications also fall within the scope of protection of the present application.
Claims
1. A data recovery method, characterized in that: include: Obtaining the physical upper limit values of system performance and calculating the theoretical value of each performance parameter based on the physical upper limit values; Detect the system's current business input and output times per second and current business bandwidth value; Determine the target data recovery speed based on the theoretical values of each performance parameter, the number of input and output times per second of the current service, and the current service bandwidth value; Performing data recovery at the target data recovery speed; Calculate the theoretical values of various performance parameters based on the physical upper limit values, including: Get write penalty values, system tuning parameters, total number of disks, and total number of nodes; Calculate the theoretical maximum number of input and output times per second of the cluster based on the write penalty value, the system adjustment parameters, the total number of disks, and the number of random read and write inputs and outputs per second of a single disk, the read ratio, and the write ratio in each physical upper limit value; Calculate the theoretical value of the cluster maximum bandwidth based on the system adjustment parameters, the total number of nodes, and the theoretical value of the single-node network bandwidth rate in each physical upper limit value; Determining a target data recovery speed based on theoretical values of various performance parameters, the number of input and output times per second of the current service, and the current service bandwidth value includes: Obtain the current service input and output times per second threshold, current service bandwidth value threshold, and current data recovery speed; When it is determined that the data recovery speed needs to be adjusted based on the current service input and output times per second threshold, the current service bandwidth value threshold, the current service input and output times per second, and the current service bandwidth value, adjusting the current data recovery speed to obtain the target data recovery speed; When it is determined that no data recovery speed adjustment is required based on the current service input and output times per second threshold, the current service bandwidth value threshold, the current service input and output times per second, and the current service bandwidth value, the current data recovery speed is determined as the target data recovery speed; When it is determined that the data recovery speed needs to be adjusted based on the current service input and output times per second threshold, the current service bandwidth value threshold, the current service input and output times per second, and the current service bandwidth value, adjusting the current data recovery speed to obtain the target data recovery speed includes: Calculate the difference between the theoretical maximum number of input and output times per second of the cluster and the number of input and output times per second of the current service to obtain the maximum data recovery speed; Get the minimum value of data recovery speed; When the number of input and output times per second of the current service is greater than the input and output times per second threshold of the current service or the current service bandwidth value is greater than the current service bandwidth value threshold, determining the minimum value of the recovery data speed as the target data recovery speed; When the number of input and output times per second of the current service is greater than the current service input and output times per second threshold and the current service bandwidth value is greater than the current service bandwidth value threshold, determining the target data recovery speed according to the current data recovery speed and the maximum value of the recovery data speed; Get the minimum data recovery speed, including: Check whether there is a preset upper limit on the data recovery time; If yes, then obtain the amount of data to be restored, calculate the quotient of the amount of data to be restored and the upper limit of the data restoration time, and obtain the minimum value of the data restoration speed; If not, a first preset ratio value is obtained, and the product of the maximum value of the restored data speed and the first preset ratio value is multiplied to obtain the minimum value of the restored data speed.
2. The data recovery method according to claim 1, wherein: Determining the target data recovery speed according to the current data recovery speed and the maximum data recovery speed includes: Determining whether the current data recovery speed reaches a second preset ratio value of the maximum data recovery speed; If yes, then the maximum value of the data recovery speed is determined as the target data recovery speed; If not, the current data recovery speed is determined as the target data recovery speed.
3. The data recovery method according to any one of claims 1 to 2, characterized in that: After detecting the system's current service input and output times per second and current service bandwidth value, it also includes: Compare the current service input and output times per second with the theoretical maximum input and output times per second of the cluster; If the current service input and output times per second are greater than the theoretical value of the maximum cluster input and output times per second, assigning the current service input and output times per second to the theoretical value of the maximum cluster input and output times per second to update the theoretical value of the maximum cluster input and output times per second; Comparing the current service bandwidth value with the theoretical maximum bandwidth of the cluster; If the current service bandwidth value is greater than the theoretical value of the cluster maximum bandwidth, the current service bandwidth value is assigned to the theoretical value of the cluster maximum bandwidth to update the theoretical value of the cluster maximum bandwidth.
4. A data recovery device, characterized in that: include: The performance parameter theoretical value calculation module is used to obtain the physical upper limit values of the system performance and calculate the theoretical value of each performance parameter based on the physical upper limit values; The service performance data detection module is used to detect the system's current service input and output times per second and the current service bandwidth value; A data recovery speed determination module is used to determine a target data recovery speed based on theoretical values of various performance parameters, the number of input and output times per second of the current service, and the current service bandwidth value; A data recovery module, configured to recover data at the target data recovery speed; The performance parameter theoretical value calculation module includes: The parameter acquisition submodule is used to obtain the write penalty value, system adjustment parameters, the total number of disks and the total number of nodes; The cluster maximum I / O theoretical value calculation submodule is used to calculate the cluster maximum I / O theoretical value per second based on the write penalty value, system adjustment parameters, the total number of disks, and the single-disk random read and write I / O per second, read ratio, and write ratio in each physical upper limit value. The cluster maximum bandwidth theoretical value calculation submodule is used to calculate the cluster maximum bandwidth theoretical value based on the system adjustment parameters, the total number of nodes and the theoretical value of the single-node network bandwidth rate in each physical upper limit value; The data recovery speed determination module includes: The current threshold and speed acquisition submodule is used to obtain the current service input and output times per second threshold, the current service bandwidth value threshold and the current data recovery speed; A first speed obtaining submodule is configured to adjust the current data recovery speed to obtain a target data recovery speed when it is determined that the data recovery speed needs to be adjusted based on the current service input and output times per second threshold, the current service bandwidth value threshold, the current service input and output times per second, and the current service bandwidth value; A second speed obtaining submodule is configured to determine the current data recovery speed as the target data recovery speed when it is determined that no data recovery speed adjustment is required based on the current service input and output times per second threshold, the current service bandwidth value threshold, the current service input and output times per second, and the current service bandwidth value; The first speed acquisition submodule includes: The maximum speed obtaining unit is used to calculate the difference between the theoretical maximum number of input and output times per second of the cluster and the number of input and output times per second of the current business to obtain the maximum speed of data recovery; A speed minimum value obtaining unit, used for obtaining a minimum value of the speed of restored data; A first data recovery speed determining unit is configured to determine the minimum data recovery speed as the target data recovery speed if the number of input and output times per second of the current service is greater than a threshold number of input and output times per second of the current service or the current service bandwidth value is greater than a threshold value of the current service bandwidth value; A second data recovery speed determining unit is configured to determine a target data recovery speed based on the current data recovery speed and the maximum data recovery speed if the number of input and output times per second of the current service is greater than the current service input and output times per second threshold and the current service bandwidth value is greater than the current service bandwidth value threshold; The speed minimum value acquisition unit includes: A time upper limit detection subunit is used to detect whether a preset data recovery time upper limit exists; A first speed minimum value obtaining subunit is configured to obtain the amount of data to be recovered when it is determined that there is a preset data recovery time upper limit value, calculate the quotient of the amount of data to be recovered and the data recovery time upper limit value, and obtain the minimum data recovery speed; The first speed minimum value obtaining subunit is used to obtain a first preset ratio value when it is determined that there is no preset data recovery time upper limit value, and multiply the maximum value of the recovery data speed by the first preset ratio value to obtain the minimum value of the recovery data speed.
5. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the data recovery method according to any one of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the data recovery method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Distributed cluster data recovery method, device, equipment and storage medium
CN110659148A
Control method and device, electronic equipment and storage medium
CN115150415A