Method for managing storage pool space and electronic device
Patent Information
- Application Number
- CN202611544248.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-03
AI Technical Summary
In existing storage pool space management, the space utilization rate is low because different types of space are pre-divided into relatively independent areas and the occupancy ratio is fixed.
By acquiring the segment usage data of each working controller, the predicted number of free segments of each type in the storage system within a future preset time period is determined. In response to the predicted number of free segments being less than a threshold, the target segment type is determined, and the target allocation strategy is determined based on the free storage blocks and segment usage data in the storage pool, and segments of the target segment type are dynamically allocated.
It enables dynamic replenishment of sections with insufficient reserves, reduces space waste, improves space utilization, and meets the differentiated needs of different data types for space types.
Smart Images

Figure CN123030140A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of storage systems, and particularly relates to a management method of storage pool space and an electronic device. BACKGROUND
[0002] With the rapid development of storage technology, the data read and write and landing write requirements of all-flash storage systems continue to increase, and the space allocation and scheduling capabilities of the storage pool directly determine the operation efficiency and space utilization of the storage system. Different types of data have different redundancy levels and performance requirements for storage space. At present, for the space management of the storage pool, a relatively independent different type of space is usually pre-divided, and each type of space occupies a certain proportion, thereby resulting in low space utilization. SUMMARY
[0003] The present application provides a management method of storage pool space and an electronic device to at least solve the problem of low space utilization caused by pre-dividing a relatively independent different type of space and each type of space occupying a certain proportion in the related art.
[0004] In a first aspect, the present application provides a management method of storage pool space, which is applied to a management controller in a storage system, the storage system comprising the management controller and a plurality of working controllers, and different types of segments are respectively allocated on the plurality of working controllers, and the method comprises:
[0005] obtaining segment usage data of each working controller, wherein the segment usage data of the working controller comprises the idle number of each type of segment in the working controller;
[0006] processing the segment usage data of each working controller to determine the predicted idle number of each type of segment in the storage system within a future preset time period;
[0007] in response to the predicted idle number of at least one type of segment being less than a preset idle threshold, determining the type corresponding to the minimum value of each predicted idle number as a target segment type;
[0008] determining a target allocation strategy of the target segment type based on the number of idle storage blocks in the storage pool and the segment usage data of each working controller;
[0009] allocating segments of the target segment type by using the target allocation strategy.
[0010] In a second aspect, the present application further provides a management device of storage pool space, which is located in a management controller in a storage system and comprises:
[0011] acquire the segment usage data of each working controller, wherein the segment usage data of the working controller comprises the idle number of each type of segment in the working controller;
[0012] determine the predicted idle number of each type of segment in the storage system in a future preset time period by aggregating the segment usage data of each working controller;
[0013] The determining module is further configured to determine the type corresponding to the minimum value of the predicted idle numbers as the target segment type in response to the predicted idle number of at least one type of segment being less than the preset idle threshold;
[0014] The determining module is further configured to determine the target allocation strategy of the target segment type based on the number of idle storage blocks in the storage pool and the segment usage data of each working controller.
[0015] The allocation module is configured to allocate the segments of the target segment type by using the target allocation strategy.
[0016] In a third aspect, the present application further provides an electronic device, comprising a memory configured to store a computer program, and a processor configured to execute the computer program to implement the steps of the management method of the storage pool space provided in the first aspect.
[0017] In a fourth aspect, the present 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 management method of the storage pool space provided in the first aspect.
[0018] In a fifth aspect, the present application further provides a computer program product comprising a computer program, and the computer program is executed by a processor to implement the steps of the management method of the storage pool space provided in the first aspect.
[0019] The storage pool space management method and electronic device provided in this application, upon obtaining the segment usage data of each working controller in the storage system, aggregates and processes the segment usage data of each working controller to determine the predicted number of free segments of each type in the storage system within a future preset time period. The segment usage data of a working controller includes the number of free segments of each type within that working controller. The predicted number of free segments includes the expected remaining number of free segments of each type within the future preset time period. Furthermore, in response to a situation where the predicted number of free segments of at least one type is less than a preset free threshold, the type corresponding to the minimum predicted number of free segments is determined as the target segment type. A target allocation strategy is determined based on the number of free storage blocks in the storage pool and the segment usage data of each working controller. The target allocation strategy is then used to allocate segments of the target segment type, thereby achieving dynamic replenishment of segments of insufficient reserves. Compared to pre-allocating a fixed proportion of space, predicting and dynamically allocating based on actual usage data can promptly replenish the required types of segments, precisely limiting the scope of space allocation to the actually scarce segment types, reducing space waste, ensuring the differentiated needs of different data types for space types, and improving space utilization. Attached Figure Description
[0020] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 An application scenario diagram of the storage pool space management method provided in the embodiments of this application;
[0022] Figure 2 A schematic flowchart illustrating a method for managing storage pool space according to an embodiment of this application;
[0023] Figure 3 A flowchart illustrating a method for managing storage pool space according to another embodiment of this application;
[0024] Figure 4 A schematic diagram of the structure of a storage pool space management device provided in an embodiment of this application;
[0025] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0027] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0028] With the rapid development of storage technology, the demand for data read / write and persistence in all-flash storage systems continues to increase. The space allocation and scheduling capabilities of the storage pool directly determine the operating efficiency and space utilization of the storage system. Different types of data have different redundancy levels and performance requirements for storage space. Currently, the space management of the storage pool usually involves pre-dividing relatively independent spaces of different types, with each type occupying a fixed proportion, resulting in low space utilization.
[0029] Therefore, when facing the aforementioned technical problems, instead of pre-dividing relatively independent spaces of different types and fixing the occupancy ratio to determine the allocation of each type of space, the method of obtaining the segment usage data of each working controller in the storage system is adopted. This data is then aggregated to determine the predicted number of free segments of each type in the storage system within a future preset time period. The segment usage data of a working controller includes the number of free segments of each type within that working controller. The predicted number of free segments includes the expected remaining number of free segments of each type within the future preset time period. Furthermore, in response to a situation where the predicted number of free segments of at least one type is less than a preset free threshold, the type corresponding to the minimum predicted number of free segments is determined as the target segment type. Based on the number of free storage blocks in the storage pool and the segment usage data of each working controller, a target allocation strategy is determined, and segments of the target segment type are allocated using this strategy. This achieves dynamic replenishment of segments of insufficient reserves. Compared to pre-allocating a fixed proportion of space, predicting and dynamically allocating based on actual usage data can promptly replenish the required types of segments, precisely limiting the scope of space allocation to the actually scarce segment types, reducing space waste, ensuring the differentiated needs of different data types for space types, and improving space utilization.
[0030] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0031] Figure 1 This diagram illustrates an application scenario for the storage pool space management method provided in this embodiment of the application. For example... Figure 1 As shown, the application scenario provided in this embodiment includes: a storage system 10, a management controller 20, and a work controller 30. The storage pool space management method is applied to the management controller 20. The storage system 10 includes a management controller 20 and work controllers 30. There can be multiple work controllers 30. Both the management controller 20 and the work controllers 30 are controllers within the storage system 10. The management controller 20 is a controller determined from among the multiple controllers included in the storage system 10. Specifically, the segment usage data of each work controller 30 is obtained, and the segment usage data of each work controller 30 is aggregated to determine the predicted number of free segments of each type in the storage system 10 within a future preset time period. The segment usage data of the work controller 30 includes the number of free segments of each type within that work controller 30. In response to the presence of a predicted free number of at least one type of segment that is less than a preset free threshold, the management controller 20 determines the type corresponding to the minimum value among the predicted free numbers as the target segment type. Based on the number of free storage blocks in the storage pool and the segment usage data of each working controller 30, a target allocation strategy for the target segment type is determined. Furthermore, the management controller 20 uses the target allocation strategy to allocate segments of the target segment type.
[0032] Figure 2 A flowchart illustrating a storage pool space management method provided in an embodiment of this application is shown below. Figure 2 As shown. The storage pool space management method provided in this embodiment is applied to the management controller in a storage system. The storage pool space management method provided in this embodiment specifically includes the following steps:
[0033] S201: Obtain the segment usage data of each working controller.
[0034] The storage system includes a management controller and multiple working controllers, each with different types of segments.
[0035] The segment usage data for the work controller includes the number of idle segments of each type within that work controller. The number of idle segments refers to the number of segments of the corresponding type in the work controller that are not yet used and are available for allocation.
[0036] Understandably, the type segments included in each job controller may differ.
[0037] A storage block is the smallest unit of physical disk space in a storage pool. Multiple storage blocks can be assembled into different types of segments.
[0038] In this context, a segment refers to the basic unit for space allocation in a storage pool. It is assembled from storage blocks in the storage pool according to different redundancy levels. Different types of segments have different data protection capabilities, such as Level 0 segments of Redundant Array of Independent Disks (RAID), Level 5 / 6 segments of RAID, and multi-replica segments.
[0039] Here, "type" refers to the type of the segment.
[0040] Different types of segments correspond to different levels of data redundancy and performance characteristics.
[0041] Among them, the usage data for each type of segment refers to the usage data corresponding to each type of segment.
[0042] Optionally, in this embodiment, the storage system includes multiple controllers, each of which is a hardware device with independent computing and storage access capabilities.
[0043] The management controller is a controller selected from multiple controllers according to a preset selection strategy.
[0044] The controller selected as the management controller is still a complete controller hardware unit. However, the controller can be divided into a management control part that undertakes space scheduling and management functions and a work control part that undertakes data read and write operations. The memory and storage space of the two parts are independent of each other to avoid interference between management operations and business read and write operations.
[0045] Optionally, the default selection strategy is pre-set.
[0046] For example, the preset selection strategy can pre-specify any controller as the management controller.
[0047] For example, the preset selection strategy can also be to pre-set the identification information corresponding to the management controller based on the controller's identification information.
[0048] It's important to note that the management controller doesn't necessarily only perform management functions. The management controller can also handle the business processing responsibilities of the worker controllers; in this case, the segment usage data generated by its own data read / write operations is also acquired as part of the usage data for each worker controller. Alternatively, the management controller can perform only management functions, while other worker controllers in the storage system handle all data read / write operations. Both methods can be selected based on system configuration, and if the management controller fails, a new management controller can be elected from the remaining controllers.
[0049] Understandably, each controller in a storage system can have the ability to manage storage pool space, but this is only used when the controller is designated as the management controller.
[0050] Optionally, in this embodiment, when the management controller only manages the storage pool space and does not undertake the work control part of data read / write operations, the usage data of the work control part in the management controller is not included when acquiring the usage data of each type of segment in each work controller. When the management controller manages the storage pool space while undertaking the business processing responsibilities of the work controller, the segment usage data generated by its own data read / write operations is also acquired as part of the usage data of "each work controller".
[0051] Optionally, in this embodiment, the management controller receives the segment usage data periodically reported by each working controller. The segment usage data is generated by each working controller based on the usage of its local segments of various types.
[0052] Optionally, in this embodiment, each working controller reports the currently determined segment usage data according to a preset reporting cycle.
[0053] Optionally, the preset reporting period is pre-set.
[0054] For example, the preset reporting cycle can be one report every 5 seconds.
[0055] Optionally, the management controller executes the storage pool space management process according to a preset scheduling cycle. In each scheduling cycle, the management controller obtains the most recently reported segment usage data of each type from each working controller, and performs subsequent predictions and judgments based on the segment usage data.
[0056] Optionally, the preset scheduling cycle and the reporting cycle for the data used by the work controller can be the same or different.
[0057] S202: Summarize and process the segment usage data of each working controller to determine the predicted number of free segments of each type in the storage system within a future preset time period.
[0058] The predicted free quantity refers to the number of free segments of each type in the storage system expected to remain at the end of a preset time period in the future.
[0059] The future preset time period is a pre-defined time interval used to characterize the time range for predicting the number of idle spaces in a segment.
[0060] Optionally, the segment usage data may also include the consumption rate and consumption change rate of each type of segment in each work controller.
[0061] Optionally, in this embodiment, based on the segment usage data reported by each working controller in the storage system, the expected consumption of each type of segment in each working controller within a future preset time period is calculated, and the expected consumption of the same type of segments in each working controller is summarized. Combined with the current idle quantity of each type of segment in each controller, the predicted idle quantity of each type of segment in the storage system within a future preset time period is determined.
[0062] S203: In response to the existence of a segment with at least one type having a predicted number of free spaces less than a preset free space threshold, the type corresponding to the minimum value among the predicted free spaces is determined as the target segment type.
[0063] The preset idle threshold is the minimum number of idle spaces required to determine whether a segment is in short supply. When the predicted number of idle spaces for a certain type of segment is lower than this threshold, it indicates that the segment of that type may experience a shortage in the future within a preset time period.
[0064] Optionally, the preset idle threshold is pre-set.
[0065] Among them, the target segment type refers to the type whose predicted idle quantity is less than the preset idle threshold and is the minimum value, which is determined as the target segment type based on the predicted idle quantity of each type of segment. That is, the type that is currently the most scarce and needs to be replenished first.
[0066] If the predicted number of free segments of each type included in the storage system is greater than or equal to the preset free threshold, it means that there are no segments with insufficient reserves in the preset time period in the future, and the subsequent steps such as determining the target segment type can be skipped.
[0067] Optionally, in this embodiment, if it is determined that the predicted number of free segments for all types is not less than a preset free threshold, then it is determined that the current storage pool has sufficient reserves of each type of segment. In this scheduling cycle, the determination of the target segment type, the determination of the target allocation strategy, and the allocation operation of the segment corresponding to the target segment type are not performed. The management controller continues to wait for the next scheduling cycle and re-acquires usage data and performs the judgment in the next scheduling cycle.
[0068] Optionally, in this embodiment, the predicted number of free spaces for each type of segment is compared with a preset free space threshold. If the predicted number of free spaces for at least one type of segment is less than the preset free space threshold, the type corresponding to the minimum value among the predicted free spaces is determined and used as the target segment type, that is, the type of the segment that is currently the most scarce and most in need of replenishment.
[0069] Optionally, if multiple types of segments have the same predicted number of idle spaces and are all at the minimum value, one of the types can be selected as the target segment type according to a preset priority.
[0070] Optionally, the default priority is preset.
[0071] S204: Determine the target allocation strategy for the target segment type based on the number of free storage blocks in the storage pool and the segment usage data of each working controller.
[0072] Among them, the target allocation strategy refers to the resource scheduling method used to allocate target segment types.
[0073] Optionally, in this embodiment, based on the number of free storage blocks in the storage pool and the number of free segments of each type in each work controller, an optimal strategy is selected from multiple candidate allocation strategies as the target allocation strategy to supplement the segments corresponding to the target segment type.
[0074] Optionally, candidate allocation strategies include, but are not limited to, directly assembling based on free storage blocks in the storage pool, splitting and recombining other types of segments, reclaiming free segments corresponding to the target segment type from the work controller, and redistributing them.
[0075] S205: The target segment type is obtained by using the target allocation strategy.
[0076] Among them, the segment corresponding to the target segment type refers to the specific segment that belongs to the target segment type.
[0077] Optionally, in this embodiment, the corresponding allocation operation is performed according to the determined target allocation strategy to obtain the segment corresponding to the target segment type.
[0078] Optionally, in this embodiment, after allocating the segment corresponding to the target segment type, the allocated segment can be included in the global segment resource mapping table maintained by the management controller, and its logical affiliation and availability status can be uniformly maintained by the management controller. When a segment acquisition request is received from a working controller, the management controller schedules the segment corresponding to the target segment type to the corresponding working controller by issuing a space allocation instruction. After receiving the instruction, the working controller performs segment mounting and service binding in its local logical view.
[0079] Optionally, the segment acquisition request may include the number of segments required.
[0080] When the management controller manages the storage pool space, the segments corresponding to the target segment type obtained by the target allocation strategy can be stored in the memory space associated with the management controller or in the segment resource pool managed by it, so that they can be subsequently allocated to the work controllers that need segments of that type.
[0081] Optionally, the allocation method varies depending on the target allocation strategy. Allocation can be implemented by directly assembling free storage blocks in the storage pool into new free segments corresponding to the target segment type, based on the redundancy level corresponding to the target segment type. Alternatively, free segments can be selected from segments of other types besides the target segment type, split, and then reassembled using the resulting storage blocks into new free segments corresponding to the target segment type. Another approach is to reclaim at least one free segment corresponding to the target segment type from work controllers with a large number of free segments of that type, and then redistribute the reclaimed segment, allowing free segments originally scattered across individual work controllers to be used by other work controllers.
[0082] It is understandable that allocation is not limited to creating new segment instances from scratch, but also includes replenishing the segments corresponding to the target segment type on the required work controllers through recycling and redistribution.
[0083] Specifically, by using segment usage data from each work controller in the storage system, the predicted number of free segments of various types in the storage system within a preset future time period is determined. Therefore, the usage status of segments can be quantified into a prediction of future free space, providing a basis for subsequent determination of whether there is a shortage of segment types. Furthermore, when the predicted free space is less than a preset free space threshold, a target segment type is determined. Based on the number of free storage blocks in the storage pool and the number of free segments of each type in each work controller, a target allocation strategy is determined, and the target allocation strategy is used to allocate segments corresponding to the target segment type, thereby achieving dynamic replenishment of insufficiently reserved segments. Compared to pre-allocating a fixed proportion of space, by using prediction based on actual usage data and a dynamic allocation strategy, the required type of segments can be replenished in a timely manner, precisely limiting the space scheduling range to the actually scarce segment types, reducing space waste, and ensuring the differentiated needs of different data types for space types and the efficiency of space resource utilization, thus improving the flexibility and space utilization of storage pool space management.
[0084] As an optional implementation, based on the above embodiment, the segment usage data of each working controller is aggregated and processed to determine the predicted number of free segments of each type in the storage system within a future preset time period, including:
[0085] Add up the number of available slots of the same type in the work controller to obtain the target number of available slots for that type.
[0086] Based on the consumption rate and consumption change rate of any type of segment in the work controller, determine the predicted consumption quantity of that type of segment in the work controller within a future preset time period.
[0087] The predicted consumption quantities of the same type of segment in the storage system are summed in each working controller to obtain the target predicted quantity of each type of segment in the storage system.
[0088] The target number of free segments of any type is subtracted from the target predicted number of free segments of that type to obtain the predicted number of free segments of each type in the storage system within a future preset time period.
[0089] The segment usage data of the work controller also includes the consumption rate and consumption change rate corresponding to each type of segment in the work controller.
[0090] The consumption rate refers to the number of segments of the corresponding type consumed per unit time, which is used to characterize how fast or slow the segments are used.
[0091] Among them, the consumption change rate refers to the value obtained by weighted averaging the difference in consumption between adjacent sampling periods within multiple sampling periods. It is used to characterize the consumption trend of the corresponding type of segment, that is, whether the consumption is gradually increasing, basically stable, or gradually decreasing.
[0092] Optionally, the number of segments consumed within a preset sampling period is counted, and the consumption number is divided by the sampling period duration to obtain the average consumption rate within that sampling period. To reduce the impact of instantaneous fluctuations, a moving average of the consumption rates over the most recent multiple sampling periods can be performed, and the average value can be used as the current consumption rate.
[0093] Optionally, the preset sampling period is pre-set.
[0094] For example, the preset sampling period is 3 seconds, etc.
[0095] Optionally, the consumption amount in each of the most recent multiple sampling periods can be obtained first, the difference in consumption amount between adjacent sampling periods can be calculated as the change amount, and then these changes can be weighted and averaged to obtain the consumption change rate.
[0096] For example, the consumption of a certain type of segment is continuously acquired over multiple sampling periods. For two adjacent sampling periods, the consumption of the later period is subtracted from the consumption of the earlier period to obtain the consumption change value Q between the two periods. For example, the consumption of the first period is... The consumption in the second cycle is Then the change value Q= - Select the most recent multiple change values Q, and arrange them from most recent to oldest in time as follows: , , ..., ), and obtain the weights set for each changing value ( , , ..., ).
[0097] The formula for the rate of change in consumption is shown below:
[0098]
[0099] in, This represents the rate of change in consumption. N is the number of differences in consumption. This represents the difference in consumption between adjacent sampling periods of the i-th period. The difference in consumption for the i-th time The corresponding weighting coefficients.
[0100] A positive change in consumption indicates an increase in consumption, while a negative change in consumption indicates a decrease in consumption.
[0101] Optionally, the weighting coefficients corresponding to the consumption differences are preset. The closer the period is to the current time, the higher the weighting coefficient corresponding to the consumption difference.
[0102] Optionally, in this embodiment, for each type of segment existing in the storage system, the number of free segments of that type included in each working controller of the storage system is summed to obtain the current total number of free segments of that type in the entire storage system, which is used as the target number of free segments corresponding to that type.
[0103] Then, for any type of segment within a single work controller, the consumption rate of that segment type is multiplied by the duration corresponding to a future preset time period. This product is then corrected by incorporating the consumption trend reflected by the consumption change rate of that segment type, thus obtaining the predicted consumption quantity of that type of segment within the work controller during the future preset time period. This predicted consumption quantity represents the number of that type of segment within the work controller expected to be used during the future preset time period, taking into account changes in consumption trends. Further, corresponding calculations are performed for each work controller in the storage system to obtain the predicted consumption quantity of each type of segment within each work controller in the storage system during the future preset time period.
[0104] Furthermore, after obtaining the predicted consumption quantity of each type of segment in each work controller, for each segment type existing in the storage system, the predicted consumption quantities of that type of segment in each work controller of the storage system are summed to obtain the total expected consumption quantity of that type of segment in the entire storage system within a future preset time period, which is used as the target predicted quantity for that type of segment. For each segment type existing in the storage system, the target free quantity corresponding to that type of segment is subtracted from the target predicted quantity corresponding to that type of segment to obtain the predicted free quantity of that type of segment in the entire storage system at the end of the future preset time period. This predicted free quantity is used to subsequently determine whether there is a shortage of reserves.
[0105] For example, for a Level 5 Independent Redundancy Array (IRA) segment, the predicted consumption of the Level 5 IRA segment in multiple working controllers is added together to obtain the target predicted quantity corresponding to the Level 5 IRA segment.
[0106] Optionally, the product can be corrected based on the consumption change rate of each type of segment in each work controller. This can be achieved by replacing the consumption change rate with the corresponding value according to the magnitude of the consumption change rate, and then multiplying it with the corresponding product.
[0107] Specifically, the target free quantity of each type of segment is obtained by summing the free quantity of the same type of segment in each working controller of the storage system, and the target predicted quantity of each type of segment is obtained by summing the predicted consumption quantity of the same type of segment in each working controller. Then, the predicted free quantity of each type of segment at the end of the future preset time period is obtained by subtracting the target free quantity from the target predicted quantity. This can more accurately reflect the change in the free quantity of each type of segment in the entire storage pool under the current usage trend in the future preset time period, and provide a basis for the subsequent determination of the target segment type.
[0108] As an optional implementation, based on any of the above embodiments, the predicted consumption quantity of that type of segment in the work controller is determined within a future preset time period based on the consumption rate and consumption change rate of any type of segment in the work controller, including:
[0109] For any type of segment in the work controller, the prediction coefficient of that type of segment is determined based on the consumption change rate of that segment;
[0110] The predicted consumption quantity of this type of segment within the future preset time period is obtained by multiplying the duration corresponding to the preset time period, the consumption rate of this type of segment, and the prediction coefficient.
[0111] The prediction coefficient is pre-set and determined by the rate of change in consumption.
[0112] Optionally, when the rate of change in consumption is positive, it indicates that consumption in this type of segment is accelerating, and the prediction coefficient can be greater than 1. When the rate of change in consumption is negative, it indicates that consumption is slowing down, and the prediction coefficient can be less than 1. When the rate of change in consumption is zero, the prediction coefficient can be equal to 1.
[0113] For example, the correspondence between the consumption change rate and the prediction coefficient can be preset, and the corresponding prediction coefficient can be determined based on the actual calculated consumption change rate.
[0114] For example, the prediction coefficient is 1.1 when the rate of change in consumption is positive. The prediction coefficient is 1 when the rate of change in consumption is zero. The prediction coefficient is 0.9 when the rate of change in consumption is negative.
[0115] The corresponding value of the prediction coefficient is determined by whether the rate of change in consumption is positive, negative, or zero.
[0116] Optionally, in this embodiment, for any type of segment in the work controller, the prediction coefficient corresponding to that type of segment is determined based on the consumption change rate of that type of segment. Similarly, each work controller in the storage system uses the same method to determine the prediction coefficient for its corresponding type of segment.
[0117] Specifically, for any type of segment in the work controller, the predicted consumption quantity corresponding to that type of segment is calculated. The calculation formula can be: Predicted consumption quantity = Duration of the future preset time period × Consumption rate of that type of segment × Prediction coefficient of that type of segment.
[0118] Understandably, each work controller in the storage system uses the same method to determine the predicted consumption of the corresponding type of segment.
[0119] Specifically, by determining the corresponding prediction coefficient based on the consumption change rate, and multiplying the duration, consumption rate, and prediction coefficient of the future preset time period, it is possible to more accurately predict the consumption quantity of each type of segment in each work controller within the future preset time period, thereby enhancing the rationality and effectiveness of storage pool space scheduling.
[0120] As an optional implementation, based on any of the above embodiments, before determining the target allocation strategy for the target segment type based on the number of free storage blocks in the storage pool and the segment usage data of each working controller, the method further includes:
[0121] Determine whether the number of free storage blocks in the storage pool is greater than the first preset storage block threshold;
[0122] If the number of free storage blocks in the storage pool is greater than the first preset storage block threshold, then the target allocation strategy for the target segment type is determined to be the first allocation strategy.
[0123] The target allocation strategy includes any one of the first allocation strategy, the second allocation strategy, and the third allocation strategy.
[0124] The first allocation strategy is an allocation strategy that creates a segment corresponding to the target segment type based on the storage blocks in the storage pool. That is, a certain number of storage blocks are selected from the free storage blocks in the storage pool and assembled according to the redundancy level required by the target segment type to obtain a new segment corresponding to the target segment type.
[0125] The second allocation strategy involves splitting segments of types other than the target segment type to create an allocation strategy for segments corresponding to the target segment type. This means splitting other types of free segments into storage blocks and then reassembling them according to the redundancy level of the target segment type.
[0126] The third allocation strategy is to reallocate the segments corresponding to the idle target segment types in the work controller. That is, to reclaim some of the idle target segment types from the work controllers with a large number of idle target segment types and then reallocate them to the work controllers with a gap in target segment types.
[0127] Optionally, the first preset storage block threshold is preset.
[0128] When the number of free storage blocks in the storage pool is greater than the first preset storage block threshold, it indicates that there are enough free storage blocks in the storage pool that can be directly used to assemble new segments. The first allocation strategy can quickly allocate segments corresponding to the target segment type with low overhead. Therefore, the first allocation strategy is preferred to quickly supplement segments of the target segment type.
[0129] Optionally, in this embodiment, the number of free storage blocks in the storage pool is compared with a first preset storage block threshold to determine whether the number of free storage blocks in the storage pool is greater than the first preset storage block threshold. If it is determined that the number of free storage blocks in the storage pool is greater than the first preset storage block threshold, the first allocation strategy is directly determined as the target allocation strategy, without needing to perform subsequent evaluation value calculation and comparison processes.
[0130] Specifically, before determining the target allocation strategy, it is first determined whether the number of free storage blocks in the storage pool is greater than the first preset storage block threshold. If the number of free storage blocks in the storage pool is greater than the first preset storage block threshold, it means that there are enough free storage blocks in the storage pool. Therefore, the segment corresponding to the target segment type can be quickly supplemented by direct assembly without complex evaluation calculations. This simplifies the process of determining the target allocation strategy, reduces the computational overhead of scheduling decisions, and improves the response speed and efficiency of storage pool space scheduling.
[0131] As an optional implementation, based on any of the above embodiments, a target allocation strategy for the target segment type is determined based on the number of free storage blocks in the storage pool and the segment usage data of each working controller, including:
[0132] Based on the number of free storage blocks in the storage pool, the first evaluation value corresponding to the first allocation strategy is determined;
[0133] Based on the segment usage data of each working controller, the second evaluation value corresponding to the second allocation strategy is determined;
[0134] Based on the number of idle segments of the target segment type in each work controller, the third evaluation value corresponding to the third allocation strategy is determined.
[0135] Based on the first evaluation value, the second evaluation value, and the third evaluation value, the target allocation strategy for the target segment type is determined.
[0136] The first evaluation value is used to assess the suitability of adopting the first allocation strategy. The higher the first evaluation value, the more abundant the free storage blocks in the storage pool, and the more suitable it is to assemble the new target segment type corresponding segment using the first allocation strategy.
[0137] The second assessment value is used to evaluate the suitability of adopting the second allocation strategy. The higher the second assessment value, the greater the difference in the number of vacant spaces between different types of segments, that is, some types of segments are obviously surplus while the target segment type is in short supply, and the suitability of adopting the second allocation strategy is higher.
[0138] The third evaluation value is used to assess the suitability of adopting the third allocation strategy. The higher the third evaluation value, the more uneven the distribution of the target segment type's segments among the work controllers. That is, some work controllers have a lot of idle segments corresponding to the target segment type, while other work controllers have a shortage of segments corresponding to the target segment type. In this case, the suitability of adopting the third allocation strategy is higher.
[0139] Optionally, in this embodiment, the first evaluation value can be calculated as the difference between the number of free storage blocks in the storage pool and a second preset storage block threshold. When the number of free storage blocks is greater than the second preset storage block threshold, this difference is used as the first evaluation value. When the number of free storage blocks is less than or equal to the second preset storage block threshold, the first evaluation value is set to a preset value.
[0140] Optionally, in this embodiment, regarding the second evaluation value, the number of idle slots for each type of segment included in each work controller is merged according to the segment type to obtain the total number of idle slots corresponding to each type of segment. Then, the range of these total idle slots is calculated, that is, the maximum value minus the minimum value among the total idle slots, to obtain the second evaluation value. The larger the range, the more significant the difference in the number of idle slots between different types of segments, and the higher the necessity of splitting surplus type segments and reorganizing the segments corresponding to the target segment type; therefore, the second evaluation value is also larger.
[0141] Optionally, in this embodiment, regarding the third evaluation value, the number of idle segments corresponding to the target segment type in each work controller is obtained, and then the range of these idle numbers is calculated, i.e., the maximum value minus the minimum value, to obtain the third evaluation value. The larger the range, the more uneven the distribution of the segments corresponding to the target segment type among the work controllers, and the higher the benefit of reclaiming idle segments corresponding to the target segment type across work controllers and redistributing them, therefore the larger the third evaluation value is.
[0142] Optionally, as another possible implementation, the first evaluation value, the second evaluation value, and the third evaluation value can be compared with their corresponding preset evaluation thresholds according to a preset priority order. Following the priority order of the first allocation strategy, the second allocation strategy, and the third allocation strategy, first, it is determined whether the first evaluation value is greater than the first preset evaluation threshold. If it is, the first allocation strategy is determined as the target allocation strategy. Otherwise, it is determined whether the second evaluation value is greater than the second preset evaluation threshold. If it is, the second allocation strategy is determined as the target allocation strategy. Otherwise, it is determined whether the third evaluation value is greater than the third preset evaluation threshold. If it is, the third allocation strategy is determined as the target allocation strategy. If none of the three evaluation values exceed their respective preset evaluation thresholds, the allocation strategy corresponding to the evaluation value with the largest value can be selected as the target allocation strategy.
[0143] Optionally, the first preset evaluation threshold, the second preset evaluation threshold, and the third preset evaluation threshold are preset and are not limited in this embodiment.
[0144] Specifically, by evaluating the suitability of the three candidate allocation strategies under the current resource status, the optimal strategy is selected based on the actual storage pool and resource information of each type of segment, avoiding the limitations of a single strategy. This ensures that the segments corresponding to the target segment type are replenished in a timely manner, while also taking into account the rationality of space scheduling and the balance of resource utilization.
[0145] As an optional implementation, based on any of the above embodiments, a first evaluation value corresponding to the first allocation strategy is determined based on the number of free storage blocks in the storage pool, including:
[0146] Determine whether the number of free storage blocks in the storage pool is less than or equal to the second preset storage block threshold;
[0147] In response to the number of free storage blocks in the storage pool being less than or equal to the second preset storage block threshold, the first preset value is determined as the first evaluation value corresponding to the first allocation strategy.
[0148] In response to the number of free storage blocks in the storage pool being greater than the second preset storage block threshold and less than or equal to the first preset storage block threshold, a preset evaluation algorithm is used to determine the first evaluation value corresponding to the first allocation strategy based on the number of free storage blocks in the storage pool and the second preset storage block threshold.
[0149] The second preset storage block threshold is less than the first preset storage block threshold.
[0150] Optionally, the second preset storage block threshold is preset.
[0151] The second preset storage block threshold refers to the lower limit of free storage blocks in the storage pool. It is used to ensure that a certain number of free storage blocks are always reserved in the storage pool to cope with special situations such as space reconstruction and fault recovery. When the number of free storage blocks is less than or equal to this threshold, it indicates that there are not enough free storage blocks available for free in the storage pool. At this time, it is not advisable to consume more free storage blocks to assemble new segments.
[0152] Specifically, the first preset value is 0.
[0153] Optionally, in this embodiment, it is determined whether the number of free storage blocks in the storage pool is less than or equal to a second preset storage block threshold. If the number of free storage blocks in the storage pool is less than or equal to the second preset storage block threshold, the first evaluation value is determined to be 0. If the number of free storage blocks in the storage pool is greater than the second preset storage threshold but less than or equal to the first preset storage threshold, the number of free storage blocks in the storage pool and the second preset storage threshold are substituted into a preset calculation formula to obtain the first evaluation value.
[0154] Specifically, the preset calculation formula is as follows:
[0155]
[0156] in, Z is the first evaluation value. Z is the number of free storage blocks in the storage pool. This is the second preset storage block threshold. This is the preset exponential coefficient.
[0157] Optionally, the preset exponent coefficient is pre-set.
[0158] For example, the preset exponent coefficient can be between 1 and 1.5.
[0159] Optionally, when the number of free storage blocks in the storage pool is greater than the first preset storage block threshold, the first evaluation value can be determined as the preset value.
[0160] Optionally, the preset value is pre-set and is much larger than the conventional evaluation value. In order to determine the first allocation strategy as the target allocation strategy when the number of free storage blocks in the storage pool is greater than the first preset storage block threshold.
[0161] Specifically, by setting a second preset storage block threshold as a lower limit protection, the direct assembly strategy can be avoided when there are insufficient free storage blocks, ensuring that the storage pool always retains necessary free storage blocks to cope with special situations such as fault recovery. At the same time, when the number of free storage blocks is moderate, the suitability of the first allocation strategy is quantified by a preset evaluation algorithm, improving the safety and stability of space scheduling.
[0162] As an optional implementation, based on any of the above embodiments, a second evaluation value corresponding to the second allocation strategy is determined based on the segment usage data of each working controller, including:
[0163] The number of free segments of any type in each working controller is combined and calculated to obtain the total number of free segments of that type in the storage system;
[0164] Calculate the variance between the total number of available spaces corresponding to each type of segment to obtain the second evaluation value corresponding to the second allocation strategy.
[0165] The total number of free spaces refers to the total number of unused segments of a certain type in the entire storage system.
[0166] Optionally, in this embodiment, for any type of segment, the number of free segments of that type in each working controller of the storage system is added together to obtain the total number of free segments of that type in the entire storage system.
[0167] The variance of the total available slots for each type of segment is used to characterize the dispersion of the total available slots for each type of segment, i.e., whether the distribution of available slots is balanced across different types of segments. A larger variance indicates a greater difference in available slots between different types, with some types of segments showing a significant surplus while others show a significant shortage, indicating a more uneven spatial distribution between types. The variance of this sample data is calculated by taking the total available slots for each type of segment as a set of sample data.
[0168] For example, the formula for the variance of the total number of available spaces corresponding to each type of segment is as follows:
[0169]
[0170] in, This is the second evaluation value. M represents the number of segment types. This represents the total number of free spaces corresponding to the j-th type of segment. This represents the average total number of free spaces across all types of segments.
[0171] For example, assume there are 3 working controllers. Working controller 1 has 10 free multi-replica type segments and 15 free independent disk redundant array (RAID) level 0 type segments. Working controller 2 has 25 free multi-replica type segments and 26 free independent RAID level 0 type segments. Working controller 3 has 17 free multi-replica type segments and 19 free independent RAID level 0 type segments. Therefore, the total free multi-replica type segments are 10 + 25 + 17 = 52. The total free independent RAID level 0 type segments are 15 + 26 + 19 = 60.
[0172] Specifically, by measuring the variance of the dispersion of the number of free spaces between different types of segments, the degree of spatial imbalance in the current segment's spatial distribution can be accurately identified. This allows for an increase in the evaluation value of the second allocation strategy when there are significant differences between the types of segments, prompting the management controller to prioritize the second allocation strategy. This effectively improves the spatial distribution balance between the types of segments and enhances the overall utilization efficiency of storage space.
[0173] As an optional implementation, based on any of the above embodiments, a third evaluation value corresponding to the third allocation strategy is determined based on the number of idle segments of the target segment type in each work controller, including:
[0174] Obtain the number of idle segments corresponding to the target segment type in each work controller;
[0175] Calculate the variance between the number of idle slots corresponding to the target segment type in each work controller to obtain the third evaluation value corresponding to the third allocation strategy.
[0176] Among them, the variance between the number of idle segments corresponding to the target segment type in each work controller is used to characterize the degree of dispersion between the number of idle segments corresponding to the target segment type in each work controller, that is, whether the distribution of segments corresponding to the target segment type among each work controller is balanced.
[0177] Optionally, in this embodiment, the number of free segments corresponding to the target segment type in each working controller of the storage system is obtained, the variance between the number of free segments corresponding to the target segment type in each working controller is calculated using the corresponding formula, and the calculated variance is determined as the third evaluation value corresponding to the third allocation strategy.
[0178] Specifically, the formula for the variance of the number of idle slots corresponding to the target segment type in each work controller is as follows:
[0179]
[0180] in, This is the third evaluation value. K represents the number of working controllers. This represents the number of idle segments corresponding to the target segment type in the l-th work controller. This is the average number of idle segments corresponding to the target segment type across all work controllers.
[0181] Specifically, by measuring the variance of the distribution of segments corresponding to the target segment type among the working controllers, the balance of the distribution of segments corresponding to the target segment type among the working controllers can be accurately determined. Thus, when there are large differences among the working controllers, the evaluation value of the third allocation strategy is improved, prompting the management controller to prioritize the use of the third allocation strategy. Without consuming additional storage blocks, the local node shortage problem can be quickly alleviated, improving the flexibility of space scheduling and the efficiency of resource utilization.
[0182] As an optional implementation, based on any of the above embodiments, a target allocation strategy for the target segment type is determined based on a first evaluation value, a second evaluation value, and a third evaluation value, including:
[0183] Obtain the weighting coefficients corresponding to the first, second, and third evaluation values;
[0184] Calculate the product of the first evaluation value, the second evaluation value, and the third evaluation value with the corresponding weight coefficient to obtain the weighted first evaluation value, the weighted second evaluation value, and the weighted third evaluation value;
[0185] The maximum value among the weighted first evaluation value, the weighted second evaluation value, and the weighted third evaluation value is determined as the target evaluation value;
[0186] The allocation strategy corresponding to the target evaluation value is determined as the target allocation strategy.
[0187] The weighting coefficient is used to reflect the priority of each candidate allocation strategy, and different allocation strategies correspond to different weighting coefficients.
[0188] For example, the weighting coefficient corresponding to the first evaluation value is greater than the weighting coefficient corresponding to the second evaluation value. The weighting coefficient corresponding to the second evaluation value is greater than the weighting coefficient corresponding to the third evaluation value.
[0189] It is understandable that the candidate allocation strategies are the first allocation strategy, the second allocation strategy, and the third allocation strategy.
[0190] Optionally, the preset weighting coefficients are pre-defined.
[0191] The priority of candidate allocation strategies is adjusted by changing the weights corresponding to each evaluation value.
[0192] Optionally, in this embodiment, pre-configured weight coefficients corresponding to the first, second, and third evaluation values are obtained. The first, second, and third evaluation values are multiplied by their respective weight coefficients to obtain weighted first, second, and third evaluation values. The three weighted evaluation values are compared, and the maximum value among them is determined as the target evaluation value. The allocation strategy corresponding to the target evaluation value is then determined as the target allocation strategy.
[0193] Specifically, by introducing weighting coefficients, the priority of each candidate allocation strategy and the current actual evaluation value can be taken into account when selecting a strategy. This ensures that the final target allocation strategy not only meets the system's preset preferences but can also be reasonably adjusted according to the real-time resource status, thereby improving the rationality and adaptability of strategy selection while ensuring scheduling efficiency.
[0194] As an optional implementation, based on any of the above embodiments, a target allocation strategy for the target segment type is determined based on a first evaluation value, a second evaluation value, and a third evaluation value, including:
[0195] Compare the numerical values of the first, second, and third evaluation values;
[0196] The allocation strategy corresponding to the evaluation value with the largest value is determined as the target allocation strategy for the target segment type.
[0197] Optionally, in this embodiment, after calculating the first evaluation value, the second evaluation value, and the third evaluation value, the three evaluation values are directly compared in magnitude. The one with the largest value is determined from the three evaluation values, and the allocation strategy corresponding to the largest evaluation value is determined as the target allocation strategy corresponding to the target segment type.
[0198] Specifically, by directly comparing the numerical values of the first, second, and third evaluation values, the allocation strategy corresponding to the evaluation value with the largest value is determined as the target allocation strategy. This simplifies the logic for determining the target allocation strategy, reduces computational complexity, and improves the execution speed of scheduling decisions.
[0199] As an optional implementation, based on any of the above embodiments, for any type of segment in the work controller, the prediction coefficient of that type of segment is determined based on the consumption change rate of that type of segment, including:
[0200] Get the preset mapping table;
[0201] For any type of segment in the work controller, the target value range corresponding to the consumption change rate of that type of segment is determined based on a preset mapping table;
[0202] According to the preset mapping table, the second preset value corresponding to each target value interval is determined as the prediction coefficient corresponding to the segment of that type.
[0203] The preset mapping table refers to a pre-configured mapping relationship table used to determine the prediction coefficient based on the consumption change rate.
[0204] The preset mapping table includes multiple numerical ranges of consumption change rates and a second preset value corresponding to each numerical range of consumption change rates.
[0205] The numerical range of the consumption change rate refers to the sub-range obtained by dividing the possible range of values for the consumption change rate.
[0206] For example, the range of the consumption change rate can be divided into multiple continuous intervals, each interval corresponding to a second preset value, which is the corresponding prediction coefficient.
[0207] Optionally, in this embodiment, a preset mapping table is read from a preset database.
[0208] Optionally, in this embodiment, for any type of segment in the work controller, the consumption change rate corresponding to that type of segment is obtained, and the consumption change rate corresponding to that type of segment is input into a preset mapping table for lookup processing to determine the numerical range in which the corresponding consumption change rate falls. This numerical range is then determined as the target numerical range corresponding to that type of segment. A second preset value corresponding to the target numerical range is found from the preset mapping table, and this second preset value is determined as the prediction coefficient corresponding to that type of segment in the work controller.
[0209] It is understandable that the steps described above for determining the prediction coefficients apply to each working controller in the storage system, and therefore will not be repeated here.
[0210] Optionally, the default database is a pre-defined database that stores default mapping tables.
[0211] Specifically, by using a pre-configured mapping table, the correspondence between the consumption change rate and the prediction coefficient is pre-configured. This allows for quick results when determining the prediction coefficient without complex real-time calculations, simply by looking up the table, thus reducing computational overhead during scheduling. Furthermore, the pre-configured mapping table can be flexibly adjusted according to the actual system operating characteristics, improving the flexibility and adaptability of predicting consumption quantities.
[0212] As an optional implementation, based on any of the above embodiments, the target allocation strategy is the second allocation strategy;
[0213] The target allocation strategy is used to allocate segments of the target segment type, including:
[0214] Calculate the average total number of vacant spaces for each type of segment to obtain the average number of vacant spaces.
[0215] Determine the difference between the total number of available spaces for each type of segment other than the target segment type and the average number of available spaces;
[0216] The segment with the largest difference is identified as the segment to be split.
[0217] Based on the segment type to be split, the segment corresponding to the target segment type is obtained through allocation.
[0218] The total free quantity refers to the total number of unused segments of a certain type in the entire storage system, that is, the sum of the free quantities of that type of segment across multiple work controllers. The average free quantity is the average of the total free quantities of various types of segments in the storage system, and is used as a benchmark to measure the relative abundance or scarcity of free quantities for each type of segment.
[0219] Optionally, in this embodiment, the total number of free segments corresponding to each type of segment included in the storage system is summed and then divided by the total number of segment types to obtain the average number of free segments. For each type of segment other than the target segment type, the total number of free segments of that type is subtracted from the average number of free segments to obtain the difference for that type of segment. The differences for each type of segment other than the target segment type are compared, and the segment type corresponding to the largest difference is determined, and this type of segment is identified as the segment to be split. At least one free segment is selected from the free segments of the segment to be split, split into storage blocks, and the split storage blocks are released into the free storage block pool of the storage pool. Then, according to the redundancy level requirements corresponding to the target segment type, the required number of storage blocks are selected from the released storage blocks, and the segments corresponding to the target segment type are reassembled and allocated.
[0220] Optionally, when subtracting the average number of available spaces from the total number of available spaces for all types of segments other than the target segment type, the resulting difference can be positive, negative, or zero. A positive difference indicates that the total number of available spaces for that type of segment is greater than the average number of available spaces. A negative difference indicates that the total number of available spaces for that type of segment is less than the average number of available spaces. A zero difference indicates that the total number of available spaces for that type of segment is equal to the average number of available spaces. The segment with the largest difference is the segment with the largest numerical difference.
[0221] For example, in addition to the target segment type, there are three other types of segments in the storage pool. The differences between the total number of free segments and the average number of free segments for each type are 50, 0, and -20, respectively. The segment with the largest difference of 50 is the segment of the type with the largest difference and is identified as the segment to be split.
[0222] For example, if there are three types of segments in the storage pool, with a total number of free segments of 180, 70 and 20 respectively, then the average number of free segments is 90.
[0223] Specifically, by selecting the type with the most free space exceeding the average as the source segment for splitting, the uneven spatial distribution between different types of segments is effectively improved while supplementing the target segment type. This enhances the targeting and effectiveness of the splitting and reorganization strategy, avoids the mis-splitting of relatively scarce segments, and further improves the overall utilization rate of the storage pool space.
[0224] As an optional implementation, based on any of the above embodiments, the target allocation strategy is the third allocation strategy;
[0225] The target allocation strategy is used to allocate segments corresponding to the target segment type, including:
[0226] Obtain the number of idle segments corresponding to the target segment type in each work controller;
[0227] The working controller with the most idle units is identified as the working controller to be recycled.
[0228] Reclaim the segments corresponding to the idle target segment type in the task controller and reallocate the reclaimed idle target segment type segments.
[0229] Here, recycling refers to the management controller re-incorporating the segments corresponding to the target segment type that are in an idle state from the work controller to be recycled into the management controller's global segment resource pool, making them available for use by other work controllers.
[0230] Optionally, from the usage data reported by each work controller, the number of idle segments corresponding to the target segment type in each work controller is extracted. The number of idle segments corresponding to the target segment type in each work controller is compared numerically, and the work controller with the most idle segments is identified as the work controller to be reclaimed. A segment reclamation command is sent to the work controller to be reclaimed, instructing it to release a specified number of idle segments corresponding to the target segment type. After receiving the reclamation command, the work controller to be reclaimed marks the corresponding idle segments corresponding to the target segment type as reclaimed. The management controller then reintegrates these segments into its global segment resource pool for subsequent allocation to work controllers that require segments corresponding to the target segment type.
[0231] Specifically, by directly selecting the work controller with the most idle segments corresponding to the target segment type as the work controller to be reclaimed, and reclaiming the idle segments corresponding to the target segment type from this work controller, it is possible to quickly obtain available segment resources corresponding to the target segment type, reduce the computational load of scheduling decisions, and improve the execution efficiency of space scheduling.
[0232] As an optional implementation, based on any of the above embodiments, the target allocation strategy is the third allocation strategy;
[0233] The target allocation strategy is used to allocate segments corresponding to the target segment type, including:
[0234] Determine the difference between the number of idle slots corresponding to the target segment type in each work controller and the third preset value;
[0235] Compare each difference with a preset difference threshold;
[0236] The working controller with a difference greater than or equal to a preset difference threshold is identified as a candidate working controller;
[0237] In response to the existence of at least two candidate working controllers, the consumption rate of the segment corresponding to the target segment type in each candidate working controller is obtained;
[0238] The candidate working controller corresponding to the minimum consumption rate of the segment corresponding to the target segment type among the candidate working controllers is determined as the working controller to be recycled.
[0239] Reclaim the segments corresponding to the idle target segment type in the task controller and reallocate the reclaimed idle target segment type segments.
[0240] Optionally, the third preset value is pre-set.
[0241] Optionally, the preset difference threshold is pre-set.
[0242] When the difference value corresponding to a certain work controller is greater than or equal to the preset difference threshold, it indicates that the number of idle segments corresponding to the target segment type in the work controller is relatively abundant and suitable as a source of recycling.
[0243] Optionally, in this embodiment, the number of idle segments corresponding to the target segment type in each working controller is obtained, and the number of idle segments corresponding to the target segment type in each working controller is subtracted from a third preset value to obtain the difference for each working controller. The difference for each working controller is compared with a preset difference threshold, and working controllers with a difference greater than or equal to the preset difference threshold are identified as candidate working controllers. When there are two or more candidate working controllers, the consumption rate of the segments corresponding to the target segment type in each candidate working controller is compared, and the candidate working controller with the lowest consumption rate is identified as the working controller to be recycled. The idle segments corresponding to the target segment type in the working controller to be recycled are recycled to obtain at least one recycled idle segment corresponding to the target segment type, and then redistributed.
[0244] Optionally, in this embodiment, if there is only one candidate working controller, the candidate working controller is directly determined as the working controller to be recycled, and the segment corresponding to the idle target segment type in the working controller to be recycled is recycled to obtain at least one idle segment corresponding to the target segment type.
[0245] Optionally, in this embodiment, if the number of candidate work controllers is zero, the work controller with the most idle segments corresponding to the target segment type among all work controllers can be directly identified as the work controller to be recycled, and subsequent segment recycling and reallocation operations can be performed to ensure that the supplementary tasks of scarce types are not stalled due to excessively strict thresholds.
[0246] Optionally, the amount to be recycled is preset.
[0247] Specifically, by identifying the working controllers whose difference between the number of free segments corresponding to the target segment type and the third preset value is greater than or equal to a preset difference threshold as candidate working controllers, and when there are multiple candidate working controllers, selecting the candidate working controller with the lowest segment consumption rate corresponding to the target segment type as the working controller to be reclaimed, it is possible to take into account the actual surplus level and consumption trend of each working controller when reclaiming segments corresponding to the target segment type, reduce the impact of reclamation operations on system services, and improve the rationality and stability of dynamic scheduling of storage pool space.
[0248] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0249] Figure 3 A flowchart illustrating a storage pool space management method provided in another embodiment of this application is shown below. Figure 3 As shown. Specifically, it includes the following steps:
[0250] S301: Obtain the segment usage data of each working controller.
[0251] The segment usage data for each work controller includes the number of idle segments, consumption rate, and consumption change rate for each type of segment within that work controller.
[0252] S302: Based on the segment usage data of each working controller, determine the predicted number of free segments of each type in the storage system within a future preset time period.
[0253] S303: In response to the existence of a segment with at least one type having a predicted number of free spaces less than a preset free space threshold, the type corresponding to the minimum value among the predicted free spaces is determined as the target segment type.
[0254] S304: Determine whether the number of free storage blocks in the storage pool is greater than the first preset storage block threshold.
[0255] S305: In response to the number of free storage blocks in the storage pool being greater than the first preset storage block threshold, the target allocation strategy for the target segment type is determined to be the first allocation strategy.
[0256] S306: In response to the number of free storage blocks in the storage pool being less than or equal to a first preset storage block threshold, a first evaluation value corresponding to the first allocation strategy is determined based on the number of free storage blocks in the storage pool.
[0257] S307: Based on the segment usage data of each working controller, determine the second evaluation value corresponding to the second allocation strategy.
[0258] S308: Based on the number of idle segments corresponding to the target segment type in each work controller, determine the third evaluation value corresponding to the third allocation strategy.
[0259] S309: Obtain the corresponding weight coefficients for the first evaluation value, the second evaluation value, and the third evaluation value.
[0260] S310: Calculate the product of the first evaluation value, the second evaluation value, and the third evaluation value with the corresponding weight coefficient, and determine the maximum value of the corresponding product as the target evaluation value.
[0261] S311: Determine the allocation strategy corresponding to the target evaluation value as the target allocation strategy.
[0262] S312: The target allocation strategy is used to allocate the segment corresponding to the target segment type.
[0263] Figure 4 This is a schematic diagram of a storage pool space management device provided in one embodiment of this application. Figure 4 As shown, the execution entity of the above-mentioned storage pool space management method is a storage pool space management device. This storage pool space management device can be implemented through a computer program; it can also be implemented through a medium storing the relevant computer program, such as a USB flash drive and / or optical disc; or it can be implemented through a physical device integrating or installing the relevant computer program, such as an electronic device. The electronic device can be a computer or a management controller. In this embodiment, the storage pool space management device is located in an electronic device. Therefore, the storage pool space management device 40 provided in this embodiment includes: an acquisition module 41, a determination module 42, and an allocation module 43.
[0264] Specifically, the acquisition module 41 is used to acquire the segment usage data of each working controller; wherein, the segment usage data of the working controller includes the number of free segments of each type in the working controller; the determination module 42 is used to summarize and process the segment usage data of each working controller to determine the predicted number of free segments of each type in the storage system in the future preset time period; the determination module 42 is also used to determine the type corresponding to the minimum value among the predicted free segments as the target segment type in response to the existence of at least one type of segment having a predicted free number less than a preset free threshold; the determination module 42 is also used to determine the target allocation strategy for the target segment type based on the number of free storage blocks in the storage pool and the segment usage data of each working controller; the allocation module 43 is used to allocate segments of the target segment type using the target allocation strategy.
[0265] Optionally, the segment usage data of the work controller may also include the consumption rate and consumption change rate corresponding to each type of segment in the work controller.
[0266] Accordingly, the determining module 42, when summarizing and processing the segment usage data of each working controller to determine the predicted free quantity of each type of segment in the storage system within a future preset time period, specifically performs the following: adding the free quantities of segments of the same type in the working controllers to obtain the target free quantity corresponding to that type of segment; determining the predicted consumption quantity of that type of segment in the working controller within a future preset time period based on the consumption rate and consumption change rate of any type of segment in the working controllers; adding the predicted consumption quantities of segments of the same type in each working controller in the storage system to obtain the target predicted quantity of each type of segment in the storage system; and subtracting the target predicted quantity of any type of segment from the target free quantity of that type of segment to obtain the predicted free quantity of each type of segment in the storage system within a future preset time period.
[0267] Optionally, the determining module 42, when determining the predicted consumption quantity of a segment of any type in the working controller within a future preset time period based on the consumption rate and consumption change rate of any type of segment in the working controller, is specifically used for: determining the prediction coefficient of a segment of any type in the working controller based on the consumption change rate of that type of segment; and multiplying the duration corresponding to the future preset time period, the consumption rate of that type of segment, and the prediction coefficient to obtain the predicted consumption quantity of that type of segment within the future preset time period.
[0268] Optionally, the target allocation strategy includes any one of the first allocation strategy, the second allocation strategy, and the third allocation strategy; the first allocation strategy is an allocation strategy that creates a segment corresponding to the target segment type based on the storage blocks in the storage pool; the second allocation strategy is an allocation strategy that splits segments of types other than the target segment type to create a segment corresponding to the target segment type; and the third allocation strategy is an allocation strategy that reallocates idle segments corresponding to the target segment type in the work controller.
[0269] Accordingly, the determining module 42 is used to determine whether the number of free storage blocks in the storage pool is greater than a first preset storage block threshold before determining the target allocation strategy for the target segment type based on the number of free storage blocks in the storage pool and the segment usage data of each working controller; in response to the number of free storage blocks in the storage pool being greater than the first preset storage block threshold, the target allocation strategy for the target segment type is determined to be the first allocation strategy.
[0270] Optionally, when determining the target allocation strategy for the target segment type based on the number of free storage blocks in the storage pool and the segment usage data of each working controller, the determining module 42 is specifically used for: determining a first evaluation value corresponding to the first allocation strategy based on the number of free storage blocks in the storage pool; determining a second evaluation value corresponding to the second allocation strategy based on the segment usage data of each working controller; determining a third evaluation value corresponding to the third allocation strategy based on the number of free segments of the target segment type in each working controller; and determining the target allocation strategy for the target segment type based on the first evaluation value, the second evaluation value, and the third evaluation value.
[0271] Optionally, when determining the first evaluation value corresponding to the first allocation strategy based on the number of free storage blocks in the storage pool, the determining module 42 is specifically used to: determine whether the number of free storage blocks in the storage pool is less than or equal to the second preset storage block threshold.
[0272] In response to the number of free storage blocks in the storage pool being less than or equal to the second preset storage block threshold, the first preset value is determined as the first evaluation value corresponding to the first allocation strategy.
[0273] In response to the number of free storage blocks in the storage pool being greater than the second preset storage block threshold and less than or equal to the first preset storage block threshold, a preset evaluation algorithm is used to determine the first evaluation value corresponding to the first allocation strategy based on the number of free storage blocks in the storage pool and the second preset storage block threshold; the second preset storage block threshold is less than the first preset storage block threshold.
[0274] Optionally, when determining the second evaluation value corresponding to the second allocation strategy based on the segment usage data of each working controller, the determining module 42 is specifically used to: merge and calculate the number of free segments of any type in each working controller to obtain the total number of free segments of that type in the storage system; calculate the variance between the total number of free segments of each type to obtain the second evaluation value corresponding to the second allocation strategy.
[0275] Optionally, when determining the third evaluation value corresponding to the third allocation strategy based on the number of idle segments of the target segment type in each work controller, the determining module 42 is specifically used to: obtain the number of idle segments of the target segment type in each work controller; calculate the variance between the number of idle segments of the target segment type in each work controller to obtain the third evaluation value corresponding to the third allocation strategy.
[0276] Optionally, when determining the target allocation strategy for the target segment type based on the first evaluation value, the second evaluation value, and the third evaluation value, the determining module 42 is specifically used to: obtain the weight coefficients corresponding to the first evaluation value, the second evaluation value, and the third evaluation value; calculate the product of the first evaluation value, the second evaluation value, and the third evaluation value with the corresponding weight coefficients to obtain the weighted first evaluation value, the weighted second evaluation value, and the weighted third evaluation value; determine the maximum value among the weighted first evaluation value, the weighted second evaluation value, and the weighted third evaluation value as the target evaluation value; and determine the allocation strategy corresponding to the target evaluation value as the target allocation strategy.
[0277] Optionally, when determining the target allocation strategy for the target segment type based on the first evaluation value, the second evaluation value, and the third evaluation value, the determining module 42 is specifically used to: compare the numerical values of the first evaluation value, the second evaluation value, and the third evaluation value; and determine the allocation strategy corresponding to the evaluation value with the largest numerical value as the target allocation strategy for the target segment type.
[0278] Optionally, the determining module 42, when determining the prediction coefficient of any type of segment in the work controller based on the consumption change rate of that type of segment, is specifically used for: obtaining a preset mapping table; the preset mapping table includes multiple numerical intervals of consumption change rates and a second preset value corresponding to each numerical interval of consumption change rate; for any type of segment in the work controller, determining the target numerical interval corresponding to the consumption change rate of that type of segment based on the preset mapping table; and determining the second preset value corresponding to each target numerical interval as the prediction coefficient corresponding to that type of segment according to the preset mapping table.
[0279] Optionally, the target allocation strategy is the second allocation strategy.
[0280] Accordingly, when the allocation module 43 allocates segments of the target segment type using the target allocation strategy, it is specifically used to: calculate the average of the total number of available slots for each type of segment to obtain the average number of available slots; determine the difference between the total number of available slots of the types other than the target segment type and the average number of available slots; determine the segment of the type with the largest difference as the segment to be split; and allocate the segment corresponding to the target segment type based on the segment to be split.
[0281] Optionally, the target allocation strategy is the third allocation strategy.
[0282] Accordingly, when the allocation module 43 allocates segments of the target segment type using the target allocation strategy, it is specifically used to: obtain the number of idle segments corresponding to the target segment type in each work controller; determine the work controller with the most idle segments as the work controller to be recycled; recycle the idle segments corresponding to the target segment type in the work controller to be recycled, and reallocate the recycled idle segments corresponding to the target segment type.
[0283] Optionally, the target allocation strategy is the third allocation strategy.
[0284] Accordingly, when the allocation module 43 allocates segments of the target segment type using the target allocation strategy, it is specifically used to: determine the difference between the number of idle segments corresponding to the target segment type in each working controller and a third preset value; compare each difference with a preset difference threshold; determine the working controllers whose difference is greater than or equal to the preset difference threshold as candidate working controllers; in response to the existence of at least two candidate working controllers, obtain the consumption rate of the segments corresponding to the target segment type in each candidate working controller; determine the candidate working controller corresponding to the minimum consumption rate of the segments corresponding to the target segment type in each candidate working controller as the working controller to be recycled; recycle the idle segments corresponding to the target segment type in the working controller to be recycled, and redistribute the recycled idle segments corresponding to the target segment type.
[0285] For a description of the features in the embodiment corresponding to the storage pool space management device, please refer to the relevant description in the embodiment corresponding to the storage pool space management method, which will not be repeated here.
[0286] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus.
[0287] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the steps in any of the above-described storage pool space management method embodiments.
[0288] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0289] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0290] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0291] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0292] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described embodiments of the storage pool space management method.
[0293] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0294] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described storage pool space management method embodiments.
[0295] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described storage pool space management method embodiments.
[0296] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0297] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0298] The above provides a detailed description of a storage pool space management method provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. A method for managing storage pool space, characterized in that, The method is applied to a management controller in a storage system, the storage system including the management controller and multiple worker controllers, each worker controller being allocated different types of segments. The method includes: Obtain the segment usage data of each work controller; wherein, the segment usage data of the work controller includes the number of idle segments of each type in the work controller; The segment usage data of each working controller is aggregated and processed to determine the predicted number of free segments of each type in the storage system within a future preset time period. In response to the fact that the predicted number of free spaces for at least one type of segment is less than a preset free space threshold, the type corresponding to the minimum value among the predicted free spaces is determined as the target segment type. The target allocation strategy for the target segment type is determined based on the number of free storage blocks in the storage pool and the segment usage data of each working controller. The target allocation strategy is used to allocate segments of the target segment type.
2. The method for managing storage pool space according to claim 1, characterized in that, The segment usage data of the working controller also includes the consumption rate and consumption change rate corresponding to each type of segment in the working controller; The step of aggregating and processing the segment usage data of each working controller to determine the predicted number of free segments of each type in the storage system within a future preset time period includes: The number of idle slots of the same type in the work controller is added together to obtain the target number of idle slots corresponding to that type of slot; Based on the consumption rate and consumption change rate of any type of segment in the work controller, determine the predicted consumption quantity of that type of segment in the work controller within the future preset time period. The predicted consumption quantities of the same type of segment in the storage system are summed in each of the working controllers to obtain the target predicted quantity of each type of segment in the storage system. The predicted number of free segments of any type is obtained by subtracting the target predicted number of free segments of that type from the target number of free segments in the storage system within the future preset time period.
3. The method for managing storage pool space according to claim 2, characterized in that, The method of determining the predicted consumption quantity of a given type of segment in the work controller within the preset future time period, based on the consumption rate and consumption change rate of any type of segment in the work controller, includes: For any type of segment in the work controller, the prediction coefficient of that type of segment is determined based on the consumption change rate of that type of segment; The predicted consumption quantity of this type of segment within the future preset time period is obtained by multiplying the duration corresponding to the future preset time period, the consumption rate of this type of segment, and the prediction coefficient.
4. The method for managing storage pool space according to claim 1, characterized in that, The target allocation strategy includes any one of a first allocation strategy, a second allocation strategy, and a third allocation strategy; the first allocation strategy is an allocation strategy that creates a segment corresponding to the target segment type based on the storage blocks in the storage pool; the second allocation strategy is an allocation strategy that splits segments of types other than the target segment type to create a segment corresponding to the target segment type. The third allocation strategy is an allocation strategy that reallocates the idle segments corresponding to the target segment type in the work controller. Before determining the target allocation strategy for the target segment type based on the number of free storage blocks in the storage pool and the segment usage data of each working controller, the method further includes: Determine whether the number of free storage blocks in the storage pool is greater than a first preset storage block threshold; If the number of free storage blocks in the storage pool is greater than the first preset storage block threshold, then the target allocation strategy for the target segment type is determined to be the first allocation strategy.
5. The method for managing storage pool space according to claim 4, characterized in that, The target allocation strategy for determining the target segment type based on the number of free storage blocks in the storage pool and the segment usage data of each working controller includes: Based on the number of free storage blocks in the storage pool, a first evaluation value corresponding to the first allocation strategy is determined; Based on the segment usage data of each working controller, a second evaluation value corresponding to the second allocation strategy is determined; Based on the number of idle segments of the target segment type in each work controller, the third evaluation value corresponding to the third allocation strategy is determined; Based on the first evaluation value, the second evaluation value, and the third evaluation value, a target allocation strategy for the target segment type is determined.
6. The method for managing storage pool space according to claim 5, characterized in that, The step of determining the first evaluation value corresponding to the first allocation strategy based on the number of free storage blocks in the storage pool includes: Determine whether the number of free storage blocks in the storage pool is less than or equal to a second preset storage block threshold; In response to the number of free storage blocks in the storage pool being less than or equal to the second preset storage block threshold, the first preset value is determined as the first evaluation value corresponding to the first allocation strategy. In response to the number of free storage blocks in the storage pool being greater than the second preset storage block threshold and less than or equal to the first preset storage block threshold, a preset evaluation algorithm is used to determine the first evaluation value corresponding to the first allocation strategy based on the number of free storage blocks in the storage pool and the second preset storage block threshold; the second preset storage block threshold is less than the first preset storage block threshold.
7. The method for managing storage pool space according to claim 5, characterized in that, The determination of the second evaluation value corresponding to the second allocation strategy based on the segment usage data of each working controller includes: The number of free segments of any type in each working controller is combined and calculated to obtain the total number of free segments of that type in the storage system; Calculate the variance between the total number of available spaces corresponding to each type of segment to obtain the second evaluation value corresponding to the second allocation strategy.
8. The method for managing storage pool space according to claim 5, characterized in that, The process of determining the third evaluation value corresponding to the third allocation strategy based on the number of idle segments of the target segment type in each work controller includes: Obtain the number of idle segments corresponding to the target segment type in each work controller; Calculate the variance between the number of idle slots corresponding to the target segment type in each work controller to obtain the third evaluation value corresponding to the third allocation strategy.
9. The method for managing storage pool space according to claim 5, characterized in that, The step of determining the target allocation strategy for the target segment type based on the first evaluation value, the second evaluation value, and the third evaluation value includes: Obtain the weight coefficients corresponding to the first evaluation value, the second evaluation value, and the third evaluation value; Calculate the product of the first evaluation value, the second evaluation value, and the third evaluation value with the corresponding weight coefficient to obtain the weighted first evaluation value, the weighted second evaluation value, and the weighted third evaluation value; The maximum value among the weighted first evaluation value, the weighted second evaluation value, and the weighted third evaluation value is determined as the target evaluation value; The allocation strategy corresponding to the target evaluation value is determined as the target allocation strategy.
10. The method for managing storage pool space according to claim 5, characterized in that, The step of determining the target allocation strategy for the target segment type based on the first evaluation value, the second evaluation value, and the third evaluation value includes: The first evaluation value, the second evaluation value, and the third evaluation value are compared in terms of their numerical values. The allocation strategy corresponding to the evaluation value with the largest value is determined as the target allocation strategy for the target segment type.
11. The method for managing storage pool space according to claim 3, characterized in that, The step of determining the prediction coefficient for any type of segment in the working controller based on the consumption change rate of that type of segment includes: Obtain a preset mapping table; the preset mapping table includes multiple numerical ranges of consumption change rate and a second preset value corresponding to each numerical range of consumption change rate; For any type of segment in the work controller, the target value range corresponding to the consumption change rate of that type of segment is determined based on the preset mapping table; According to the preset mapping table, the second preset value corresponding to each of the target value intervals is determined as the prediction coefficient corresponding to the segment of that type.
12. The method for managing storage pool space according to claim 5, characterized in that, The target allocation strategy is the second allocation strategy; The process of allocating segments of the target segment type using the target allocation strategy includes: Calculate the average total number of vacant spaces for each type of segment to obtain the average number of vacant spaces. Determine the difference between the total number of available spaces for each type of segment other than the target segment type and the average number of available spaces; The segment with the largest difference is identified as the segment to be split. Based on the segment to be split type, the segment corresponding to the target segment type is obtained through allocation.
13. The method for managing storage pool space according to claim 5, characterized in that, The target allocation strategy is the third allocation strategy; The process of allocating segments of the target segment type using the target allocation strategy includes: Obtain the number of idle segments corresponding to the target segment type in each of the work controllers; The working controller with the most idle units is identified as the working controller to be recycled. The idle segments corresponding to the target segment type in the work controller to be recycled are recycled, and the recycled idle segments corresponding to the target segment type are reallocated.
14. The method for managing storage pool space according to claim 5, characterized in that, The target allocation strategy is the third allocation strategy; The process of allocating segments of the target segment type using the target allocation strategy includes: Determine the difference between the number of idle slots corresponding to the target segment type in each of the working controllers and the third preset value; Compare each of the aforementioned differences with a preset difference threshold; The working controllers whose difference is greater than or equal to a preset difference threshold are identified as candidate working controllers; In response to the existence of at least two candidate working controllers, the consumption rate of the segment corresponding to the target segment type in each candidate working controller is obtained; The candidate working controller corresponding to the minimum consumption rate of the segment corresponding to the target segment type in each of the candidate working controllers is determined as the working controller to be recycled; The idle segments corresponding to the target segment type in the work controller to be recycled are recycled, and the recycled idle segments corresponding to the target segment type are reallocated.
15. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the storage pool space management method as described in any one of claims 1 to 14 when executing the computer program.
