Method for controlling the speed of reconstruction of a storage pool and related components
By allocating bandwidth to each object in the distributed storage system and removing it after completion, the problem of uncontrollable storage pool reconstruction speed is solved, and the product's usability and reliability are improved.
Patent Information
- Application Number
- CN202211260273.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-14
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-10-14
AI Technical Summary
In distributed storage systems, existing technologies cannot effectively control the reconstruction speed of the storage pool, resulting in the reconstruction speed exceeding the set value in some scenarios, affecting the usability and reliability of the product.
By receiving object information sent by the placement group in the storage pool, bandwidth is allocated to each object based on factors such as the object's data size and the number of remaining replicas. After the allocation is completed, it is removed from the total bandwidth to ensure that the reconstruction speed is within control.
It achieves precise control over the reconstruction speed, improves the usability and reliability of the product, and enhances the competitiveness of the product.
Smart Images

Figure CN115480709B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of storage, in particular to a reconstruction speed control method of a storage pool and related components. BACKGROUND
[0002] In a distributed storage system, the content of storage is cut according to a fixed size, the data of the fixed size is called an object, a PG (Placement Group) is an aggregation of multiple objects, the PG and the object are corresponded through a consistent hashing algorithm, one PG corresponds to multiple objects, and the storage pool is an aggregation of PGs. The correspondence between each PG and an OSD (Object-based Storage Device) is corresponded through a data distribution algorithm, one PG corresponds to multiple OSDs, and the OSD can be simply understood as a physical disk, and one OSD can have multiple PGs. For a large-scale storage cluster, multiple storage pools that are mutually exclusive on the disk are generally created, different storage pools can be used for different purposes, thereby deriving the need to set different reconstruction speeds for different storage pools. In the prior art, when the storage pool triggers reconstruction, the Monitor component issues the reconstruction bandwidth of the storage pool set by the Monitor component, and the OSD performs recovery according to the received reconstruction bandwidth. When the storage pool reconstruction bandwidth is set to be small, the actual reconstruction speed of multiple PGs recovering at the same time is much greater than the set value, and the reconstruction speed cannot be controlled in some scenarios. SUMMARY
[0003] The present application aims to provide a reconstruction speed control method of a storage pool and related components, through the allocation and control of bandwidth, the reconstruction speed control can be more accurate, the problem of uncontrollable reconstruction speed is solved, the product usability and reliability are improved, and the product competitiveness is improved.
[0004] To solve the above technical problems, the present application provides a reconstruction speed control method of a storage pool, comprising:
[0005] receiving information of an object in a placement group in a storage pool, the information comprising a data size of the object;
[0006] allocating bandwidth to the object according to the information of the object according to the quota of recovering one object for one placement group;
[0007] when the bandwidth allocation to one object is completed, removing the bandwidth from the to-be-allocated bandwidth until the bandwidth allocation is completed.
[0008] Preferably, before receiving the information of the object in the placement group in the storage pool, the method further comprises:
[0009] Receiving a reconstruction bandwidth sent by the user, the reconstruction bandwidth being a bandwidth to be allocated.
[0010] Preferably, receiving information of objects sent by a placement group in the storage pool, including:
[0011] Receiving id, data size and remaining copy number of objects sent by a placement group.
[0012] Preferably, the step of allocating bandwidth to the object according to the information of the object further comprises:
[0013] Triggering a preset number of placement groups to enter a recovery state, and the remaining placement groups being in a standby recovery state;
[0014] When the number of placement groups in the recovery state is less than the preset number, triggering the placement groups in the standby recovery state to enter the recovery state;
[0015] The step of allocating bandwidth to the object according to the information of the object comprises:
[0016] The step of allocating bandwidth to the object according to the information of the object comprises:
[0017] Preferably, the step of allocating bandwidth to the object according to the information of the object comprises:
[0018] Sorting the remaining copy number of the object;
[0019] Allocating bandwidth to the object according to the order of the remaining copy number of the object from small to large.
[0020] Preferably, the step of allocating bandwidth to the object according to the information of the object comprises:
[0021] Sorting the data size of the object;
[0022] Allocating bandwidth to the object according to the order of the data size of the object from small to large or from large to small.
[0023] Preferably, the step of allocating bandwidth to the object according to the information of the object comprises:
[0024] Determining the number of objects on the OSD where the storage pool is located;
[0025] Allocating bandwidth to the OSD according to the number of objects on the OSD in proportion;
[0026] Allocating bandwidth to the object on the OSD according to the data size of the object in the OSD.
[0027] To solve the above technical problems, the application further provides a reconstruction speed control system of a storage pool, comprising:
[0028] a receiving unit configured to receive information of objects sent by a placement group in the storage pool, the information comprising data size of the objects;
[0029] an allocating unit configured to allocate bandwidth to the objects according to the information of the objects according to an amount of objects recovered by one placement group;
[0030] a removing unit configured to remove the bandwidth from bandwidth to be allocated when the bandwidth allocated to one object is completed until bandwidth allocation is completed.
[0031] To solve the above technical problems, the application further provides a host, comprising:
[0032] a memory configured to store a computer program;
[0033] a processor configured to implement the steps of the reconstruction speed control method of the storage pool when the computer program is executed.
[0034] To solve the above technical problems, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the reconstruction speed control method of the storage pool.
[0035] The application provides a reconstruction speed control method of a storage pool and related components, relates to the field of storage, and pre-receives information of objects in a placement group sent by a placement group in the storage pool; bandwidth is allocated to the objects according to the information of the objects according to an amount of objects recovered by one placement group; when the bandwidth allocated to one object is completed, the bandwidth is removed from bandwidth to be allocated until bandwidth allocation is completed. Each object is sequentially allocated bandwidth, and the bandwidth is removed from the bandwidth to be allocated after the bandwidth is allocated. Through the allocation and control of the bandwidth, the reconstruction speed can be more accurately controlled, the problem that the reconstruction speed cannot be controlled is solved, the usability and reliability of the product are improved, and the product competitiveness is improved. BRIEF DESCRIPTION OF DRAWINGS
[0036] To more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed in the prior art and the embodiments. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0037] Figure 1 A flowchart of a reconstruction speed control method of a storage pool provided by the application;
[0038] Figure 2 A bandwidth allocation diagram provided by the present application;
[0039] Figure 3 A structural diagram of a reconstruction speed control system of a storage pool provided by the present application;
[0040] Figure 4 A structural diagram of a host provided by the present application. DETAILED DESCRIPTION
[0041] The core of the present application is to provide a reconstruction speed control method of a storage pool and related components. Through the allocation control of bandwidth, the reconstruction speed control can be more accurate, the problem of uncontrollable reconstruction speed is solved, the product usability and reliability are improved, and the product competitiveness is improved.
[0042] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0043] Considering that in a distributed storage system, the content of storage is cut according to a fixed size, the data of the fixed size is called an object, a PG (Placement Group) is an aggregation of multiple objects, the PG and the object are corresponded through a consistent hash algorithm, one PG corresponds to multiple objects, and the storage pool is an aggregation of PGs. The correspondence between each PG and an OSD (Object-based Storage Device) is corresponded through a data distribution algorithm, one PG corresponds to multiple OSDs, and the OSD can be simply understood as a physical disk, and one OSD can have multiple PGs. For a large-scale storage cluster, multiple storage pools that are mutually exclusive on disks are generally created, different storage pools can be used for different purposes, thereby deriving the need to set different reconstruction speeds for different storage pools. In the prior art, when the storage pool triggers reconstruction, the Monitor component issues the reconstruction bandwidth of the storage pool set by the Monitor component, and the OSD performs recovery according to the received reconstruction bandwidth. When the storage pool reconstruction bandwidth is set to be small, the actual reconstruction speed of multiple PGs simultaneously recovered is much greater than the set value, and in some scenarios, the reconstruction speed cannot be controlled.
[0044] Figure 1 A flowchart of a reconstruction speed control method of a storage pool provided by the present application, the method comprises:
[0045] S11: receiving information of objects in a placement group sent by the placement group in the storage pool, the information including data size of the objects;
[0046] Considering that the storage pool needs to be recovered after a failure, the management module in the host needs to determine the information of the objects in the placement group before the recovery, so as to subsequently allocate bandwidth for the objects.
[0047] Specifically, the information includes the data size of the objects, and the bandwidth is allocated for the objects according to the data size of the objects, and a larger bandwidth can be allocated for an object with larger data.
[0048] S12: allocating bandwidth for the objects according to the information of the objects according to the quota of recovering one object for one placement group;
[0049] Considering that there are multiple objects in one placement group and multiple placement groups in the storage pool, if all the objects in all the placement groups in one storage pool are recovered at the same time, the reconstruction speed cannot be controlled. Therefore, the management module in the host allocates bandwidth for each object according to the quota of recovering one object for each placement group, and the number of objects recovered at the same time is determined because the number of placement groups is determined, and the bandwidth is allocated for the objects according to the information of the objects, so that the reconstruction speed can be better controlled.
[0050] S13: removing the bandwidth from the bandwidth to be allocated when the bandwidth allocated for one object is completed, until the bandwidth allocation is completed.
[0051] Since the total bandwidth to be allocated is certain, the bandwidth is removed from the bandwidth to be allocated after one bandwidth is allocated for one object, so that the reconstruction speed can be ensured to be within the control range.
[0052] Figure 2 A schematic diagram of allocating bandwidth provided by the present application is shown in the following figure:
[0053] For example, one storage pool has 50 placement groups, which are PG1.0 to PG1.49 respectively, and each placement group only recovers one object, i.e. obj, at a time. The data size of obj1 of PG1.0 is 1M, and the total bandwidth to be allocated is 100M. After the bandwidth is allocated for obj1, the bandwidth to be allocated is 99M. The objects in each placement group are sequentially allocated bandwidth, and this is applied to the last obj50 which needs 8K bandwidth, and the 100M bandwidth to be allocated is allocated.
[0054] The application provides a reconstruction speed control method of a storage pool, relates to the field of storage, and comprises the following steps: receiving information of objects in a placement group in a storage pool; allocating bandwidth to the objects according to the information of the objects and the quota of recovering one object for one placement group; and removing the bandwidth from the bandwidth to be allocated when the bandwidth allocated to one object is completed, until the bandwidth allocation is completed. The bandwidth is sequentially allocated to each object, and the bandwidth is removed from the bandwidth to be allocated after the bandwidth allocation is completed. Through the allocation control of the bandwidth, the reconstruction speed can be controlled more accurately, the problem that the reconstruction speed cannot be controlled is solved, the usability and reliability of the product are improved, and the product competitiveness is improved.
[0055] On the basis of the above embodiment:
[0056] As a preferred embodiment, before receiving the information of the objects sent by the placement group in the storage pool, the method further comprises the following steps:
[0057] Receiving the reconstruction bandwidth sent by the user, and the reconstruction bandwidth is used as the bandwidth to be allocated.
[0058] Before reconstruction, the user determines the bandwidth required in the reconstruction process, and sends the reconstruction bandwidth to the monitoring module in the host computer. The monitoring module of the host computer saves the reconstruction bandwidth and uses the reconstruction bandwidth as the bandwidth to be allocated for subsequent bandwidth allocation.
[0059] The bandwidth to be allocated is determined according to the user's demand, so that the user's demand is better met.
[0060] As a preferred embodiment, the information of the objects sent by the placement group in the storage pool comprises the following steps:
[0061] Receiving the id, data size and remaining copy number of the objects sent by the placement group.
[0062] Considering that the data size and the remaining copy number of the objects are different, the bandwidth required for recovery is different, so the object information contains the two kinds of information, so that the bandwidth can be allocated according to the information subsequently.
[0063] Specifically, the information of the objects includes but is not limited to the id, data size and remaining copy number of the objects, which can be set according to the demand, and the application does not make too many limitations here.
[0064] As a preferred embodiment, before the bandwidth is allocated to the objects according to the information of the objects and the quota of recovering one object for one placement group, the method further comprises the following steps:
[0065] Triggering a preset number of placement groups to enter a recovery state, and the remaining placement groups are used as placement groups in a standby recovery state.
[0066] When the number of the placement groups in the recovery state is less than the preset number, the placement groups in the standby recovery state are triggered to enter the recovery state.
[0067] According to the quota of the placement group, the bandwidth is allocated to the object according to the information of the object, comprising:
[0068] According to the quota of the placement group in the recovery state, the bandwidth is allocated to the object according to the information of the object.
[0069] When the storage pool triggers reconstruction due to failure, a preset number of placement groups are triggered into the recovery state at one time, and the remaining placement groups that need to be recovered are triggered into the standby recovery state; whenever there are less than the preset number of placement groups in the recovery state, the placement groups in the standby recovery state can be converted into the recovery state so that there are always the preset number of placement groups in the recovery state until the recovery is completed.
[0070] In the process of allocating bandwidth, the bandwidth is allocated to the placement group in the recovery state, and the bandwidth is temporarily allocated to the placement group in the standby recovery state; when the placement group in the standby recovery state is converted into the recovery state, the monitoring module in the host machine allocates bandwidth to an object in the placement group.
[0071] The preset value can be set according to needs, which is not limited herein.
[0072] Considering that users may have various requirements for the recovery order, the present application provides the following three methods, and the types of object information can be increased according to needs to achieve more diverse reconstruction orders.
[0073] As a preferred embodiment, the bandwidth is allocated to the object according to the information of the object, comprising:
[0074] The remaining copy number of the object is sorted;
[0075] The bandwidth is allocated to the object according to the order from small to large of the remaining copy number of the object.
[0076] Considering the safety of data, the monitoring module in the host machine arranges the remaining copy number of the object in ascending order of the number of the remaining copy number, and the object with a small remaining copy number is preferentially recovered, that is, the bandwidth is preferentially allocated to the object with a small remaining copy number, thereby ensuring the safety of data.
[0077] As a preferred embodiment, the bandwidth is allocated to the object according to the information of the object, comprising:
[0078] The data size of the object is sorted;
[0079] The bandwidth is allocated to the object according to the order from small to large or from large to small of the data size of the object.
[0080] Considering the various needs of the user, the data size of the object is sorted, and according to the needs of the user, larger objects are recovered first or smaller objects are recovered first.
[0081] The specific order can be set according to the needs of the user, and the present application does not make too many limitations here.
[0082] As a preferred embodiment, the bandwidth is allocated to the object according to the information of the object, including:
[0083] The number of objects on the OSD where the storage pool is located is determined;
[0084] According to the number of objects on the OSD, the bandwidth is allocated to the OSD in proportion;
[0085] The bandwidth is allocated to the object on the OSD according to the data size of the object in the OSD.
[0086] The monitoring module in the host counts the number of these objects to be recovered on the OSD, and then allocates bandwidth to specific objects in proportion, which can make the reconstruction pressure of the reconstruction OSD relatively balanced. For example, the bandwidth to be allocated in a period is 150M / s, there are 100 objects to be recovered on OSD.1 at this time, and there are 50 objects to be recovered on OSD.2 at this time, then the monitoring module in the host starts the recovery of the object of 100M / s bandwidth on OSD.1 in this period according to the proportion of 2:1, and allocates according to the size of the specific object, each allocation removes from the 100M / s bandwidth, repeats, until the OSD is consumed, if it cannot be consumed, it is transferred to the next OSD.
[0087] After the OSD receives the information sent by the monitoring module in the host, the process of object reconstruction is started.
[0088] Figure 3 A structural diagram of a reconstruction speed control system of a storage pool is provided for the present application, and the system comprises:
[0089] The receiving unit 31 is used for receiving the information of the object sent by the placement group in the storage pool, and the information includes the data size of the object; considering that the storage pool needs to be reconstructed and recovered after a failure, the management module in the host needs to determine the information of the object in the placement group before recovery, so as to allocate bandwidth to the object subsequently.
[0090] Specifically, the information includes the data size of the object, and the bandwidth is allocated to the object according to the data size of the object, and for the object with larger data, larger bandwidth can be allocated.
[0091] The allocation unit 32 is used for recovering one object according to the amount of one placement group, and the bandwidth is allocated to the object according to the information of the object;
[0092] Considering that there are multiple objects in one placement group and multiple placement groups in a storage pool, if all objects in all placement groups in one storage pool are simultaneously recovered, the reconstruction speed cannot be controlled. Therefore, the management module in the host allocates bandwidth for each object in each placement group, and since the number of placement groups is fixed, the number of objects simultaneously recovered is also fixed. The bandwidth is allocated to the objects according to the information of the objects, so that the reconstruction speed can be better controlled.
[0093] The removal unit 33 is configured to remove the bandwidth from the bandwidth to be allocated when the bandwidth allocation for one object is completed, until the bandwidth allocation is completed. Since the total bandwidth to be allocated is fixed, the bandwidth is removed from the bandwidth to be allocated after one object is allocated with a bandwidth, so that the reconstruction speed can be controlled within a range.
[0094] Figure 2 A schematic diagram of the bandwidth allocation provided by the application is shown in the following figure:
[0095] For example, one storage pool has 50 placement groups, which are PG1.0 to PG1.49 respectively. Each placement group only recovers one object at a time, i.e., obj. The data size of obj1 of PG1.0 is 1M, and the total bandwidth to be allocated is 100M. After the bandwidth is allocated to obj1, the bandwidth to be allocated is 99M. The objects in each placement group are sequentially allocated with bandwidth, and this is applied to the last obj50 which needs 8K bandwidth. The 100M bandwidth to be allocated is allocated.
[0096] The second receiving unit is further configured to receive the reconstruction bandwidth sent by the user, and the reconstruction bandwidth is used as the bandwidth to be allocated.
[0097] The receiving unit 31 is specifically configured to receive the id, data size and remaining copy number of the object sent by the placement group.
[0098] The triggering unit is further configured to trigger a preset number of placement groups to enter a recovery state, and the remaining placement groups are used as a state to be recovered.
[0099] When the number of placement groups in the recovery state is less than the preset number, the placement groups in the state to be recovered are triggered to enter the recovery state.
[0100] The allocation unit 32 is specifically configured to allocate bandwidth to the objects according to the amount of one object recovered by one placement group in the recovery state.
[0101] The remaining copy numbers of the objects are sorted.
[0102] The bandwidth is allocated to the objects according to the order from small to large of the remaining copy numbers of the objects.
[0103] The data sizes of the objects are sorted.
[0104] allocating bandwidth to the objects according to the data size of the objects from small to large or from large to small.
[0105] determining the number of objects on the OSD where the storage pool is located;
[0106] allocating bandwidth to the OSD in proportion according to the number of objects on the OSD;
[0107] allocating bandwidth to the objects on the OSD according to the data size of the objects in the OSD.
[0108] The reconstruction speed control system of the storage pool provided in the application is introduced in the above embodiment, and will not be repeated here.
[0109] The application provides a reconstruction speed control system of a storage pool, and relates to the field of storage.
[0110] Figure 4 The host provided by the application includes:
[0111] The memory 41 is used for storing a computer program.
[0112] The processor 42 is used for executing the computer program to realize the steps of the reconstruction speed control method of the storage pool.
[0113] Specifically, the steps of the computer program executed by the processor include:
[0114] receiving information of objects in a placement group sent by the placement group in the storage pool, the information including the data size of the objects;
[0115] allocating bandwidth to the objects according to the data size of the objects from small to large or from large to small.
[0116] removing bandwidth from the bandwidth to be allocated when the bandwidth allocated to one object is completed, until the bandwidth allocation is completed.
[0117] Before receiving the information of the objects in the placement group sent by the placement group in the storage pool, the method further includes:
[0118] Receiving the reconstruction bandwidth sent by the user, the reconstruction bandwidth being the bandwidth to be allocated.
[0119] Receiving information of the object sent by the placement group in the storage pool, including:
[0120] Receiving the id, data size and remaining copy number of the object sent by the placement group.
[0121] According to the quota of one placement group for recovering one object, the bandwidth is allocated to the object according to the information of the object, and before the bandwidth is allocated to the object according to the information of the object, the method further comprises:
[0122] Triggering a preset number of placement groups to enter the recovery state, and the remaining placement groups are in the standby recovery state;
[0123] When the number of the placement groups in the recovery state is less than the preset number, triggering the placement groups in the standby recovery state to enter the recovery state;
[0124] According to the quota of one placement group for recovering one object, the bandwidth is allocated to the object according to the information of the object, and before the bandwidth is allocated to the object according to the information of the object, the method further comprises:
[0125] According to the quota of one placement group in the recovery state for recovering one object, the bandwidth is allocated to the object according to the information of the object.
[0126] The bandwidth is allocated to the object according to the information of the object, and the method comprises:
[0127] The remaining copy number of the object is sorted;
[0128] The bandwidth is allocated to the object according to the order of the remaining copy number of the object from small to large.
[0129] The bandwidth is allocated to the object according to the information of the object, and the method comprises:
[0130] The data size of the object is sorted;
[0131] The bandwidth is allocated to the object according to the order of the data size of the object from small to large or from large to small.
[0132] The bandwidth is allocated to the object according to the information of the object, and the method comprises:
[0133] Determining the number of objects on the OSD where the storage pool is located;
[0134] According to the number of objects on the OSD, the bandwidth is allocated to the OSD in proportion;
[0135] The bandwidth is allocated to the object on the OSD according to the data size of the object in the OSD.
[0136] The host provided in the application is introduced as described in the above embodiments, which will not be repeated here.
[0137] The application provides a host, relates to the storage field, and pre-receives information of objects in a placement group sent by a placement group in a storage pool; bandwidth is allocated to the objects according to the information of the objects according to the quota of recovering one object for one placement group; when the bandwidth allocation for one object is completed, the bandwidth is removed from the bandwidth to be allocated until the bandwidth allocation is completed. The bandwidth is sequentially allocated to each object, and the bandwidth is removed from the bandwidth to be allocated after the bandwidth allocation is completed. Through the bandwidth allocation control, the reconstruction speed control can be more accurate, the problem that the reconstruction speed cannot be controlled is solved, the product usability and reliability are improved, and the product competitiveness is improved.
[0138] The application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program.
[0139] Specifically, the steps of the computer program executed by the processor include:
[0140] The information of the objects in the placement group sent by the placement group in the storage pool is received, and the information includes the data size of the objects;
[0141] The bandwidth is allocated to the objects according to the information of the objects according to the quota of recovering one object for one placement group;
[0142] When the bandwidth allocation for one object is completed, the bandwidth is removed from the bandwidth to be allocated until the bandwidth allocation is completed.
[0143] Before the information of the objects sent by the placement group in the storage pool is received, the method further includes:
[0144] The reconstruction bandwidth sent by the user is received, and the reconstruction bandwidth is used as the bandwidth to be allocated.
[0145] The information of the objects sent by the placement group in the storage pool includes:
[0146] The id, the data size and the remaining copy number of the objects sent by the placement group are received.
[0147] Before the bandwidth is allocated to the objects according to the information of the objects according to the quota of recovering one object for one placement group, the method further includes:
[0148] The preset number of placement groups are triggered to enter the recovery state, and the remaining placement groups are used as the placement groups in the to-be-recovered state;
[0149] When the number of the placement groups in the recovery state is less than the preset number, the placement groups in the to-be-recovered state are triggered to enter the recovery state;
[0150] The bandwidth is allocated to the objects according to the information of the objects according to the quota of recovering one object for one placement group, and the method includes:
[0151] According to the information of the object, bandwidth is allocated to the object.
[0152] According to the information of the object, bandwidth is allocated to the object, including:
[0153] The remaining copy number of the object is sorted;
[0154] According to the remaining copy number of the object, bandwidth is allocated to the object from small to large.
[0155] According to the information of the object, bandwidth is allocated to the object, including:
[0156] The data size of the object is sorted;
[0157] According to the data size of the object, bandwidth is allocated to the object from small to large or from large to small.
[0158] According to the information of the object, bandwidth is allocated to the object, including:
[0159] The number of objects on the OSD where the storage pool is located is determined;
[0160] According to the number of objects on the OSD, bandwidth is allocated to the OSD in proportion;
[0161] According to the data size of the object in the OSD, bandwidth is allocated to the object on the OSD.
[0162] The computer readable storage medium provided in the application is introduced in the above-mentioned embodiments, and will not be repeated here.
[0163] The application provides a computer readable storage medium, relates to the field of storage, and pre-receives information of an object in a placement group sent by a placement group in a storage pool; according to the amount of an object recovered for one placement group, bandwidth is allocated to the object according to the information of the object; when the bandwidth allocated to one object is completed, the bandwidth is removed from the bandwidth to be allocated until the bandwidth allocation is completed. Each object is sequentially allocated bandwidth, and the bandwidth is removed from the bandwidth to be allocated after the bandwidth allocation is completed. Through the allocation and control of bandwidth, the reconstruction speed can be more accurately controlled, the problem that the reconstruction speed cannot be controlled is solved, the product usability and reliability are improved, and the product competitiveness is improved.
[0164] It is also important to note that the use of relational terms such as first and second, and the like, are used solely to distinguish one from another entity or action without necessarily requiring or implying any actual relationship or order between or among such entities or actions. Moreover, 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 can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0165] Those skilled in the art will further appreciate that the units and algorithms described in connection with the examples disclosed herein can be embodied directly in hardware, in software, or in a combination of the two. For the sake of brevity, descriptions of these conventional implementations can be omitted. In the description above, various features of the application are described as if specific characteristics were being combined to produce a desired result. One skilled in the art will understand, however, that these specific characteristics need not all be combined to produce the desired result. In addition, one skilled in the art will appreciate that each feature can be implemented in a different embodiment and that such features can be implemented in a different embodiment.
[0166] The above description of disclosed embodiments provides examples, and is not intended to be limiting. Numerous variations, additions, omissions and other modifications not specifically described can be made in the practice of this application. Consequently, the application is not limited by the examples described above, which are presented for purposes of illustration only.
Claims
1. A method for controlling the reconstruction speed of a storage pool, characterized in that: include: receiving information about objects in the placement group sent by a placement group in a storage pool, the information including data size of the objects; Allocating bandwidth to the object based on information about the object according to a quota for recovering one object for one placement group; When bandwidth allocation for one of the objects is completed, removing the bandwidth from the bandwidth to be allocated until bandwidth allocation is completed; Before restoring the quota of one object according to one placement group and allocating bandwidth to the object according to the object information, the method further includes: Trigger the preset placement groups to enter the recovery state, and the remaining placement groups are in the pending recovery state; When the number of placement groups entering the recovery state is less than a preset number, triggering the placement groups in the pending recovery state to enter the recovery state; Restoring a quota of the object according to the placement group and allocating bandwidth to the object according to information of the object includes: A quota of the object is restored according to the placement group in the recovery state, and bandwidth is allocated to the object according to information of the object.
2. The method for controlling the reconstruction speed of a storage pool according to claim 1, wherein: Before receiving information about objects sent by a placement group in a storage pool, the following also occurs: The reconstructed bandwidth sent by the user is received, and the reconstructed bandwidth is used as the bandwidth to be allocated.
3. The method for controlling the reconstruction speed of a storage pool according to claim 1, wherein: Receives information about objects sent by placement groups in the storage pool, including: Receive the object ID, data size, and number of remaining replicas sent by the placement group.
4. The method for controlling the reconstruction speed of a storage pool according to any one of claims 1 to 3, wherein: Allocating bandwidth to the object according to the information of the object includes: sorting the number of remaining copies of the object; Bandwidth is allocated to the objects in ascending order of the number of remaining copies of the objects.
5. The method for controlling the reconstruction speed of a storage pool according to any one of claims 1 to 3, wherein: Allocating bandwidth to the object according to the information of the object includes: sorting the objects by data size; Bandwidth is allocated to the objects according to the order of data size from small to large or from large to small.
6. The method for controlling the reconstruction speed of a storage pool according to any one of claims 1 to 3, wherein: Allocating bandwidth to the object according to the information of the object includes: Determine the number of objects on the OSD where the storage pool resides; Allocate bandwidth to the OSD in proportion to the number of objects on the OSD; Bandwidth is allocated to objects on the OSD according to data size of the objects in the OSD.
7. A storage pool reconstruction speed control system, characterized in that: include: A receiving unit, configured to receive information about an object sent by a placement group in a storage pool, the information including the data size of the object; an allocating unit, configured to recover a quota of the object according to the placement group and allocate bandwidth to the object according to information of the object; a removing unit, configured to remove the bandwidth from the bandwidth to be allocated when bandwidth allocation for one of the objects is completed, until bandwidth allocation is completed; Also includes: A triggering unit, configured to trigger a preset number of placement groups to enter a recovery state, and the remaining placement groups to enter a pending recovery state; When the number of placement groups entering the recovery state is less than a preset number, triggering the placement groups in the pending recovery state to enter the recovery state; The allocation unit is specifically configured to restore a quota of the object according to the placement group in the recovery state, and allocate bandwidth to the object according to the object information.
8. A host, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for controlling the reconstruction speed of a storage pool according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for controlling the reconstruction speed of a storage pool according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and device for controlling reconstruction speed and medium
CN110515917A
Distributed file system data reconstruction method, system, equipment and medium
CN114168556A