CN115657952A - Method, device and medium for adjusting data reconstruction speed according to slow request - Google Patents

Method, device and medium for adjusting data reconstruction speed according to slow request Download PDF

Info

Publication number
CN115657952A
CN115657952A CN202211348989.6A CN202211348989A CN115657952A CN 115657952 A CN115657952 A CN 115657952A CN 202211348989 A CN202211348989 A CN 202211348989A CN 115657952 A CN115657952 A CN 115657952A
Authority
CN
China
Prior art keywords
data reconstruction
reconstruction speed
speed
slow request
slow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211348989.6A
Other languages
Chinese (zh)
Inventor
刘鑫
孟祥瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202211348989.6A priority Critical patent/CN115657952A/en
Publication of CN115657952A publication Critical patent/CN115657952A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method, a device and a medium for adjusting the speed of data reconstruction according to a slow request, and relates to the field of distributed storage systems. The method comprises the following steps: under the condition that a slow request occurs in a distributed storage system, acquiring object storage equipment with the slow request; determining a storage pool with a slow request according to the object storage device; adjusting the data reconstruction speed percentage of the storage pool according to the slow request; and determining the actual data reconstruction speed according to the preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage. Therefore, the method realizes the speed of adjusting the data reconstruction according to the slow request and reduces the influence of the data reconstruction on the front-end service by determining the storage pool with the slow request and further adjusting the data reconstruction speed percentage of the storage pool with the slow request according to the slow request. In addition, the application also provides a device for adjusting the data reconstruction speed according to the slow request and a computer readable storage medium, and the effects are the same.

Description

Method, device and medium for adjusting data reconstruction speed according to slow request
Technical Field
The present application relates to the field of distributed storage systems, and in particular, to a method, an apparatus, and a medium for adjusting a speed of data reconstruction according to a slow request.
Background
The file system manages Storage Server nodes and disks by a distributed Storage cluster composed of service processes such as a cluster monitor, an Object-based Storage Device (OSD), a Metadata Server (MDS), and the like. When one disk fails, the data on the failed disk is recovered to the non-failed disk in the same failure domain through the redundant data on the other disks, which is a basic scenario of data recovery (or called data reconstruction, data recovery/backup). In the process of recovering data, the speed of data recovery is one of the most important issues for users. The speed of data recovery is measured by the number of objects/data amount for completing data recovery in unit time.
In the existing solutions, the speed of data reconstruction is controlled according to the set priority of data reconstruction, and also automatically adjusted according to the current traffic pressure or according to the pressure of the system. However, in a production environment, the distributed storage system needs to adapt to different specifications, scales, service modes and faults, and the current scheme for automatically adjusting the data reconstruction speed may fail, for example, even if the data reconstruction priority is low, the current scheme still has a large influence on the front-end service, which may not only cause a decrease in the distributed storage performance, but also may generate slow requests for tens of seconds or hundreds of seconds, resulting in service interruption.
Therefore, how to adjust the data reconstruction speed according to the slow request is a technical problem to be solved urgently by the person in the art.
Disclosure of Invention
The application aims to provide a method, a device and a medium for adjusting the speed of data reconstruction according to a slow request, which are used for adjusting the speed of data reconstruction according to the slow request and reducing the influence of the data reconstruction on front-end services.
In order to solve the above technical problem, the present application provides a method for adjusting a data reconstruction speed according to a slow request, including:
under the condition that a slow request occurs in a distributed storage system, acquiring object storage equipment with the slow request;
determining a storage pool in which the slow request occurs according to the object storage device;
adjusting the data reconstruction speed percentage of the storage pool according to the slow request;
and determining the actual data reconstruction speed according to the preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage.
Preferably, the obtaining the object storage device in which the slow request occurs comprises:
monitoring all requested lifecycle data by a cluster monitor; the life cycle data is a difference value between the current moment and the corresponding moment when the request is initiated, and the life cycle data is reported to the cluster monitor by the object storage device;
acquiring a maximum value in the life cycle data;
if the maximum value is larger than the time threshold of the slow request; determining that the slow request occurs in a cluster of the distributed storage system;
traversing the requested lifecycle data of all of the object storage devices;
determining whether the requested lifecycle data for each of the object storage devices is greater than the time threshold;
if so, determining that the slow request occurs in the root where the corresponding object storage device is located when the life cycle data is greater than the threshold value;
correspondingly, the determining, according to the object storage device, the storage pool in which the slow request occurs includes:
and traversing all storage pools through the cluster monitor, and determining the storage pool with the slow request according to the root.
Preferably, said adjusting the data reconstruction speed percentage of the storage pool according to the slow request comprises:
acquiring initial data reconstruction speed percentage of the storage pool from the beginning of judging whether the slow request occurs in the storage pool to the first time when the slow request occurs in the storage pool;
reducing the initial data reconstruction speed percentage to a preset lower limit value of the data reconstruction speed percentage;
correspondingly, the determining the actual data reconstruction speed according to the preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage comprises:
and taking the product of the preset upper limit value of the data reconstruction speed and the preset lower limit value of the data reconstruction speed percentage as the current actual data reconstruction speed.
Preferably, after the product of the upper limit value according to the preset data reconstruction speed and the lower limit value of the preset data reconstruction speed percentage is used as the current actual data reconstruction speed, the method further comprises:
starting to reconstruct the data according to the current actual data reconstruction speed, and if the slow request does not disappear within a first preset time, reconstructing the data according to the current actual data reconstruction speed;
starting to reconstruct the data according to the current actual data reconstruction speed, gradually increasing the data reconstruction speed percentage from the lower limit value according to a first preset step length when the slow request disappears in the first preset time and a new slow request does not appear in a second preset time; determining the current actual data reconstruction speed according to the product of the increased data reconstruction speed percentage and the upper limit value; and reconstructing the data according to the current actual data reconstruction speed.
Preferably, in the case that the data reconstruction speed percentage is gradually increased from the lower limit value by a first preset step, the method further includes:
judging whether the slow request occurs or not in the process of increasing the data reconstruction speed percentage;
if so, gradually reducing the data reconstruction speed percentage from the current data reconstruction speed percentage according to a second preset step length; determining the current actual data reconstruction speed according to the product of the reduced data reconstruction speed percentage and the upper limit value; and reconstructing the data according to the current actual data reconstruction speed.
Preferably, after the determining the current actual data reconstruction speed according to the product of the reduced data reconstruction speed percentage and the upper limit value, the method further comprises:
acquiring the current times of adjusting the data reconstruction speed percentage;
judging whether the current times are larger than an adjustment time threshold or not;
if so, reconstructing the data according to the current actual data reconstruction speed;
if not, returning to the step of gradually increasing the data reconstruction speed percentage from the lower limit value according to the first preset step length.
Preferably, after the data reconstruction according to the current actual data reconstruction speed, the method further comprises:
acquiring the duration of data reconstruction according to the current actual data reconstruction speed;
judging whether the duration is greater than a preset duration or not;
if so, resetting the current times, and returning to the step of gradually increasing the data reconstruction speed percentage from the lower limit value according to a first preset step length.
In order to solve the above technical problem, the present application further provides an apparatus for adjusting a data reconstruction speed according to a slow request, including:
the acquisition module is used for acquiring the object storage equipment with the slow request under the condition that the slow request occurs in the distributed storage system;
a first determining module, configured to determine, according to the object storage device, a storage pool in which the slow request occurs;
the adjusting module is used for adjusting the data reconstruction speed percentage of the storage pool according to the slow request;
and the second determining module is used for determining the actual data reconstruction speed according to the preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage.
In order to solve the above technical problem, the present application further provides an apparatus for adjusting a speed of data reconstruction according to a slow request, including:
a memory for storing a computer program;
a processor for implementing the steps of the above method for adjusting the speed of data reconstruction based on slow requests when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the above steps of the method for adjusting the speed of data reconstruction according to a slow request.
The method for adjusting the speed of data reconstruction according to the slow request includes: under the condition that a slow request occurs in a distributed storage system, acquiring object storage equipment with the slow request; determining a storage pool with a slow request according to the object storage device; adjusting the data reconstruction speed percentage of the storage pool according to the slow request; and determining the actual data reconstruction speed according to the preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage. Therefore, the method realizes the speed of adjusting the data reconstruction according to the slow request and reduces the influence of the data reconstruction on the front-end service by determining the storage pool with the slow request and further adjusting the data reconstruction speed percentage of the storage pool with the slow request according to the slow request.
In addition, the present application also provides an apparatus for adjusting the speed of data reconstruction according to a slow request and a computer readable storage medium, which have the same or corresponding technical features as the above mentioned method for adjusting the speed of data reconstruction according to a slow request, and the same effects are obtained.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a method for adjusting a data reconstruction speed according to a slow request according to an embodiment of the present application;
FIG. 2 is a block diagram of an apparatus for adjusting the speed of data reconstruction based on slow requests according to an embodiment of the present application;
FIG. 3 is a block diagram of an apparatus for adjusting the speed of data reconstruction based on slow requests according to another embodiment of the present application;
fig. 4 is a flowchart of a method for adjusting a data recovery speed of a distributed storage system according to a slow request according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a method, a device and a medium for adjusting the speed of data reconstruction according to a slow request, which are used for adjusting the speed of data reconstruction according to the slow request and reducing the influence of data reconstruction on front-end services.
The file system manages the storage server nodes and the disks through a distributed storage cluster formed by Monitor daemon processes (MON for short), OSD, MDS and other service processes of the Monitor cluster. Each disk is managed by a daemon process OSD, and OSD object storage equipment realizes the functions of data reading and writing, copying, balancing, recovering and the like. The system implements a data protection mechanism through data redundancy resulting from multiple copies or erasure codes. When one disk fails, the data on the failed disk is recovered to the non-failed disk in the same failure domain through the redundant data on the other disks, which is a basic scenario of data recovery (or called data reconstruction, data recovery/backup). In addition, as a distributed storage system, besides disk failures, other types of cluster topology changes, such as cluster expansion/contraction, also need to realize balanced distribution of data through flexible migration of objects. These scenarios may also be referred to as data recovery.
The speed of data recovery can be measured by the number of objects/data amount for completing data recovery in unit time. In the existing scheme, quality of Service (QoS) for data recovery is realized, and a user can set four priorities of low, medium, high and full according to needs to control the recovery speed. The scheme sets 2 seconds as one recovery period, and limits the recovery speed by defining the maximum amount of data and the maximum number of objects that can be recovered in one recovery period. Each data recovery priority requires a set of maximum data size and maximum number of objects to be configured. The priority of data recovery needs to be set by a user according to requirements, if the user does not want the data recovery to occupy system resources and affect front-end services, the priority of data recovery needs to be adjusted to be low, and if the user wants to finish the data recovery as soon as possible, the priority of data recovery is adjusted to be high.
In addition to controlling the data reconstruction speed according to the set data reconstruction priority, there are also current schemes to automatically adjust the data recovery speed according to the front-end traffic pressure or according to the pressure of the system. When the pressure of the front-end service is increased or the system becomes busy, the data recovery speed is reduced, and when the pressure of the front-end service is reduced or the system becomes idle, the data recovery speed is increased. However, in a production environment, the distributed storage system needs to adapt to different specifications, scales, service modes and faults, and the current scheme for automatically adjusting the data reconstruction speed may fail. If the influence of data reconstruction on the front-end service is too large, not only the performance of distributed storage is reduced, but also slow requests of tens of seconds or hundreds of seconds can be generated, and service interruption is caused.
The application provides a method for adjusting data recovery speed of a distributed storage system according to a slow request, which is used as a supplement for adjusting the data recovery speed according to business or system pressure. When the OSD of the storage pool has a slow request, the data recovery speed of the corresponding storage pool is rapidly adjusted, and the influence of data reconstruction on the front-end service is reduced.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. Fig. 1 is a flowchart of a method for adjusting a data reconstruction speed according to a slow request according to an embodiment of the present application, as shown in fig. 1, the method includes:
s10: under the condition that a slow request occurs in a distributed storage system, acquiring object storage equipment with the slow request;
s11: determining a storage pool with a slow request according to the object storage device;
s12: adjusting the data reconstruction speed percentage of the storage pool according to the slow request;
s13: and determining the actual data reconstruction speed according to the preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage.
The slow request is a service read-write request which is initiated by the front end with too long time delay and can not be completed within several seconds or even dozens of seconds. This can occur when a hardware/software failure occurs on the storage side or when the pressure on the disk or the like is excessive. In the current scheme, the OSD periodically counts the life cycles of all unfinished service requests, that is, the time difference between the current time and the request initiation time, and reports the difference to the monitor daemon of the MON cluster. And the MON counts the reporting results of all OSD, and if the life cycle of a request exceeds a set threshold value, the slow request is reported. The threshold is typically set at 30 seconds.
When the service pressure and the data reconstruction speed are both too fast, problems that the time for the data reconstruction to occupy a PG placement group (a carrier for placing an object) is long, a service read-write request cannot acquire a PG lock, and the like may occur, and a service slow request occurs. After a slow request occurs, the client may be embodied in a traffic jam or the like, and the user experience may be seriously affected for a delay-sensitive application scenario. There is a need to reduce the reconstruction speed in time, eliminating slow requests.
Before a slow request does not occur and the slow request is not started to be eliminated, an upper limit value of a data reconstruction speed is preset in the embodiment of the application, and after the data reconstruction is started, the upper limit value of the data reconstruction speed is used as a default speed of the data reconstruction. The default speed value is not limited and is determined according to actual conditions. When eliminating the slow request is started, firstly determining the object storage equipment with the slow request; then according to the storage pool in which the slow request occurs, finding out the storage pool in which the slow request occurs; and performing data reconstruction according to the actual data reconstruction speed by adjusting the data reconstruction speed percentage of the storage pool with the slow request and taking the product of the adjusted data reconstruction speed percentage and the preset upper limit value of the data reconstruction speed as the actual data reconstruction speed.
The method for adjusting the data reconstruction speed percentage of the storage pool with the slow request is not limited and is determined according to the actual situation. For example, the data reconstruction speed percentage may be adjusted according to the time of occurrence of the slow request, the number of slow requests, and the like. When a slow request occurs, the data reconstruction speed can be reduced by reducing the data reconstruction speed percentage; when a slow request does not occur, the data reconstruction speed can be increased by increasing the data reconstruction speed percentage. In the embodiment of the application, the data reconstruction speed percentage is defaulted to 100%, and the percentage can set a lower limit through configuration.
The method for adjusting the speed of data reconstruction according to the slow request provided by the embodiment comprises the following steps: under the condition that a slow request occurs in the distributed storage system, acquiring object storage equipment with the slow request; determining a storage pool with a slow request according to the object storage device; adjusting the data reconstruction speed percentage of the storage pool according to the slow request; and determining the actual data reconstruction speed according to the preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage. Therefore, the method realizes the speed of adjusting the data reconstruction according to the slow request and reduces the influence of the data reconstruction on the front-end service by determining the storage pool with the slow request and further adjusting the data reconstruction speed percentage of the storage pool with the slow request according to the slow request.
In order to more accurately acquire the object storage device in which the slow request occurs, a preferred embodiment is that the acquiring the object storage device in which the slow request occurs includes:
monitoring all requested lifecycle data by a cluster monitor; the life cycle data is the difference value between the current moment and the corresponding moment when the request is initiated, and the life cycle data is reported to the cluster monitor by the object storage equipment;
acquiring a maximum value in the life cycle data;
if the maximum value is larger than the time threshold of the slow request; determining that a slow request occurs in a cluster of the distributed storage system;
traversing the requested lifecycle data of all object storage devices;
judging whether the life cycle data of the request of each object storage device is larger than a time threshold value;
if yes, determining that a slow request occurs to the root where the corresponding object storage device is located when the life cycle data is larger than the threshold value;
correspondingly, determining the storage pool in which the slow request occurs according to the object storage device includes:
and traversing all the storage pools through the cluster monitor, and determining the storage pool with the slow request according to the root.
An upper limit of the data reconstruction speed is set. And when the data reconstruction is started, taking the upper limit of the data reconstruction speed as the default speed of the data reconstruction. And the cluster monitor periodically checks the request life cycle statistical data reported by the OSD, and if the maximum value exceeds a slow request time threshold value, the cluster is judged to have a slow request. If the cluster does not have a slow request, the current data reconstruction speed is always maintained. Otherwise, traversing all request life cycle statistical data of the OSD, judging whether the OSD has a request with a life cycle larger than a slow request threshold value, if the OSD has a slow request, considering that the root where the OSD is positioned has the slow request, and recording the number of the slow requests with the root. And traversing all the storage pools by the cluster monitor, searching the root corresponding to the cluster monitor, if the root has a slow request, considering that the slow request occurs in the storage pool, and marking all the storage pools in which the slow request occurs.
In the method for determining the object storage device with the slow request provided by this embodiment, it is first determined whether the slow request occurs in the cluster, then it is further determined whether the object storage resource with the slow request occurs, and then the storage pool corresponding to the root is determined according to the root of the object storage resource with the slow request, so that the position where the slow request occurs can be accurately located.
In order to rapidly reduce the data reconstruction speed in the case of a slow request to rapidly eliminate the slow request, a preferred embodiment is that adjusting the data reconstruction speed percentage of the storage pool according to the slow request comprises:
the method comprises the steps of obtaining initial data reconstruction speed percentage of a storage pool from the beginning of judging whether a slow request occurs in the storage pool to the first time when the slow request occurs in the storage pool;
reducing the initial data reconstruction speed percentage to a preset lower limit value of the data reconstruction speed percentage;
correspondingly, determining the actual data reconstruction speed according to the preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage comprises the following steps:
and taking the product of the upper limit value of the preset data reconstruction speed and the lower limit value of the preset data reconstruction speed percentage as the current actual data reconstruction speed.
The initial data reconstruction speed percentage is not limited and is determined according to actual conditions. In this embodiment, the initial data reconstruction speed percentage (the upper limit value of the corresponding data reconstruction speed) is set to 100%, and when it is determined for the first time that a slow request occurs, the data reconstruction speed percentage of the storage pool in which the slow request occurs is directly reduced to the lower limit value of the data reconstruction speed percentage in this embodiment. The lower limit value of the data reconstruction speed percentage is not limited. If the lower limit value of the data reconstruction speed percentage is 30%, when the slow request of the storage pool is found for the first time, the data reconstruction speed percentage is directly reduced from 100% to 30%. Correspondingly, the current actual data reconstruction speed is the product of 30% and the upper limit value of the data reconstruction speed.
In the method provided by the embodiment, if a slow request occurs in the storage pool, the data reconstruction speed percentage is directly changed to the lower limit, so that the reconstruction speed can be rapidly reduced, and the slow request can be rapidly eliminated.
On the basis of the above embodiment, after once adjusting the data reconstruction speed percentage, the slow request may not be completely eliminated, or after eliminating the slow request, a new slow request may appear after a period of time, therefore, in order to eliminate the slow request as much as possible, a preferred embodiment is that, after taking a product of an upper limit value of the data reconstruction speed set in advance and a lower limit value of the data reconstruction speed percentage set in advance as a current actual data reconstruction speed, the method for adjusting the data reconstruction speed according to the slow request further comprises:
starting to reconstruct data according to the current actual data reconstruction speed, and if the slow request does not disappear within the first preset time, reconstructing the data according to the current actual data reconstruction speed;
starting to reconstruct data according to the current actual data reconstruction speed, gradually increasing the data reconstruction speed percentage from a lower limit value within a first preset step length when the slow request disappears within a first preset time and a new slow request does not appear within a second preset time; determining the current actual data reconstruction speed according to the product of the increased data reconstruction speed percentage and the upper limit value; and reconstructing data according to the current actual data reconstruction speed.
The first preset time, the second preset time and the first preset step length are not limited and are determined according to actual conditions. In the case of a slow request, after once adjusting the data reconstruction speed percentage, if the slow request does not disappear, the percentage is kept at the lower limit. If the slow request disappears and a new slow request does not appear after a period of time (e.g., 5 minutes), the reconstruction speed percentage is increased by the configured step size, e.g., by 1% every 10s, until the increase is 100%.
In the method provided by this embodiment, whether the slow request disappears within the first preset time is determined, and the slow request is eliminated by reducing the percentage of the data reconstruction speed when the slow request reappears, that is, the influence of the slow request is eliminated according to the appearance of the slow request.
In the above embodiment, in the process of gradually increasing the data reconstruction speed percentage from the lower limit value, a new slow request may occur, and in order to eliminate the slow request, it is preferable that in the case of gradually increasing the data reconstruction speed percentage from the lower limit value by a first preset step size, the method for adjusting the speed of data reconstruction according to the slow request further includes:
judging whether a slow request occurs or not in the process of increasing the data reconstruction speed percentage;
if so, gradually reducing the data reconstruction speed percentage from the current data reconstruction speed percentage according to a second preset step length; determining the current actual data reconstruction speed according to the product of the reduced data reconstruction speed percentage and the upper limit value; and reconstructing data according to the current actual data reconstruction speed.
And if the slow request occurs again in the upward adjustment process of the data reconstruction speed percentage, reducing the reconstruction speed percentage according to a second preset step length until reaching a lower limit value. The value of the second preset step is not limited. The step size of the adjustment is proportional to the number of slow requests under the root where the storage pool is located and recorded before. The larger the number of slow requests, the larger the step size of the adjustment. If the slow request disappears without reaching the lower limit, the reduction of the reconstruction percentage is stopped. And after stabilizing for a period of time, not generating the slow request, and continuously increasing the data reconstruction speed percentage from the lower limit value step by step according to a first preset step length.
In the method provided by the embodiment, a processing mode for the slow requests occurring in the process of gradually increasing the data reconstruction speed percentage from the lower limit value is provided, and the influence of the slow requests is eliminated as much as possible.
In practice, disk instability may occur, resulting in the inability to maximize the elimination of slow requests even if the data reconstruction speed percentage is adjusted multiple times. Therefore, on the basis of adjusting the data reconstruction speed percentage in the above embodiment, in this embodiment, an upper limit of the number of times of the up-down adjustment is configured, specifically, after determining the current actual data reconstruction speed according to the product of the decreased data reconstruction speed percentage and the upper limit, the method for adjusting the data reconstruction speed according to the slow request further includes:
acquiring the current times of adjusting the data reconstruction speed percentage;
judging whether the current times is greater than an adjustment time threshold value;
if so, carrying out data reconstruction according to the current actual data reconstruction speed;
if not, returning to the step of gradually increasing the data reconstruction speed percentage from the lower limit value according to the first preset step length.
The threshold value of the number of times of adjustment is not limited and is determined according to actual conditions. The current number is less than or equal to the adjustment number threshold, and the slow request is eliminated according to the step of adjusting the data reconstruction speed percentage of the storage pool according to the slow request described in the above embodiment. And when the current times are larger than the adjustment time threshold, the reconstruction speed percentage is not increased any more, and the data reconstruction is carried out according to the current actual data reconstruction speed.
The method provided by the embodiment can avoid invalid adjustment under the condition that the disk is unstable as much as possible by setting the threshold value of the adjustment times.
In an implementation, it may happen that the data recovery speed is stable at a certain value for a long time, and the influence of the slow request cannot be eliminated, so that, after the data reconstruction is performed according to the current actual data reconstruction speed, the method for adjusting the data reconstruction speed according to the slow request further includes:
acquiring the duration of data reconstruction according to the current actual data reconstruction speed;
judging whether the duration is greater than a preset duration or not;
if so, resetting the current times, and returning to the step of gradually increasing the data reconstruction speed percentage from the lower limit value according to a first preset step length.
In the method provided in this embodiment, a time threshold of the cleaning adjustment times is set, that is, a preset time duration, for example, 1 hour. If the time that the data recovery speed is stabilized at a certain value exceeds the time threshold, the adjustment times are cleared, so that the reconstruction speed percentage can be continuously adjusted upwards, and the data reconstruction speed is increased.
In the foregoing embodiments, the method for adjusting the speed of data reconstruction according to the slow request is described in detail, and the present application also provides corresponding embodiments of the apparatus for adjusting the speed of data reconstruction according to the slow request. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one from the perspective of the function module and the other from the perspective of the hardware.
Fig. 2 is a block diagram of an apparatus for adjusting a data reconstruction speed according to a slow request according to an embodiment of the present application. The present embodiment is based on the angle of the function module, including:
the acquiring module 10 is configured to acquire an object storage device with a slow request when the slow request occurs in the distributed storage system;
a first determining module 11, configured to determine, according to the object storage device, a storage pool in which a slow request occurs;
an adjusting module 12, configured to adjust a data reconstruction speed percentage of the storage pool according to the slow request;
and a second determining module 13, configured to determine an actual data reconstruction speed according to a preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
In the apparatus for adjusting the speed of data reconstruction according to the slow request provided by this embodiment, when a slow request occurs in the distributed storage system, the object storage device in which the slow request occurs is acquired by the acquisition module; determining a storage pool with a slow request according to the object storage device through a first determination module; adjusting the data reconstruction speed percentage of the storage pool through an adjusting module according to the slow request; and determining the actual data reconstruction speed through a second determination module according to the preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage. Therefore, the device realizes the speed of adjusting the data reconstruction according to the slow request and reduces the influence of the data reconstruction on the front-end service by determining the storage pool with the slow request and further adjusting the data reconstruction speed percentage of the storage pool with the slow request according to the slow request.
Fig. 3 is a block diagram of an apparatus for adjusting a data reconstruction speed according to a slow request according to another embodiment of the present application. In this embodiment, based on a hardware perspective, as shown in fig. 3, the apparatus for adjusting the speed of data reconstruction according to a slow request includes:
a memory 20 for storing a computer program;
a processor 21 for implementing the steps of the method of adjusting the speed of data reconstruction based on slow requests as mentioned in the above embodiments when executing the computer program.
The device for adjusting the speed of data reconstruction according to the slow request provided by the embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, or a desktop computer.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The Processor 21 may be implemented in hardware using at least one of a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), and a Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a Graphics Processing Unit (GPU) which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor for processing computing operations related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing the computer program 201, wherein after being loaded and executed by the processor 21, the computer program can implement the relevant steps of the method for adjusting the speed of data reconstruction according to the slow request disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, windows, unix, linux, and the like. Data 203 may include, but is not limited to, data related to the above-mentioned method of adjusting the speed of data reconstruction based on slow requests, and the like.
In some embodiments, the means for adjusting the speed of data reconstruction based on the slow request may further comprise a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in fig. 3 does not constitute a limitation on the means for adjusting the speed of data reconstruction in accordance with slow requests and may include more or fewer components than those shown.
The apparatus for adjusting the speed of data reconstruction according to the slow request provided by the embodiment of the application comprises a memory and a processor, wherein when the processor executes a program stored in the memory, the following method can be implemented: the effect of the method for adjusting the data reconstruction speed according to the slow request is the same as that of the method.
The application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps as set forth in the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The computer readable storage medium provided by the present application includes the above mentioned method for adjusting the speed of data reconstruction according to the slow request, and the effects are the same as above.
In order to make the technical field of the present invention better understand, the present invention is further described in detail with reference to fig. 4 and the detailed description. Fig. 4 is a flowchart of a method for adjusting a data recovery speed of a distributed storage system according to a slow request according to an embodiment of the present application, and as shown in fig. 4, the method includes:
s14: judging whether to start data reconstruction slow request protection; if yes, go to step S15;
s15: setting the reconstruction speed percentage as the upper limit of 100%;
s16: judging whether a slow request occurs; if yes, go to step S17; if not, returning to the step;
s17: reducing the percent reconstitution speed to a lower limit;
s18: judging whether the slow request disappears; if not, returning to the step; if yes, go to step S19;
s19: after stabilizing for a period of time, increasing the percentage of reconstruction speed according to a certain step length;
s20: judging whether a slow request occurs again; if yes, go to step S21; if not, the step S25 is carried out;
s21: reducing the percentage of reconstruction speed by a certain step length;
s22: judging whether the slow request disappears; if not, returning to the step S17; if yes, go to step S23;
s23: judging whether the number of times of slow requests reaches a set upper limit or not; if not, returning to the step S19; if yes, go to step S24;
s24: maintaining the current recovery speed to reach the time threshold value and returning to the step S19;
s25: increasing the percent reconstruction speed to an upper limit;
s26: judging whether a slow request occurs within a threshold time; if yes, returning to the step S21; if not, the step S27 is carried out;
s27: the number of occurrences of slow requests is cleared and the process returns to step S15.
By the method for adjusting the data recovery speed of the distributed storage system according to the slow request, the data recovery speed of the distributed storage system can be adjusted according to whether the system has the slow request or not. In the data reconstruction process, if the system has a slow request, the storage pools influenced by the object storage devices of the slow request are identified, and the data reconstruction speed of the storage pools is rapidly adjusted to rapidly eliminate the slow request and reduce the influence on the front-end service. And service interruption caused by excessive occupation of system resources by data reconstruction is avoided.
The foregoing has described in detail a method, apparatus, and medium for adjusting the speed of data reconstruction based on slow requests provided by the present application. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method for adjusting the speed of data reconstruction from slow requests, comprising:
under the condition that a slow request occurs in a distributed storage system, acquiring object storage equipment with the slow request;
determining a storage pool in which the slow request occurs according to the object storage device;
adjusting the data reconstruction speed percentage of the storage pool according to the slow request;
and determining the actual data reconstruction speed according to the preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage.
2. The method of claim 1, wherein obtaining the object storage device on which the slow request occurred comprises:
monitoring all requested lifecycle data by a cluster monitor; the life cycle data is a difference value between the current moment and the corresponding moment when the request is initiated, and the life cycle data is reported to the cluster monitor by the object storage device;
acquiring a maximum value in the life cycle data;
if the maximum value is larger than the time threshold of the slow request; determining that the slow request occurs in a cluster of the distributed storage system;
traversing the requested lifecycle data of all of the object storage devices;
determining whether the requested lifecycle data of the respective object storage device is greater than the time threshold;
if so, determining that the slow request occurs in the root where the corresponding object storage device is located when the life cycle data is greater than the threshold value;
correspondingly, the determining, according to the object storage device, the storage pool in which the slow request occurs includes:
and traversing all storage pools through the cluster monitor, and determining the storage pool with the slow request according to the root.
3. The method of claim 1 or 2, wherein adjusting the data reconstruction speed percentage of the storage pool according to the slow request comprises:
acquiring initial data reconstruction speed percentage of the storage pool from the beginning of judging whether the slow request occurs in the storage pool to the first time when the slow request occurs in the storage pool;
reducing the initial data reconstruction speed percentage to a preset lower limit value of the data reconstruction speed percentage;
correspondingly, the determining the actual data reconstruction speed according to the preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage comprises:
and taking the product of the preset upper limit value of the data reconstruction speed and the preset lower limit value of the data reconstruction speed percentage as the current actual data reconstruction speed.
4. The method of claim 3, wherein after the product of the upper limit value of the data reconstruction speed according to the preset value and the lower limit value of the data reconstruction speed percentage is used as the current actual data reconstruction speed, the method further comprises:
starting to reconstruct the data according to the current actual data reconstruction speed, and if the slow request does not disappear within a first preset time, reconstructing the data according to the current actual data reconstruction speed;
starting to reconstruct the data according to the current actual data reconstruction speed, gradually increasing the data reconstruction speed percentage from the lower limit value according to a first preset step length when the slow request disappears in the first preset time and a new slow request does not appear in a second preset time; determining the current actual data reconstruction speed according to the product of the increased data reconstruction speed percentage and the upper limit value; and reconstructing the data according to the current actual data reconstruction speed.
5. The method of claim 4, wherein in the case of the step-wise increase of the data reconstruction speed percentage from the lower limit value by a first preset step size, the method further comprises:
judging whether the slow request occurs or not in the process of increasing the data reconstruction speed percentage;
if so, gradually reducing the data reconstruction speed percentage from the current data reconstruction speed percentage according to a second preset step length; determining the current actual data reconstruction speed according to the product of the reduced data reconstruction speed percentage and the upper limit value; and reconstructing the data according to the current actual data reconstruction speed.
6. The method of claim 5, wherein after determining the current actual data reconstruction speed based on the product of the reduced data reconstruction speed percentage and the upper limit, the method further comprises:
acquiring the current times of adjusting the data reconstruction speed percentage;
judging whether the current times is greater than an adjustment time threshold value;
if so, reconstructing the data according to the current actual data reconstruction speed;
if not, returning to the step of gradually increasing the data reconstruction speed percentage from the lower limit value according to the first preset step length.
7. The method of claim 6, wherein after the data reconstruction according to the current actual data reconstruction speed, the method further comprises:
acquiring the duration of data reconstruction according to the current actual data reconstruction speed;
judging whether the duration is greater than a preset duration or not;
if so, resetting the current times, and returning to the step of gradually increasing the data reconstruction speed percentage from the lower limit value according to a first preset step length.
8. An apparatus for adjusting the speed of data reconstruction from slow requests, comprising:
the acquisition module is used for acquiring the object storage equipment with the slow request under the condition that the slow request occurs in the distributed storage system;
a first determining module, configured to determine, according to the object storage device, a storage pool in which the slow request occurs;
the adjusting module is used for adjusting the data reconstruction speed percentage of the storage pool according to the slow request;
and the second determining module is used for determining the actual data reconstruction speed according to the preset upper limit value of the data reconstruction speed and the adjusted data reconstruction speed percentage.
9. An apparatus for adjusting the speed of data reconstruction from slow requests, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method of adjusting the speed of data reconstruction from slow requests as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of adjusting the speed of data reconstruction from slow requests according to any one of claims 1 to 7.
CN202211348989.6A 2022-10-31 2022-10-31 Method, device and medium for adjusting data reconstruction speed according to slow request Pending CN115657952A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211348989.6A CN115657952A (en) 2022-10-31 2022-10-31 Method, device and medium for adjusting data reconstruction speed according to slow request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211348989.6A CN115657952A (en) 2022-10-31 2022-10-31 Method, device and medium for adjusting data reconstruction speed according to slow request

Publications (1)

Publication Number Publication Date
CN115657952A true CN115657952A (en) 2023-01-31

Family

ID=84995481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211348989.6A Pending CN115657952A (en) 2022-10-31 2022-10-31 Method, device and medium for adjusting data reconstruction speed according to slow request

Country Status (1)

Country Link
CN (1) CN115657952A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117608502A (en) * 2024-01-24 2024-02-27 济南浪潮数据技术有限公司 Data reconstruction management method, device, equipment and medium for distributed storage system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117608502A (en) * 2024-01-24 2024-02-27 济南浪潮数据技术有限公司 Data reconstruction management method, device, equipment and medium for distributed storage system

Similar Documents

Publication Publication Date Title
CN108132949B (en) Data migration method and device in database cluster
CN110515539B (en) Cloud disk mounting method, device, equipment and storage medium based on cloud storage
US10817386B2 (en) Virtual machine recovery method and virtual machine management device
US11093280B2 (en) Automatic reconfiguration of high performance computing job schedulers based on user behavior, user feedback, and job performance monitoring
CN110515917B (en) Method, device and medium for controlling reconstruction speed
US8589647B2 (en) Apparatus and method for synchronizing a snapshot image
US9576061B2 (en) Information processing system and data update control method
CN115657952A (en) Method, device and medium for adjusting data reconstruction speed according to slow request
CN110764953A (en) Data recovery method, device and equipment and readable storage medium
CN111240901A (en) Node dynamic expansion system, method and equipment of distributed block storage system
JP7214287B1 (en) Resource allocation determination method, device, computing device and computer program
CN112506698A (en) Small file data reconstruction recovery method, system, terminal and storage medium
CN112905119B (en) Data write-in control method, device and equipment of distributed storage system
US20200034174A1 (en) System and method for guided system restoration
KR101984261B1 (en) Apparatus and method for dynamic frequency scaling, and recording medium
CN112204514A (en) Techniques for preserving life expectancy of non-volatile memory
CN115827322A (en) Cloud storage data full-scale disaster recovery method and system
CN109582244B (en) Metadata disk-dropping method, device, terminal and computer-readable storage medium
CN112084171A (en) Operation log writing method, device, equipment and medium based on Cassandra database
US10698862B2 (en) Enhanced snapshot performance, storage efficiency improvement, dynamic snapshot policy in erasure code supported object storage environment
CN110941591A (en) File deletion method, device and equipment and readable storage medium
CN111104220A (en) Arm architecture-based server configuration method, system and related equipment
CN104239159A (en) Virtual machine maintenance system and method
CN112118294B (en) Request processing method, device and medium based on server cluster
CN114816855A (en) HDFS system data processing method, device and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination