Storage space optimization method and device, electronic equipment and storage medium
By monitoring the space usage of all-flash storage pool in real time and adjusting the ratio of host writes and garbage collection operations, the problem of low storage performance in all-flash storage systems is solved, and efficient space management and performance optimization is achieved.
Patent Information
- Application Number
- CN202510775872.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-11
Smart Images

Figure CN120276686A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular, to a method and device for optimizing storage space, an electronic device, and a storage medium. Background Art
[0002] In the current all-flash storage system, space management and flow control mechanisms usually rely on the monitoring of the storage pool space utilization rate, and adjust the speed of host write operations by setting multiple current limiting levels, in order to achieve a balance between space consumption and recovery. This mechanism is based on the threshold of the storage pool space utilization rate. Once it exceeds the preset threshold, the performance of host writing is gradually reduced until a state where the space consumption and recovery speeds match is reached.
[0003] However, the above-mentioned step-by-step adjustment process is relatively slow, and the adjustment granularity is relatively rough, and it is impossible to maximize the performance output while ensuring system stability, thus causing the technical problem of low storage performance of the all-flash storage system. Summary of the Invention
[0004] This application provides a method and device for optimizing storage space, an electronic device, and a storage medium, so as to at least solve the problem of low storage performance of the all-flash storage system in related technologies.
[0005] According to one aspect of the embodiments of this application, a method for optimizing storage space is provided, including: obtaining the space utilization rate in the all-flash storage pool, where the space utilization rate is the ratio between the used storage space and the total storage space in the all-flash storage pool; when the space utilization rate reaches the recovery threshold, determining the current metadata operation ratio of the current cycle based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle, where the current metadata operation ratio is the ratio between the number of first metadata operations generated by writing data into the all-flash storage pool and the number of second metadata operations generated by recovering data in the all-flash storage pool in the current cycle; determining the consumed storage space obtained by writing data and the released storage space obtained by recovering invalid data in the current cycle based on the current metadata operation ratio.
[0006] According to another aspect of the embodiments of the present application, an optimization device for storage space is further provided, including: a first acquisition unit configured to acquire the space utilization rate in the all-flash storage pool, where the space utilization rate is the ratio between the used storage space and the total storage space in the all-flash storage pool; a first processing unit configured to, when the space utilization rate reaches the recycling threshold, determine the current metadata operation ratio of the current period based on the target space balance ratio of the current period and the actual space balance ratio of the previous period, where the current metadata operation ratio is the ratio between the number of first metadata operations generated by writing data into the all-flash storage pool and the number of second metadata operations generated by recycling data in the all-flash storage pool during the current period; a second processing unit configured to determine the consumed storage space obtained by writing data and the released storage space obtained by recycling invalid data during the current period based on the current metadata operation ratio.
[0007] According to yet another aspect of the embodiments of the present application, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the steps of any one of the above storage space optimization methods through the computer program.
[0008] According to yet another aspect of the embodiments of the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, where the computer program is configured to execute the steps of any one of the above storage space optimization methods when running.
[0009] According to yet another aspect of the embodiments of the present application, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of any one of the above storage space optimization methods.
[0010] By adopting the above embodiments provided by the present application, by monitoring the space utilization rate of the all-flash storage pool in real time, when the space utilization rate reaches the recycling threshold, the current metadata operation ratio of the current period is determined based on the target space balance ratio of the current period and the actual space balance ratio of the previous period. Among them, by introducing the current metadata operation ratio, the ratio between the host writing and the garbage collection operation can be adjusted to meet the target space balance ratio. It effectively avoids the exhaustion of the storage space. At the same time, through the periodic negative feedback adjustment mechanism, the adjustment speed and accuracy are improved, the data response time and performance fluctuation are reduced, the stable operation of the all-flash storage pool under high space utilization rate is realized, the host writing performance is guaranteed, the system overhead caused by garbage collection is reduced, and the overall performance of the all-flash storage system is enhanced. Description of the Drawings
[0011] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0012] Figure 1 It is a schematic diagram of an application scenario of an optimization method for a storage space according to an embodiment of the present application.
[0013] Figure 2 It is a flowchart of an optional optimization method for a storage space according to an embodiment of the present application.
[0014] Figure 3 It is a specific example of an optional optimization method for a storage space according to an embodiment of the present application.
[0015] Figure 4 It is a schematic diagram of an optional correction of MOR based on negative feedback control according to an embodiment of the present application.
[0016] Figure 5 It is a schematic diagram of an optional setting of SCR_T according to the space utilization rate according to an embodiment of the present application.
[0017] Figure 6 It is an overall schematic diagram of an optional optimization method for a storage space according to an embodiment of the present application.
[0018] Figure 7 It is a mapping table of an optional space utilization rate and a set SCR_T according to an embodiment of the present application.
[0019] Figure 8 It is a structural block diagram of an optional optimization device for a storage space according to an embodiment of the present application. Detailed implementation manners
[0020] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.
[0021] It should be noted that in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0022] To enable those skilled in the art of this technology to better understand the solution of this application, the following further detailed description of this application will be given in conjunction with the accompanying drawings and specific embodiments.
[0023] According to one aspect of the embodiments of this application, an optimization method for storage space is provided. Optionally, in this embodiment, the above-mentioned optimization method for storage space can be but is not limited to being applied to a hardware scenario as Figure 1 shown, where the server device may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above-mentioned server device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned server device. For example, the server device may further include more or fewer components than Figure 1 shown in the figure, or have a different configuration from Figure 1 shown in the figure.
[0024] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the optimization method for storage space in the embodiments of this application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above-mentioned method is implemented. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include memories remotely disposed relative to the processor 102, and these remote memories may be connected to the server device through a network. Examples of the above-mentioned network include but are not limited to the Internet, enterprise intranets, local area networks, mobile communication networks, and their combinations.
[0025] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by a communication provider of a server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0026] The embodiments of the present application can be, but are not limited to, applied to the operation optimization scenarios of all-flash arrays under high storage density and high-performance requirements. For the convenience of understanding, specific examples of several application scenarios are given below:
[0027] (1) High-performance computing environment: In a high-performance computing data center, an all-flash array is a key part of improving computing performance. Since high-performance computing tasks usually involve a large amount of data reading and writing and frequent changes in storage space requirements, the technical solution of the present application can quickly adapt to the changes in the speed of space consumption and recycling by precisely controlling the proportion of metadata operations, ensuring the continuity and efficiency of computing tasks. For example, when multiple high-performance computing tasks are writing a large amount of data simultaneously, this method can timely adjust the garbage collection rate to avoid the storage space being exhausted due to a large amount of short-term writing, and at the same time, by controlling the concurrency of metadata operations, ensure the maximum utilization of CPU (Central Processing Unit) resources and improve the overall computing efficiency.
[0028] (2) Cloud computing platform: The storage resource management in a cloud computing environment faces complex and changeable challenges, including the storage demand fluctuations of different tenants, the dynamic creation and destruction of virtual machines, etc. The technical solution of the present application can provide a fine-grained flow control mechanism through periodic MOR adjustment, effectively balancing the relationship between host writing and storage space recycling. During the high-load period of cloud services, the system can dynamically increase garbage collection operations to ensure sufficient supply of storage resources, while during the low-load period, it slows down the recycling speed to reduce unnecessary system overhead. This flexible flow control mechanism helps to improve the resource utilization efficiency and stability of the cloud computing platform, and provides more reliable and high-performance cloud services for users.
[0029] (3) Big data analysis system: Big data analysis tasks usually involve the rapid reading, writing, and processing of massive amounts of data, placing extremely high demands on the response speed and data processing capabilities of the storage system. Through the method in the embodiments of the present application, the big data system can achieve rapid space recycling during peak data writing periods, avoiding interruption of the data stream due to insufficient storage space. At the same time, during idle data processing periods, garbage collection operations are reduced, avoiding unnecessary waste of CPU resources. This intelligent flow control and space balancing mechanism helps the big data analysis system continuously optimize data processing performance, reduce data latency, and improve overall analysis efficiency and user experience.
[0030] (4) Data backup and recovery solution: In data backup and recovery scenarios, the space management and flow control mechanisms of the storage pool are crucial for ensuring data integrity and timely recovery. Through the refined control of host writing and garbage collection operations in the technical solution of the present application, when data backup operations are frequent, the space recycling speed can be dynamically adjusted to ensure that the storage system has sufficient available space to handle sudden data backup requirements. At the same time, during the data recovery process, by controlling the proportion of metadata operations, the impact on other normally running tasks caused by a large number of metadata modifications during the recovery operation is avoided, ensuring the timely and effective data recovery while maintaining the high throughput and stable performance of the system.
[0031] By applying the technical solution of the present application to the above scenarios, fine-grained flow control at the metadata level is achieved. It can not only effectively manage storage resources, avoid the risk of space exhaustion, but also optimize the performance of the storage system, improve the utilization efficiency of CPU resources, and provide solid technical support for key services such as high-performance computing, cloud computing, big data analysis, and data backup and recovery.
[0032] The optimization method for the storage space in the embodiments of the present application can be executed by a server device, or can be executed by a server device in combination with at least one of terminal devices (which can also be understood as input / output device 108). Among them, when the terminal device executes the optimization method for the storage space in the embodiments of the present application, it can also be executed by a client installed thereon.
[0033] Taking the example that the server executes the optimization method for the storage space in this embodiment, Figure 2 is a schematic flowchart of an optional optimization method for the storage space according to the embodiments of the present application. As Figure 2 shown, the process of this method can include steps S202 to S206.
[0034] Step S202, obtain the space utilization rate in the all-flash storage pool, where the space utilization rate is the ratio of the used storage space to the total storage space in the all-flash storage pool.
[0035] Step S204, when the space utilization rate reaches the recycling threshold, determine the current metadata operation ratio of the current cycle based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle, where the current metadata operation ratio is the ratio between the number of first metadata operations generated by writing data into the all-flash storage pool and the number of second metadata operations generated by recycling data in the all-flash storage pool during the current cycle.
[0036] Step S206, based on the current metadata operation ratio, determine the consumed storage space obtained by writing data and the released storage space obtained by recycling invalid data during the current cycle.
[0037] Before explaining the technical solution of this application, first introduce the meanings of the professional terms or nouns involved.
[0038] All-flash storage pool: It can but is not limited to referring to a storage resource collection composed entirely of solid-state drives (such as a solid-state drive array). The high-speed characteristics of solid-state drives make the all-flash storage pool the basis of a high-performance storage solution.
[0039] Space utilization rate: It represents the ratio between the occupied storage space and the total storage space in the all-flash storage pool, and is used to monitor the remaining space situation of the storage pool.
[0040] Recycling threshold: It is a preset value used to trigger the garbage collection mechanism. Once the space utilization rate of the storage pool reaches this threshold, the garbage collection process will be automatically started to release the space occupied by invalid data and ensure the continuous availability and performance of the storage pool.
[0041] Target space balance ratio (SCR_T): An ideal ratio of space consumption speed to space recycling speed set according to different stages of the storage pool space utilization rate. For example, in the low utilization rate stage, it may be set to greater than 1 to encourage space consumption; while in the high utilization rate stage, it is set to less than 1 to prioritize ensuring space recycling.
[0042] Current metadata operation ratio (MOR): During the current cycle, it is the ratio of the number of metadata modifications generated by host write operations to the number of metadata modifications generated by garbage collection operations, and is used to reflect the real-time consumption and recycling status of the storage space.
[0043] First metadata operation: It refers to the metadata update actions that occur during the host write operation, such as adding LP metadata or modifying the data fingerprint value, and these operations are directly associated with the data writing.
[0044] Second metadata operation: It refers to the metadata update generated for repositioning valid data during the garbage collection process, such as updating the LP mapping or pointing the data fingerprint value to a new PBA address (Physical Block Address in the storage pool, used to locate the specific physical storage location inside the storage pool, which is the address at the disk array level). Such operations are crucial for the recovery of storage pool space.
[0045] It should be noted that in the embodiments of the present application, the metadata modification operations are classified into three categories: metadata modification operations generated by host writes, metadata modification operations generated by garbage collection, and other metadata modification operations. By adjusting the ratio of metadata modification operations generated by host writes to metadata modification operations of the garbage collection type, the ratio of space consumption to recovery speed is achieved, thereby realizing the flow control and balance of the IO granularity.
[0046] For ease of understanding, first, the overall implementation process of the above storage space optimization method will be briefly introduced in combination with Figure 3 the specific embodiments shown below.
[0047] As Figure 3 shown, assume that during the host write process, the space utilization rate of the all-flash storage pool is monitored in real time. For example, at time t1 in the first cycle, it is in an idle state; at time t2 in the second cycle, a small amount of data is written, and most of the space is still in an idle state; at time t3 in the third cycle, the space occupied by the written data increases sharply. If it is determined at this time that the space utilization rate is greater than or equal to the recovery threshold, the recovery process will be started in the fourth cycle.
[0048] Since the space utilization rate in the first three cycles has not reached the recovery threshold, the fourth cycle is the first cycle to start flow control. Then, the preset initial target space balance ratio and the actual space balance ratio in the third cycle can be used to determine the current metadata operation ratio MOR0 in the fourth cycle (which can also be understood as the current cycle).
[0049] According to the current metadata operation ratio, control the balance between the consumed space occupied by the written data and the recovered space (which can also be understood as the released space) released by starting to recover the invalid data in the all-flash storage pool within the fourth cycle, to ensure the continuous availability and storage performance of the all-flash storage pool.
[0050] Similarly, when the time comes to the fifth cycle, the target space balance ratio in the fifth cycle and the actual space balance ratio in the fourth cycle are found to determine the current metadata operation ratio MOR1 in the fifth cycle. Based on MOR1, control the balance between the consumed space and the recovered space within the fifth cycle.
[0051] In this embodiment, the reason for using the metadata operation ratio (which can also be understood as the metadata modification operation ratio) to regulate the balance between the consumed space and the released space of the all-flash storage pool is that in the all-flash storage pool, the number of metadata modification operations is linearly proportional to the space consumption (or space recovery). The following is the derivation process of the relationship between the two.
[0052] S11, the number of metadata operations during host writing is linearly proportional to the space consumption.
[0053] Specifically, as shown in the following formula (1):
[0054] MOPH = F1 * SC (1)
[0055] Where, MOPH (Meta data Operation of Host, metadata modification operations generated by the host or metadata operations generated by the host), these operations include but are not limited to the modification of the all-flash storage system metadata when the host performs read and write operations. For example, updating the mapping relationship between the logical address (Logical Block Address, abbreviated as LBA) and the physical address (Physical Block Address, abbreviated as PBA), and maintaining the logical view of the data, etc. SC (Space Cosumed, used space), or also known as occupied space, is used to describe the total storage space that has been occupied by data in the storage system; F1 is the first linear coefficient.
[0056] The reason for the linear relationship in the above formula (1) is that the data is mapped at a fixed granularity such as 4KB or 8KB, denoted as grain, written and read according to the grain granularity, and each grain uses the mapping from LBA to PBA. Each write to the same LBA always goes to a new PBA address. Therefore, the write of each grain is proportional to the space consumption, and the number of metadata operations recorded for each grain, such as the number of inserted LP metadata, is also proportional to the number of grain writes.
[0057] S12, the number of metadata operations generated for relocating data during garbage collection is also linearly proportional to the space recovery speed.
[0058] Specifically, as shown in the following formula (2):
[0059] MOPG = F2 * SR (2)
[0060] Among them, MOPG (Meta data Operation of Garbage Collection, the number of metadata operations generated by garbage collection), SR (Space Reclaim, the amount of space reclaimed), and F2 is the second linear coefficient.
[0061] The reason for the linear relationship in the above formula (2) is that during garbage collection, by inefficiently tracking and sorting the data of all BLOCKs (here referring to data blocks containing data), the BLOCK with the highest inefficiency is selected for priority recycling. Similar to host IO, within a certain granularity, such as within a data block range, the number of metadata operations generated by the data that needs to be relocated when recycling one BLOCK or more BLOCKs is proportional to the recycled space.
[0062] S13. According to the above formula (1) and formula (2), obtain the relationship between the two types of metadata modification operation ratios and the space consumption ratio.
[0063] Specifically, as shown in the following formula (3):
[0064] MOPH / MOPG = (F1 * SC) / (F2 * SR) = (F1 / F2) * (SC / SR) = F3 * (SC / SR) (3)
[0065] Among them, the third linear coefficient F3 = F1 / F2, and F3 is a nearly fixed coefficient within a local range.
[0066] It can be seen from the above formula (3) that the ratio of metadata operations generated by host writes to metadata operations generated by garbage collection, MOPH / MOPG, is directly proportional to the ratio of space consumption to space reclaim, SC / SR. Denote MOR = MOPH / MOPG, representing the ratio of metadata operations generated by host writes to metadata operations generated by garbage collection, that is, SCR = SC / SR, representing the Space Consuming Ratio, the ratio of space consumption to the reclaimed amount. Thus, the following formula (4) can be obtained.
[0067] MOR = F3 * SCR (4)
[0068] It can be seen that there is a direct proportional relationship between the metadata operation ratio and the space balance ratio. That is, by controlling MOR, SCR can be controlled.
[0069] In this embodiment, through the flow control mechanism at the metadata level, the speed adjustment between space consumption and space recycling becomes more precise and efficient, achieving the dynamic balance of the storage space in the all-flash storage pool. Specifically, by real-time monitoring the space utilization rate of the storage pool, when it is determined that the recycling threshold is reached, the system can not only adjust the processing order and rate of metadata operations according to the target space balance ratio and the actual space balance ratio, but also quickly respond to the actual ratio changes of space consumption and recycling through periodic MOR calculation and adjustment, ensuring the continuous availability of the space.
[0070] Adopting the above embodiments provided by this application, by real-time monitoring the space utilization rate of the all-flash storage pool, when the space utilization rate reaches the recycling threshold, based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle, the current metadata operation ratio of the current cycle is determined. Among them, by introducing the current metadata operation ratio, the ratio between the host write and the garbage collection operation can be adjusted to conform to the target space balance ratio. This effectively avoids the exhaustion of the storage space. At the same time, through the periodic negative feedback adjustment mechanism, the adjustment speed and accuracy are improved, the data response time and performance fluctuation are reduced, the stable operation of the all-flash storage pool under high space utilization rate is achieved, the host write performance is guaranteed, the system overhead caused by garbage collection is reduced, and the overall performance of the all-flash storage system is enhanced.
[0071] In an exemplary embodiment, the above determining the current metadata operation ratio of the current cycle based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle when the space utilization rate reaches the recycling threshold includes: obtaining the historical metadata operation ratio of the previous cycle; determining a correction coefficient based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle, where the target space balance ratio is the ratio between the space consumption speed and the space release speed within the current cycle, and the actual space balance ratio is the ratio between the actual space consumption speed and the actual space release speed of the previous cycle.
[0072] To determine the metadata operation ratio of the current cycle, it is first necessary to review the historical metadata operation ratio of the previous cycle. Among them, the historical metadata operation ratio is obtained from the ratio between the number of metadata modifications caused by the host write operation and the garbage collection operation within the previous cycle.
[0073] For example, within the previous cycle, if the host write operation generated 20,000 metadata modifications and the garbage collection operation generated 10,000 modifications, then the historical metadata operation ratio of the previous cycle is equal to 2 (that is, the number of metadata modifications generated by the host write operation is twice that of the garbage collection operation).
[0074] After determining the historical metadata operation ratio MORc of the previous cycle, one can, but is not limited to, calculate the correction factor MORf based on the SCR_T set for the current cycle and the SCR_R of the previous cycle. The calculation process can refer to the description in the above embodiments.
[0075] For example, assume that the preset goal is to make the ratio of the space consumption speed to the target space release speed reach 1:1, that is, SCR_T = 1. However, in the previous cycle, the ratio of the actual space consumption speed to the actual space release speed was 1.5:1, that is, SCR_R = 1.5. According to the derivation process in the above embodiments, the correction factor MORf = 0.66 can be obtained.
[0076] That is to say, it is necessary to adjust the historical metadata operation ratio, perform garbage collection operations at a faster speed, and slow down the host writing speed, so as to pull the space balance ratio back to the target value. Specifically, the product of the historical metadata operation ratio and the correction factor is determined as the current metadata operation ratio.
[0077] In this embodiment, by introducing the historical metadata operation ratio and the correction factor, the flow control strategy can respond more flexibly and efficiently to the fluctuations in the storage pool space utilization rate. The core of this mechanism lies in rapid feedback and precise adjustment. By periodically calculating the correction factor and applying it to the calculation of the metadata operation ratio in the future cycle (the next cycle of the current cycle, or the current cycle of the previous cycle), the all-flash storage pool can maintain a good space balance in a high-load environment. Avoid space exhaustion, while ensuring that the host write performance is not affected by excessive flow limiting, and maintaining system stability and high performance.
[0078] Compared with the traditional fixed flow limiting level, the flow control algorithm based on the metadata operation ratio in this embodiment significantly improves the accuracy and speed of adjustment. Especially when dealing with scenarios where the space utilization rate changes rapidly, it can quickly respond and maintain the stable operation and optimized performance of the all-flash storage pool.
[0079] In a specific example, one can, but is not limited to, modify the historical metadata operation ratio through periodic MOR control and real-time monitoring of the actual value of SCR in the previous cycle, so as to achieve the goal of quickly reaching the SCR target value (the target space balance ratio of the current cycle).
[0080] Specifically, assume that the SCR target value is SCR_T, where T represents Target, and the MOR used in the previous cycle is denoted as MORc. By real-time detecting the actual value of SCR in the previous cycle (denoted as SCR_R, where R represents Real), MORc is corrected to obtain the current metadata operation ratio of the current cycle. The derivation process is as follows.
[0081] It is assumed that the theoretical value MOR' of the current cycle is obtained through the following formula (5):
[0082] MOR '= F3 * SCR_T (5)
[0083] The actual value of the previous cycle is determined through the following formula (6):
[0084] MORc = F3 * SCR_R (6)
[0085] Based on the above formulas (5) and (6), it is deduced that F3 = MORc / SCR_R, and further deduced that MOR' is as shown in the following formula (7):
[0086] MOR ' = MORc / SCR_R*SCR_T = MORc * (SCR_T / SCR_R) (7)
[0087] Denote MORf = SCR_T / SCR_R, and it can be deduced that MOR' is as the following formula (8):
[0088] MOR' = MORc * MORf (8)
[0089] That is, according to SCR_T and SCR_R, the correction coefficient MORf = SCR_T / SCR_R is calculated, and the corrected MOR' = MORc * MORf.
[0090] As Figure 4 shown, assuming the input is the target value of SCR_T, MOR is corrected by MORf negative feedback, so that the output SCR_R approaches the target value of SCR_T. That is to say, in the embodiment of the present application, through the negative feedback control of correcting MOR according to the space utilization rate, the speed adjustment between space consumption and space recycling is made more accurate and efficient.
[0091] Specifically, by monitoring the space utilization rate of the all-flash storage pool, when the recycling threshold is reached, the system can not only adjust the processing order and rate of metadata operations according to the target space balance ratio, but also quickly respond to the actual ratio change of space consumption and recycling through periodic MOR calculation and adjustment, ensuring the continuous availability of space.
[0092] Through the above method, by combining the historical metadata operation ratio with the dynamic correction coefficient, fine-grained flow control of host writing and garbage collection operations in the all-flash storage pool is realized. It can not only respond immediately to the change of the storage pool space utilization rate, but also adjust the metadata operation ratio of adjacent cycles by calculating the correction coefficient to ensure that the space consumption and space release rates exactly match the set target ratio SCR_T.
[0093] The above method not only shortens the response time of space flow control, improves the accuracy of adjustment, and avoids excessive consumption or waste of storage space, but also maintains the high performance and stability of the system while ensuring the efficient utilization of the storage pool space, and reduces data processing latency.
[0094] In an exemplary embodiment, determining the correction coefficient based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle includes: determining the ratio between the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle as the correction coefficient.
[0095] Among them, the target space balance ratio (SCR_T) can be, but is not limited to, the ideal ratio of the space consumption speed to the space release speed preset for the current storage pool space usage. In different usage rate intervals, the SCR_T value will be different to adapt to the requirements of storage pool space management.
[0096] The actual space balance ratio (SCR_R) can be, but is not limited to, used to represent the actual ratio of the space consumption speed to the space release speed under the actual operation state of the storage pool in the previous cycle. It is a direct reflection of the current behavior of the storage system and is used to evaluate whether the system meets the expected space management goal.
[0097] The correction coefficient (MORf) can be, but is not limited to, calculated based on the difference between the current target space balance ratio and the actual space balance ratio of the previous cycle, and is used to adjust the historical metadata operation ratio of the previous cycle to obtain the current metadata operation ratio of the current cycle, ensuring that the system can quickly converge to the desired space balance state.
[0098] The method for determining the correction coefficient described in this embodiment is a fast and intuitive flow control adjustment means. This method only needs simple ratio comparison to obtain the correction coefficient, simplifies the update process of flow control parameters, and speeds up the system response speed. This method is particularly suitable for scenarios that require frequent adjustment of the space balance ratio, can quickly guide the system metadata operation ratio to near the target value, reduce the storage performance bottleneck caused by improper space management, and ensure the long-term stable operation of the all-flash storage pool.
[0099] In addition, by comparing the current target space balance ratio with the historical actual space balance ratio, the calculation complexity is reduced, the lag effect caused by over-reliance on historical data is avoided, and the flow control strategy is made more flexible and timely. This improvement is particularly important for scenarios of sudden large amounts of data writing or recycling, because it can quickly adjust the operation tendency of the storage system, maintain the dynamic balance between space consumption and release, and ensure the high efficiency and reliability of the system.
[0100] In summary, the technical solution in this embodiment simplifies the calculation of the correction coefficient while strengthening the instant response ability of the flow control mechanism, providing a more efficient and flexible IO flow control and space balance solution for the all-flash storage pool, and is applicable to various application environments that require high data throughput and space utilization.
[0101] In an exemplary embodiment, the above method further includes: obtaining N metadata operation ratios corresponding to N cycles before the current cycle, where N is a positive integer greater than or equal to 2; performing weighted summation on the N metadata operation ratios to obtain the current metadata operation ratio of the current cycle.
[0102] In addition to the above embodiment of determining the current metadata operation ratio of the current cycle based on the historical metadata operation ratio and correction coefficient of the previous cycle, it is also possible to obtain N metadata operation ratios corresponding to N historical cycles and perform weighted summation on the N metadata operation ratios to obtain the current metadata operation ratio.
[0103] The difference between this embodiment and the above embodiment of using the historical metadata operation ratio of the previous cycle to determine the current metadata operation ratio lies in the different ways of calculating the current metadata operation ratio of the current cycle. For example, assuming N = 4 and the weights are w1 = 0.1, w2 = 0.2, w3 = 0.2, w4 = 0.5 respectively, then the current metadata operation ratio can be determined by, but not limited to, the following formula (9):
[0104] MOR = 0.1 * MOR1 + 0.2 * MOR2 + 0.3 * MOR3 + 0.5 * MOR4 * MORf (9)
[0105] Where MOR1 is the actual metadata operation ratio of the previous cycle (the first historical cycle) adjacent to the current cycle, MOR2 is the actual metadata operation ratio of the second historical cycle adjacent to the previous cycle and before the previous cycle, MOR3 is the actual metadata operation ratio of the third historical cycle adjacent to the second historical cycle and before the second historical cycle, and MOR4 is the actual metadata operation ratio of the fourth historical cycle adjacent to the third historical cycle and before the third historical cycle.
[0106] Compared with directly using the historical metadata operation ratio of the previous cycle (a single cycle) to determine the current metadata operation ratio, the method of determining the current metadata operation ratio by weighted summation in this embodiment emphasizes the importance of historical data more. And by comprehensively considering the MOR values of multiple consecutive cycles, the weighted summation method is used to determine the metadata operation ratio MOR of the current cycle. The advantages of this method include the following aspects.
[0107] (1)Enhance the stability and predictability of the flow control strategy: Weighted summation can smooth out possible operation fluctuations in the short term, providing a stable MOR value that reflects the recent operation trend, which is beneficial for predicting the space usage in future cycles and making early preparations for flow control.
[0108] (2)Improve the accuracy of flow control adjustment: By assigning different weights to different cycles, the system can more accurately capture the changing trend of the space utilization rate, and then adjust the MOR value to ensure that the flow control measures can not only cope with emergencies but also maintain long-term performance and space utilization efficiency.
[0109] (3)Optimize resource allocation and performance: The flow control strategy that comprehensively considers historical data can maximize system performance while ensuring the efficient use of storage space, reduce the host write operation latency caused by excessive flow control, and improve the overall response speed and user satisfaction of the storage system.
[0110] Through the technical solution in this embodiment, by weighted summation of the metadata operation ratios in N historical cycles, a more robust, accurate, and efficient flow control system is constructed, providing excellent space management capabilities and system performance for the all-flash storage array in high-throughput and high-data-density application scenarios, while also increasing the flexibility of the solution.
[0111] In an exemplary embodiment, when the above-mentioned space utilization rate reaches the recycling threshold, before determining the current metadata operation ratio of the current cycle based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle, the above method further includes: determining the target space balance ratio of the current cycle corresponding to the space utilization rate from the target mapping table based on the space utilization rate; wherein, the target mapping table records the mapping relationship between different space utilization rates and different values of the space balance ratio.
[0112] Among them, the target mapping table can be but is not limited to a comparison table for setting the target space operation ratio SCR_T with reference to the storage pool space utilization rate, and specifically can refer to Figure 7 as shown. Figure 7 The table in sets the ratio between the ideal space consumption and ideal space release that the host write operation and garbage collection operation should maintain theoretically according to different space utilization rate thresholds, which is the key basis for formulating the flow control strategy.
[0113] When it is monitored that the current space utilization rate of the all-flash storage pool reaches the recycling threshold, for example, the space utilization rate of the current storage pool is 97%. According to the monitored current space utilization rate, query the pre-created target mapping table to determine the matching target space balance ratio (SCR_T).
[0114] For example, when the space utilization rate is 97%, the corresponding SCR_T is 0.8:1, which indicates that in the current cycle, the system should try to control the space consumption speed to be lower than the space release speed to avoid excessive space consumption, while maintaining the normal operation and service quality of the storage pool.
[0115] In this embodiment, by introducing a target mapping table to automatically match the space utilization rate of the all-flash storage pool with the target space balance ratio, it provides a guiding basis for the dynamic adjustment of the flow control strategy of the all-flash storage pool. The advantages of this method are mainly reflected in the following aspects.
[0116] Dynamic adaptability: By adjusting the target space operation ratio based on the space utilization rate, it can quickly respond to changes in the space capacity pressure of the storage pool, ensuring a close match between the flow control strategy and the actual demand.
[0117] Fine-grained flow control: By setting the target space operation ratio under different space utilization rates, the system can more finely control the balance between host writes and garbage collection operations, avoiding performance bottlenecks caused by insufficient capacity, and preventing service delays caused by excessive flow control.
[0118] Simplify the decision-making process: The target mapping table clarifies the corresponding space balance ratio under each space utilization rate, simplifies the formulation and adjustment process of the flow control strategy, reduces manual intervention, and improves the efficiency and reliability of automated management.
[0119] In summary, by dynamically querying the target mapping table and automatically selecting the target space operation ratio according to the current space utilization rate of the storage pool, a flexible and fine-grained flow control mechanism is constructed, ensuring that the all-flash storage pool can maintain good space management and high-performance output under various space pressures, and meeting the space flow control requirements in data centers and high-density storage environments.
[0120] In an exemplary embodiment, the above method further includes: adjusting the historical space balance ratio of the previous cycle based on the space utilization rate and the target threshold to obtain the target space balance ratio of the current cycle.
[0121] In addition to the method of determining the target space balance ratio by querying the target mapping table in the above embodiment, it is also possible to adjust the historical space balance ratio of the previous cycle based on the comparison result of the space utilization rate and the target threshold to obtain the target space balance ratio of the current cycle.
[0122] In a specific example, the system monitors the space usage of the all-flash storage pool in real time, calculates the degree to which the storage space is occupied (i.e., the space utilization rate), and compares it with a preset target threshold to determine whether the flow control policy needs to be adjusted. For example, assuming the target threshold is set at 95% and the current space utilization rate is monitored at 97%, the system will identify that the current storage pressure has exceeded the warning range and needs to activate the flow control policy.
[0123] Adjust the historical space balance ratio according to the space utilization rate and the target threshold. That is, after determining that the space utilization rate exceeds the target threshold, the system will adjust the historical space balance ratio (SCR_R) of the previous cycle based on this information to obtain the target space balance ratio (SCR_T) of the current cycle. This adjustment process combines the specific value of the space utilization rate with the target threshold, aiming to quickly respond to changes in storage pressure and ensure that the flow control policy can relieve space pressure without overly restricting system performance.
[0124] By real-time evaluating the space utilization rate of the all-flash storage pool and comparing it with the target threshold, dynamically adjust the historical space balance ratio to determine the target space balance ratio of the current cycle. This ensures the immediate responsiveness and refinement of the flow control policy, enabling it to quickly adapt to changes in the space pressure of the storage pool, effectively balance the speed of host writes and garbage collection operations, and avoid performance degradation caused by space exhaustion or excessive flow control.
[0125] At the same time, it can also simplify the decision-making process, reduce manual intervention, and greatly improve the automation management ability. It ensures that in different space usage scenarios, the storage system can not only maintain high-efficiency operation but also respond promptly to capacity requirements, meeting the dual high standards of storage performance and resource management for data centers and cloud services.
[0126] In an exemplary embodiment, adjusting the historical space balance ratio of the previous cycle based on the space utilization rate and the target threshold to obtain the target space balance ratio of the current cycle includes: when the space utilization rate is less than the target threshold, determining the historical space balance ratio as the target space balance ratio, where the value of the target space balance ratio is greater than 1; when the space utilization rate is equal to the target threshold, adjusting the value of the historical space balance ratio to 1 and determining the adjusted first space balance ratio as the target space balance ratio; when the space utilization rate is greater than the target threshold, adjusting the value of the historical space balance ratio to less than 1 and determining the adjusted second space balance ratio as the target space balance ratio.
[0127] First, divide the space utilization rate of the storage space of the all-flash storage pool into sections and set corresponding SCR target values as Figure 5 shown, including the following adjustment methods.
[0128] (1) When the storage space utilization rate is low, flow control is not required, or SCR_T is set to be greater than 1, so that the space consumption speed is greater than the space recovery speed.
[0129] (2) When the storage space utilization rate reaches a certain threshold, set SCR_T equal to 1, indicating that the space consumption speed is equal to the space recovery speed, and it is in a balanced or nearly balanced state.
[0130] (3) When the storage space utilization rate is higher than a certain threshold, set SCR_T less than 1, indicating that the space consumption speed is less than the space recovery speed, to avoid space exhaustion.
[0131] That is to say, if the space utilization rate is less than the target threshold, the system determines that the storage pressure is within an acceptable range. At this time, the target space balance ratio should be set to be greater than 1, which means that the space consumption speed can be faster than the space recovery speed to make full use of the storage resources without immediately starting flow control.
[0132] If the space utilization rate is equal to the target threshold, it means that the system is approaching the critical point of flow control, and the target space balance ratio should be adjusted to 1 to ensure that the space consumption speed is equal to the space recovery speed and maintain the space balance state of the storage pool.
[0133] If the space utilization rate is greater than the target threshold, the system detects that the storage capacity pressure is too high. At this time, the target space balance ratio needs to be adjusted to be less than 1, which means that the space recovery speed should be faster than the space consumption speed to relieve the storage pressure and avoid the exhaustion of the storage pool space.
[0134] In this embodiment, by clarifying the setting rules of the target space balance ratio under different space utilization rate conditions, the dynamic adjustment of the flow control strategy for host writing and garbage collection operations in the all-flash storage pool is realized. The advantages of this method include but are not limited to the following aspects.
[0135] (1) Intelligent response to storage capacity pressure: When the storage pressure is low, the system tends to make full use of the storage space to improve the efficiency of host writing operations; when approaching or reaching the set target threshold, the flow control strategy is immediately adjusted to ensure space balance; while in the high-pressure state, the space recovery speed is accelerated to urgently relieve the insufficient storage capacity.
[0136] (2) Flexible adjustment of flow control strategy: The solution in this embodiment is based on the comparison between the space utilization rate and the target threshold, and flexibly adjusts the target space balance ratio, so that the flow control strategy can not only adapt to the current state of the storage pool, but also proactively respond to future changes in storage requirements.
[0137] (3) Balancing Performance and Security: By dynamically adjusting the target space balance ratio, the system ensures data storage security (preventing space exhaustion) while maintaining high performance operation to the greatest extent, reducing the latency of host write operations, and enhancing the user experience and the overall efficiency of the storage system.
[0138] In an exemplary embodiment, determining the consumed storage space obtained by writing data and the released storage space obtained by reclaiming invalid data within the current cycle based on the current metadata operation ratio includes: determining a first quota for the first type of metadata modification requests and a second quota for the second type of metadata modification requests that are allowed to be processed within the current cycle based on the current metadata operation ratio and the number of metadata modification requests, where the first type of metadata modification requests are modification requests corresponding to writing data to the all-flash storage pool, and the second type of metadata modification requests are modification requests corresponding to reclaiming invalid data in the all-flash storage pool; when it is determined that the conditions for issuing metadata modification requests are met, issuing the first type of metadata modification requests and the second type of metadata modification requests according to the remaining quota ratio; performing the first type of metadata modification operations with the first number of metadata operations based on the first type of metadata modification requests, where the first type of metadata modification operations include modification operations generated by writing data to the all-flash storage pool; performing the second type of metadata modification operations with the second number of metadata operations based on the second type of metadata modification requests, where the second type of metadata modification operations include modification operations generated by reclaiming data in the all-flash storage pool; determining the consumed storage space obtained by writing data within the current cycle based on the first type of metadata modification operations with the first number of metadata operations; and determining the released storage space obtained by reclaiming invalid data within the current cycle based on the second type of metadata modification operations with the second number of metadata operations.
[0139] Among them, the first type of metadata modification requests refer to the metadata modification requests corresponding to the host write operations, mainly involving the writing of new data and the update of LP metadata; the second type of metadata modification requests are essentially the metadata modification requests corresponding to the garbage collection operations, involving the cleaning of invalid data and the update of LP metadata.
[0140] The quota can, but is not limited to, refer to the maximum number of metadata modification requests that the system allows to process within the current cycle, which is divided into a first quota and a second quota. The first quota corresponds to the first total number of the first type of metadata modification requests, and the second quota corresponds to the second total number of the second type of metadata modification requests.
[0141] The first number of metadata operations represents the number of the first type of metadata modification requests executed within the current cycle, and the second number of metadata operations represents the number of the second type of metadata modification requests executed within the current cycle. The two are used to calculate the consumed storage space and the released space within the current cycle.
[0142] Based on the current metadata operation ratio and the number of metadata modification requests, determine the first quota for metadata modification requests of the first type (host writes) and the second quota for metadata modification requests of the second type (garbage collection) within the current cycle. This step ensures that the system can reasonably allocate resources for processing metadata modification requests of the first type and the second type according to the flow control policy.
[0143] Under the condition that the conditions for issuing metadata modification requests are met, issue the corresponding requests according to the remaining quota ratio of the metadata modification requests of the first type and the second type. This step aims to ensure the balance between host write operations and garbage collection operations through fine-grained control, while maximizing CPU utilization and system performance. How to determine whether the conditions for issuing metadata modification requests are met will be described in detail in combination with specific embodiments below.
[0144] For example, assume that 5000 requests have been issued in the metadata modification request queue of the first type, and the remaining quota is 1667; 2000 requests have been issued in the metadata modification request queue of the second type, and the remaining quota is 1333. The maximum concurrency of the current system is 500, the number of two types of metadata modification requests currently being processed is 400, and the number of metadata modification requests that the system can issue is 100. The number of the first metadata modification requests that can be issued according to the remaining quota is the number of the first metadata operation times, such as 54, and the number of the second metadata modification requests that can be issued according to the remaining quota is the number of the second metadata operation times, such as 46.
[0145] By determining the number of times of performing metadata modification operations of the first type (host writes) and the second type (garbage collection), and accordingly determining the consumption and release amounts of the storage space within the current cycle. This step realizes the accurate calculation of storage space consumption and recovery, providing a data basis for the subsequent adjustment of the flow control policy.
[0146] To more clearly understand the overall implementation process of determining the consumed storage space obtained by writing data and the released storage space obtained by recycling invalid data within the current cycle based on the current metadata operation ratio, the following further describes it in combination with a specific example.
[0147] S21, segmentally set the SCR_T values for different space utilization rates of the all-flash storage pool.
[0148] Specifically, reference can be made to Figure 7 the different SCR_T values corresponding to different utilization rates in the target mapping table shown, which will not be elaborated here.
[0149] S22, through Figure 6The metadata module shown adds the metadata modification requests submitted by the host write module and the garbage collection module to different queues respectively, and classifies and counts the number of metadata modification requests that are being processed but not completed and the number of metadata modification requests that have been completed in the current cycle according to host writes and garbage collection.
[0150] S23, set the processing cycle.
[0151] For example, through Figure 6 the metadata module shown, taking the processing of MetaReqCnt metadata modification requests as a cycle, such as MetaReqCnt = 10000, and calculating the MOR value of the next cycle at the beginning of each cycle.
[0152] Specifically, calculate the correction coefficient MORf = SCR_T / SCR_R through the above formula, and MOR' = MORc * MORf in the above formula (8) to quickly calculate the MOR value of the next cycle.
[0153] Among them, SCR_T can be obtained but not limited to by looking up Figure 7 the target mapping table of the current storage pool space utilization rate shown, and SCR_R is obtained from the space management and read / write module based on statistical analysis, and MORc is the MOR value used in the previous cycle.
[0154] S24, the metadata module determines the number of two types of metadata modification requests to be issued in the current batch within the current cycle according to the MOR value, the queue lengths of the metadata modification requests of the two categories of host writes and garbage collection, the number of the two categories of metadata modification requests that are being processed but not completed, and the number of the two categories of metadata modification requests that have been completed in the current cycle.
[0155] The implementation process of the number of two types of metadata modification requests to be issued in a batch within a cycle will be described in detail below in combination with specific embodiments.
[0156] Obviously, within a time cycle, two types of metadata modification requests will be issued in batches multiple times at preset time intervals; or two types of metadata modification requests can be issued equally according to the number of metadata modification requests in each batch. This is not limited in this embodiment.
[0157] In this embodiment, a closed-loop flow control mechanism from quota allocation to request processing and then to space change calculation is constructed by determining the processing quota based on the current metadata operation ratio and the number of metadata modification requests, and then issuing the metadata modification requests according to the remaining quota ratio, and finally performing the metadata modification operation and calculating the storage space change. The advantages of this mechanism include but are not limited to the following aspects.
[0158] (1)Precise control of flow control strategy: Through quota allocation, the system can precisely control the ratio of host write operations to garbage collection operations, avoid excessive space consumption or insufficient recycling, and ensure the stable operation of the storage pool.
[0159] (2)Efficient resource utilization: The remaining quota ratio distribution mechanism ensures that CPU resources are efficiently utilized under concurrent conditions, while avoiding performance losses caused by improper resource allocation.
[0160] (3)Dynamic space management: After performing metadata modification operations, the system can accurately calculate the consumption and release of storage space, providing real-time feedback for subsequent adjustment of flow control strategies, and enhancing the dynamic and flexibility of space management.
[0161] In summary, the technical solution in this embodiment realizes the precise flow control of metadata operations and the dynamic balance of space management in the all-flash storage pool through fine-grained quota allocation and request distribution, providing support for the high-performance operation of the storage system under different loads.
[0162] In an exemplary embodiment, when it is determined that the conditions for issuing the metadata modification request are met, the first type of metadata modification request and the second type of metadata modification request are issued according to the remaining quota ratio, including: when the first remaining quota of the first type of metadata modification request is greater than 0, and the sum of the first quantity of the first type of metadata modification requests that have been issued but not completed and the second quantity of the second type of metadata modification requests that have been issued but not completed within the current period is less than the maximum concurrency, the current batch of the first type of metadata modification requests is issued according to the first remaining quota ratio; when the second remaining quota of the second type of metadata modification request is greater than 0, and the sum of the first quantity and the second quantity is less than the maximum concurrency, the current batch of the second type of metadata modification requests is issued according to the second remaining quota ratio.
[0163] In the embodiments of the present application, the conditions for determining whether a type of metadata modification request can be issued can be, but are not limited to, the following steps.
[0164] S31, Determine whether the remaining quota of the type of metadata modification request is greater than 0.
[0165] Among them, the remaining quota is equal to the total quota minus the number of issued metadata modification requests (including those that have been completed and those that have been issued but not completed).
[0166] If it is greater than 0, then execute the following step S32.
[0167] S32, Whether the number of two types of metadata requests that have been issued but not completed is less than the predetermined maximum concurrency.
[0168] If so, execute the following step S33; otherwise, stop the process.
[0169] S33. Send the metadata request of this type.
[0170] Among them, the determination process of the number of metadata modification requests issued in the current batch within one cycle will be described in detail below in combination with specific embodiments.
[0171] This embodiment further refines the process of issuing metadata modification requests. Through the dual conditional judgments of the remaining quota and the concurrency number, the intelligent scheduling of two types of metadata operations, namely host writing and garbage collection, is realized. The core advantages of this method include the following aspects.
[0172] (1) Dynamically adjust the metadata operation quota: The remaining quota mechanism ensures that the processing quota of metadata modification requests is dynamically adjusted according to the processed situation within the current cycle, avoiding resource waste and ensuring the adaptability of the system when the space utilization rate changes.
[0173] (2) Maximize the CPU utilization efficiency: The setting of the maximum concurrency number effectively controls the concurrency degree of metadata operations, prevents the CPU from being overloaded, and ensures the efficient utilization of the CPU within the allowable range of resources, improving the overall performance of the system.
[0174] (3) Refined flow control strategy: Issuing metadata modification requests according to the proportion of the remaining quota realizes the refined operation of the flow control strategy, ensures the balance between host writing operations and garbage collection operations, and avoids the exhaustion of the storage pool space or performance bottlenecks caused by improper adjustment of the flow control strategy.
[0175] In summary, through the comprehensive judgment of the remaining quota and the concurrency conditions, the intelligent issuance and scheduling of metadata modification requests are realized, providing stable operation and high-performance performance for the all-flash storage pool under different space utilization rates and load conditions.
[0176] In an exemplary embodiment, issuing the first type of metadata modification requests of the current batch according to the first remaining quota ratio includes: determining the difference between the maximum concurrency and the first quantity to obtain a first difference; determining the product of the first difference and the first remaining quota as a first value, where the first remaining quota is the difference between the first quota and the third quantity of the first type of metadata modification requests that have been issued, and the first quota represents the first total quantity of the first type of metadata modification requests allowed to be issued in the current period; determining the ratio of the first value to the total remaining quota as the first remaining quota ratio, where the total remaining quota is the sum of the first remaining quota and the second remaining quota, and the second remaining quota is the difference between the second quota and the fourth quantity of the second type of metadata modification requests that have been issued, and the second quota represents the second total quantity of the second type of metadata modification requests allowed to be issued in the current period; issuing the first type of metadata modification requests of the current batch according to the first remaining quota ratio, where at least one batch of metadata modification requests is allowed to be issued in the current period.
[0177] First, according to MetaReqCnt and MOR, calculate the total quota of the two types of metadata modification requests in this period, which is specifically determined by the following formulas (10) and (11): QT_HOST = MetaReqCnt*MOR / (MOR + 1) (10)
[0178] QT_GC = MetaReqCnt / (MOR + 1) (11)
[0179] Among them, QT_HOST and QT_GC respectively represent the total quota of the two types of metadata modification requests, namely host write and garbage collection, in this period (the current period).
[0180] When determining that the issuing conditions for a certain type of metadata modification request are met according to the above steps S31 to S33, the number of the first modification requests of this type of metadata that can be issued in the current batch (which can also be understood as this time) in the current period can be determined by, but not limited to, the following formula (12).
[0181] (12)
[0182] That is, issue the number of metadata modification requests according to the remaining quota ratio.
[0183] In this embodiment, by introducing the concepts of the first difference and the first remaining quota, the concurrency control and processing quota allocation mechanism for metadata modification requests is refined. The core lies in using a mathematical model to accurately calculate the first remaining quota ratio based on the maximum concurrency limit and the remaining quotas of various requests. This ratio guides the system to reasonably adjust the number of requests sent for host writing and garbage collection operations on the premise of ensuring that the concurrency does not exceed the upper limit. In this way, not only can the consumption and recovery speed of storage space be dynamically balanced, but also the system resources can be fully utilized to improve CPU utilization and overall operation efficiency. It is especially applicable to the application scenarios of all-flash storage pools with high load and high performance requirements. At the same time, allowing the issuance of multiple batches of metadata modification requests increases the flexibility of the flow control strategy, helps the system to more smoothly handle sudden high-concurrency requests, and ensures the seamless connection of data storage and recovery operations.
[0184] Similarly, it can be but is not limited to the following way to issue the second type of metadata modification requests in the current batch according to the second remaining quota ratio: Determine the difference between the maximum concurrency and the second quantity to obtain the second difference; Determine the product of the second difference and the second remaining quota as the second value, where the second remaining quota is the difference between the second quota and the fifth quantity of the second type of metadata modification requests that have been issued; Determine the ratio of the second value to the total remaining quota as the second remaining quota ratio, where the total remaining quota is the sum of the first remaining quota and the second remaining quota; Issue the second type of metadata modification requests in the current batch according to the second remaining quota ratio.
[0185] For example, assume that the first remaining quota of the first type of metadata modification requests in the current cycle is 2000, the second remaining quota of the first type of metadata modification requests is 1000, the number of the first type of metadata modification requests that have been issued but not completed is 500, the number of the second type of metadata modification requests is 300, and the system maximum concurrency is set to 1000. At this time, the remaining quota of the first type of metadata modification requests is 2000, and the sum of the numbers of the first type and the second type of metadata modification requests that have been issued but not completed is 800, which is less than the maximum concurrency of 1000. The system can issue the first type of metadata modification requests according to a ratio of 2:1 (i.e., the ratio of the first remaining quota to the second remaining quota).
[0186] Another example, if the remaining quota of the first type of metadata modification requests in the current cycle has dropped to 0, the remaining quota of the second type of metadata modification requests is still 1000, and the sum of the numbers of the first type and the second type of metadata modification requests that the system has not completed is 800, which is also less than the maximum concurrency of 1000. At this time, the system can use all the remaining concurrency resources to issue the second type of metadata modification requests to accelerate garbage collection and ensure the security of the storage space.
[0187] By introducing the concepts of the first difference, the first value, the first remaining quota ratio, and the second remaining quota ratio, a dynamic and precise flow control method is realized, effectively balancing the host writes and garbage collection operations in the all-flash storage pool.
[0188] The technical solution of this application calculates the difference between the maximum concurrency and the number of ongoing host write operation requests, ensuring that the system reasonably schedules resources without exceeding the concurrency limit. And by combining the remaining quota and the difference to calculate the ratio of the issued requests, the allocation of the remaining resources is precisely quantified, enabling the system to dynamically adjust the processing rates of host writes and garbage collection requests according to the real-time load conditions.
[0189] For example, if the system detects that the current host write requests are few while the demand for the recycling operation is high, the technical solution in this embodiment can automatically increase the quota of the garbage collection operation to accelerate the cleaning speed of invalid data, and vice versa. This dynamic allocation mechanism not only improves the utilization efficiency of the storage space, but also optimizes the system response time and overall performance, ensuring that in a high-concurrency environment, the storage pool can not only meet the host writing requirements, but also complete the garbage collection task in a timely manner, achieving the dual goals of continuous availability of the storage space and stable and efficient operation of the system.
[0190] In an exemplary embodiment, the above method further includes: the current cycle is a time cycle determined according to a preset time interval; or the time interval corresponding to processing a target number of metadata modification requests is determined as the current cycle.
[0191] In this embodiment, two methods for determining the current time cycle are provided, specifically depending on the system design strategy or performance requirements.
[0192] The first method is based on a preset time interval, and the system periodically performs flow control evaluation and adjustment; the second method is more flexible, taking the time interval corresponding to processing a target number of metadata modification requests as the current cycle, and this method can more precisely respond to real-time business requirements.
[0193] In a specific example, assume that the current cycle is determined based on a preset time interval, and assume that the preset time interval of the all-flash storage pool is 1 minute. The system evaluates the execution of host writes and garbage collection operations at the end of each minute, and then adjusts the processing quotas of the two types of metadata modification requests. For example, at the end of the 1st minute, if the system finds that the space utilization rate has increased too fast, it will increase the quota of the garbage collection operation in the next cycle to balance the space consumption speed.
[0194] In another specific example, it is assumed that the current cycle (current time cycle) is determined based on the number of processed metadata modification requests, and it is assumed that the system sets the target number to 10,000 metadata modification requests. Whenever these 10,000 requests are processed, the system automatically enters the next cycle. Suppose when the system is processing the 10,000th request, it is found that the garbage collection operation lags, resulting in the space utilization rate approaching the threshold. Then at the beginning of the next cycle, the system adjusts the flow control policy to increase the processing speed of garbage collection requests to ensure that the space utilization rate is maintained within a safe range.
[0195] In this embodiment, by introducing a preset time interval or a periodic flow control adjustment mechanism based on the number of processed metadata modification requests, a flexible and efficient flow control management method is provided for the all-flash storage pool. This method can not only regularly evaluate the system status according to the preset time cycle, timely adjust the flow control policy to ensure the stable operation of the system, but also dynamically adjust the time cycle based on the actual number of processed metadata operations, more accurately respond to real-time business requirements, ensure that the host write operation and the garbage collection operation are adjusted as needed, and achieve the optimal balance between space management and IO performance.
[0196] The method of preset time interval is applicable to scenarios where the business requirements are relatively stable or there are clear requirements for the time cycle, which can ensure that the system adjusts the flow control policy within a fixed time cycle and avoid the lag of the flow control policy caused by business fluctuations. The method based on the number of processed metadata modification requests is more suitable for environments with dynamically changing business requirements or high performance requirements, which can ensure that the adjustment of the flow control policy is closely coupled with the business requirements and achieve more refined space management and performance optimization.
[0197] Whether using a preset time interval or based on the processing volume of metadata modification requests, it is possible to achieve real-time monitoring and efficient adjustment of the host write and garbage collection operations. And it can enhance the flexibility of the flow control policy of the all-flash storage pool, ensuring the coordinated optimization of system performance and space management.
[0198] To more clearly understand the above storage space optimization method, the following is combined with Figure 6 the overall schematic diagram shown to further describe it.
[0199] When specifically implementing the flow control algorithm, it mainly involves 4 functional modules, as Figure 6 shown, namely the host write processing module, the metadata module, the garbage collection module, and the space management and data read / write module. Through the interaction processing between these functional modules, the optimization processing of the storage space is realized. Taking the host write request processing flow as an example, the interaction process between several functional modules is described below.
[0200] S41. The host write processing module is responsible for receiving upper-layer write requests, that is, write requests from the host, and submitting the write requests to the space management and data reading / writing module.
[0201] S42. The space management and data reading / writing module aggregates multiple write requests, writes them to the lower layer in sequence, returns the PBA to the host write processing module according to the grain granularity, and counts the space consumption quantity or speed.
[0202] S43. The host write processing module submits modification operation requests such as inserting LP metadata to the metadata module.
[0203] S44. The metadata module calculates the concurrency and ratio of host-class metadata modification requests and garbage collection-class metadata modification requests based on the current MOR, and queues or processes the metadata modification requests.
[0204] S45. When each metadata modification operation is completed, the metadata module updates the completion quantity according to the metadata request type, and processes the metadata modification requests in the queue according to the MOR.
[0205] S46. The metadata module periodically calculates the MORf and MOR values according to the above algorithm.
[0206] That is to say, the MORf and MOR values within each period are dynamically changing, and may be the same or different.
[0207] On the other hand, when the storage pool space utilization rate reaches the threshold, the garbage collection module starts garbage collection, and preferentially submits the valid data in the data blocks with high data inefficiency to the space management and data reading / writing module for data migration. Then, it submits the metadata modification operation request to the metadata module. After completion, it hands over the idle data blocks (BLOCKs) to the space management and data reading / writing module, which is responsible for receiving the idle data blocks and counting the space recovery quantity or speed.
[0208] Through the above embodiments provided by the present application, the following problems in the prior art are solved.
[0209] (1) Balance the space consumption speed and the recovery speed before the storage pool space is exhausted, so that the recovery speed is greater than or equal to the consumption speed, and the space is not exhausted.
[0210] (2) Control the granularity of the host write operation and the garbage collection operation to be as small as possible, and avoid large-scale or periodic blocking of the host write operation, resulting in performance fluctuations or latency fluctuations at the host side.
[0211] (3) Maintain high CPU utilization efficiency, high system and host write performance under the condition of balancing the space consumption speed and the recovery speed.
[0212] That is to say, by establishing the model and control relationship between metadata modification operations and space consumption and recycling speed, the purpose of controlling the space consumption and recycling speed is achieved by controlling the proportion of two types of metadata operations, namely, metadata modification operations related to space consumption and those related to space recycling. Since metadata operations are the finest-grained and the most CPU-consuming link, the technical effect of fine-grained flow control is achieved. By controlling the total concurrency of metadata operations and allowing an appropriate fluctuation range of the proportion of the two types of metadata operations, the purpose of maintaining high CPU utilization efficiency and performance is achieved.
[0213] Combined with the descriptions of the above embodiments, the key points of the technical solution of this application are as follows.
[0214] (1) A method for IO flow control and space balance in an all-flash storage array is provided. The feature is to perform flow control on two types of metadata modification requests generated by host writes and garbage collection, control the processing proportion of the two types of metadata modification requests according to the ratio of the storage pool space consumption speed to the space recycling speed, and realize the adjustment of the storage pool space consumption speed and the space recycling speed. At the same time, a negative feedback mechanism is established to periodically adjust the metadata modification operation proportion according to the actual ratio of the actual storage pool space consumption speed to the space recycling speed.
[0215] (2) Support multi-cycle flow control weighted calculation of metadata regulation ratio, which improves the flexibility of the solution.
[0216] (3) Support adjusting the two types of metadata modification requests within a certain deviation range of MOR during the adjustment period, and issuing another type of metadata modification request exceeding the MOR ratio within a certain deviation range when the load is low and one type of metadata request is empty, which improves the CPU utilization rate.
[0217] Adopting the technical solution in this application has at least the following beneficial effects.
[0218] (1) Accurately control the ratio of space consumption and space recycling speed by performing flow control at the metadata layer.
[0219] (2) Achieve IO-level regulation by controlling the proportion of two types of metadata modification operations (host writes and garbage collection), avoid entering the current limiting state, and make the host IO response time more balanced while exerting the maximum performance of the CPU.
[0220] (3) Establish a periodic negative feedback to adjust the metadata flow control parameters according to the actual value and target value of the ratio of space consumption speed to space recycling speed, realize the rapid approach and achievement of the target value, and the adjustment speed is fast.
[0221] From the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0222] According to another aspect of the embodiments of the present application, an optimization device for storage space is further provided. The schematic structural diagram of the system is as Figure 8 shown, including the following modules: a first acquisition unit 802, configured to acquire the space utilization rate in the all-flash storage pool, where the space utilization rate is the ratio between the used storage space and the total storage space in the all-flash storage pool; a first processing unit 804, configured to, when the space utilization rate reaches the recycling threshold, determine the current metadata operation ratio of the current period based on the target space balance ratio of the current period and the actual space balance ratio of the previous period, where the current metadata operation ratio is the ratio between the number of first metadata operations generated by writing data into the all-flash storage pool and the number of second metadata operations generated by recycling data in the all-flash storage pool during the current period; a second processing unit 806, configured to determine the consumed storage space obtained by writing data and the released storage space obtained by recycling invalid data during the current period based on the current metadata operation ratio.
[0223] For the specific execution steps involved in various calculation processes in the above-mentioned modules and the dynamic optimization of storage space, etc., reference can be made to the description in the above embodiments, and details are not described here again.
[0224] Obviously, the above-mentioned optimization device for storage space can be used to implement the optimization method for storage space provided in the above embodiments, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0225] It should be noted that the first acquisition unit 802 in this embodiment can be used to execute the above step S202, the first processing unit 804 in this embodiment can be used to execute the above step S204, and the second processing unit 806 in this embodiment can be used to execute the above step S206.
[0226] In an exemplary embodiment, the first processing unit 804 includes: a first acquisition module configured to acquire the historical metadata operation ratio of the previous cycle; a first processing module configured to determine a correction coefficient based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle, where the target space balance ratio is the ratio between the space consumption speed and the space release speed within the current cycle, and the actual space balance ratio is the ratio between the actual space consumption speed and the actual space release speed of the previous cycle; a second processing module configured to determine the product of the historical metadata operation ratio and the correction coefficient as the current metadata operation ratio.
[0227] In an exemplary embodiment, the first processing module includes: a first processing sub-module configured to determine the ratio between the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle as the correction coefficient.
[0228] In an exemplary embodiment, the apparatus further includes: a second acquisition unit configured to acquire N metadata operation ratios corresponding to N cycles before the current cycle, where N is a positive integer greater than or equal to 2; a third processing unit configured to perform a weighted sum on the N metadata operation ratios to obtain the current metadata operation ratio of the current cycle.
[0229] In an exemplary embodiment, the first processing unit 804 further includes: a third processing module configured to determine, based on the space utilization rate, the target space balance ratio of the current cycle corresponding to the space utilization rate from the target mapping table; where the target mapping table records the mapping relationship between different space utilization rates and different values of the space balance ratio.
[0230] In an exemplary embodiment, the apparatus further includes: an adjustment unit configured to adjust the historical space balance ratio of the previous cycle based on the space utilization rate and a target threshold to obtain the target space balance ratio of the current cycle.
[0231] In an exemplary embodiment, the adjustment unit includes: a fourth processing module configured to, when the space utilization rate is less than the target threshold, determine the historical space balance ratio as the target space balance ratio, where the value of the target space balance ratio is greater than 1; a fifth processing module configured to, when the space utilization rate is equal to the target threshold, adjust the value of the historical space balance ratio to 1 and determine the adjusted first space balance ratio as the target space balance ratio; a sixth processing module configured to, when the space utilization rate is greater than the target threshold, adjust the value of the historical space balance ratio to be less than 1 and determine the adjusted second space balance ratio as the target space balance ratio.
[0232] In an exemplary embodiment, the second processing unit 806 described above includes: a seventh processing module, configured to determine a first quota for the first type of metadata modification requests and a second quota for the second type of metadata modification requests that are allowed to be processed in the current cycle based on the current metadata operation ratio and the number of metadata modification requests, where the first type of metadata modification requests are modification requests corresponding to writing data to the all-flash storage pool, and the second type of metadata modification requests are modification requests corresponding to reclaiming invalid data in the all-flash storage pool; a distribution module, configured to distribute the first type of metadata modification requests and the second type of metadata modification requests according to the remaining quota ratio when it is determined that the conditions for distributing metadata modification requests are met; an eighth processing module, configured to perform a first type of metadata modification operation with a first number of first metadata operations based on the first type of metadata modification requests, where the first type of metadata modification operations include modification operations generated by writing data to the all-flash storage pool; a ninth processing module, configured to perform a second type of metadata modification operation with a second number of second metadata operations based on the first type of metadata modification requests, where the second type of metadata modification operations include modification operations generated by reclaiming data in the all-flash storage pool; a tenth processing module, configured to determine the consumed storage space obtained by writing data in the current cycle based on the first type of metadata modification operation with the first number of first metadata operations; and determine the released storage space obtained by reclaiming invalid data in the current cycle based on the second type of metadata modification operation with the second number of second metadata operations.
[0233] In an exemplary embodiment, the distribution module described above includes: a distribution sub-module, configured to distribute the current batch of the first type of metadata modification requests according to the first remaining quota ratio when the first remaining quota of the first type of metadata modification requests is greater than 0 and the sum of the first number of the first type of metadata modification requests that have been distributed but not completed and the second number of the second type of metadata modification requests that have been distributed but not completed in the current cycle is less than the maximum concurrency number; a second processing sub-module, configured to distribute the current batch of the second type of metadata modification requests according to the second remaining quota ratio when the second remaining quota of the second type of metadata modification requests is greater than 0 and the sum of the first number and the second number is less than the maximum concurrency number.
[0234] In an exemplary embodiment, the above-mentioned sending module includes: a third processing sub-module, configured to determine the difference between the maximum concurrency and the first quantity to obtain a first difference value; a fourth processing sub-module, configured to determine the product of the first difference value and the first remaining quota as a first numerical value, where the first remaining quota is the difference between the first quota and the third quantity of the first type of metadata modification requests that have been sent, and the first quota represents the first total quantity of the first type of metadata modification requests allowed to be sent in the current period; a fifth processing sub-module, configured to determine the ratio of the first numerical value to the total remaining quota as a first remaining quota ratio, where the total remaining quota is the sum of the first remaining quota and the second remaining quota, and the second remaining quota is the difference between the second quota and the fourth quantity of the second type of metadata modification requests that have been sent, and the second quota represents the second total quantity of the second type of metadata modification requests allowed to be sent in the current period; a sixth processing sub-module, configured to send the current batch of the first type of metadata modification requests according to the first remaining quota ratio, where at least one batch of metadata modification requests is allowed to be sent in the current period.
[0235] In an exemplary embodiment, the above-mentioned device further includes: a fourth processing unit, configured to determine that the current period is a time period determined according to a preset time interval; or determine the time interval corresponding to processing a target quantity of metadata modification requests as the current period.
[0236] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited thereto: the above-mentioned modules are all located in the same processor; or, the above-mentioned various modules are respectively located in different processors in any combination form.
[0237] According to another aspect of the embodiments of the present application, an electronic device is further provided, including a memory 9 and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the optimization method for storage space.
[0238] According to another aspect of the embodiments of the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, where the computer program is configured to execute the steps in any of the above-mentioned embodiments of the optimization method for storage space when running.
[0239] In an exemplary embodiment, the above-mentioned computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs and other various media that can store computer programs.
[0240] According to another aspect of the embodiments of the present application, there is also provided a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above-described embodiments of the storage space optimization method are implemented.
[0241] The embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-described embodiments of the storage space optimization method are implemented.
[0242] Those skilled in the art can further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present application.
[0243] The above has introduced in detail a method for optimizing a storage space provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. An optimization method for storage space, characterized in that: It includes: Obtain the space utilization rate in the all-flash storage pool, where the space utilization rate is the ratio between the used storage space and the total storage space in the all-flash storage pool; When the space utilization rate reaches the recycling threshold, based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle, determine the current metadata operation ratio of the current cycle, where the current metadata operation ratio is the ratio between the number of first metadata operations generated by writing data into the all-flash storage pool and the number of second metadata operations generated by recycling data in the all-flash storage pool during the current cycle; Based on the current metadata operation ratio, determine the consumed storage space obtained by writing data and the released storage space obtained by recycling invalid data during the current cycle.
2. The method according to claim 1, characterized in that When the space utilization rate reaches the recycling threshold, based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle, determining the current metadata operation ratio of the current cycle includes: Obtain the historical metadata operation ratio of the previous cycle; Based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle, determine a correction coefficient, where the target space balance ratio is the ratio between the space consumption speed and the space release speed during the current cycle, and the actual space balance ratio is the ratio between the actual space consumption speed and the actual space release speed of the previous cycle; Determine the product of the historical metadata operation ratio and the correction coefficient as the current metadata operation ratio.
3. The method according to claim 2, characterized in that Based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle, determining the correction coefficient includes: Determine the ratio between the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle as the correction coefficient.
4. The method according to claim 1, characterized in that The method further includes: Obtain N metadata operation ratios corresponding to N cycles before the current cycle, where N is a positive integer greater than or equal to 2; Perform a weighted sum of the N metadata operation ratios to obtain the current metadata operation ratio of the current cycle.
5. The method according to claim 1, characterized in that Before, when the space utilization rate reaches the recycling threshold, based on the target space balance ratio of the current cycle and the actual space balance ratio of the previous cycle, determining the current metadata operation ratio of the current cycle, the method further includes: Based on the space utilization rate, determine the target space balance ratio of the current cycle corresponding to the space utilization rate from the target mapping table; Wherein, the target mapping table records the mapping relationship between different space utilization rates and different values of the space balance ratio.
6. The method according to claim 5, wherein: The method further includes: Based on the space utilization rate and the target threshold, adjusting the historical space balance ratio of the previous cycle to obtain the target space balance ratio of the current cycle.
7. The method according to claim 6, wherein: The adjusting the historical space balance ratio of the previous cycle based on the space utilization rate and the target threshold to obtain the target space balance ratio of the current cycle includes: When the space utilization rate is less than the target threshold, determining the historical space balance ratio as the target space balance ratio, wherein the value of the target space balance ratio is greater than 1; When the space utilization rate is equal to the target threshold, adjusting the value of the historical space balance ratio to 1, and determining the adjusted first space balance ratio as the target space balance ratio; When the space utilization rate is greater than the target threshold, adjusting the value of the historical space balance ratio to be less than 1, and determining the adjusted second space balance ratio as the target space balance ratio.
8. The method according to claim 1, wherein: The determining the consumed storage space obtained by writing data and the released storage space obtained by recycling invalid data in the current cycle based on the current metadata operation ratio includes: Based on the current metadata operation ratio and the number of metadata modification requests, determining a first quota for the first type of metadata modification requests and a second quota for the second type of metadata modification requests that are allowed to be processed in the current cycle, wherein the first type of metadata modification requests are modification requests corresponding to writing data to the all-flash storage pool, and the second type of metadata modification requests are modification requests corresponding to recycling the invalid data in the all-flash storage pool; When it is determined that the condition for issuing metadata modification requests is satisfied, issuing the first type of metadata modification requests and the second type of metadata modification requests according to the remaining quota ratio; Based on the first type of metadata modification requests, performing the first type of metadata modification operations with the first number of metadata operations, wherein the first type of metadata modification operations include modification operations generated by writing data to the all-flash storage pool; Based on the second type of metadata modification requests, performing the second type of metadata modification operations with the second number of metadata operations, wherein the second type of metadata modification operations include modification operations generated by recycling data in the all-flash storage pool; Based on the first type of metadata modification operations with the first number of metadata operations, determining the consumed storage space obtained by writing data in the current cycle; and based on the second type of metadata modification operations with the second number of metadata operations, determining the released storage space obtained by recycling the invalid data in the current cycle.
9. The method according to claim 8, wherein: When it is determined that the conditions for issuing the metadata modification request are met, issuing the first type of metadata modification request and the second type of metadata modification request according to the remaining quota ratio includes: When the first remaining quota of the first type of metadata modification request is greater than 0, and the sum of the first quantity of the first type of metadata modification requests that have been issued but not completed within the current period and the second quantity of the second type of metadata modification requests that have been issued but not completed is less than the maximum concurrency number, issuing the first type of metadata modification requests in the current batch according to the first remaining quota ratio; When the second remaining quota of the second type of metadata modification request is greater than 0, and the sum of the first quantity and the second quantity is less than the maximum concurrency number, issuing the second type of metadata modification requests in the current batch according to the second remaining quota ratio.
10. The method according to claim 9, wherein: Issuing the first type of metadata modification requests in the current batch according to the first remaining quota ratio includes: Determining the difference between the maximum concurrency number and the first quantity to obtain a first difference value; Determining the product of the first difference value and the first remaining quota as a first value, wherein the first remaining quota is the difference between a first quota and the third quantity of the first type of metadata modification requests that have been issued, and the first quota represents the first total quantity of the first type of metadata modification requests allowed to be issued in the current period; Determining the ratio of the first value to the total remaining quota as the first remaining quota ratio, wherein the total remaining quota is the sum of the first remaining quota and the second remaining quota, the second remaining quota is the difference between a second quota and the fourth quantity of the second type of metadata modification requests that have been issued, and the second quota represents the second total quantity of the second type of metadata modification requests allowed to be issued in the current period; Issuing the first type of metadata modification requests in the current batch according to the first remaining quota ratio, wherein at least one batch of metadata modification requests is allowed to be issued in the current period.
11. The method according to any one of claims 1 to 10, wherein: The method further includes: The current period is a time period determined according to a preset time interval; or Determining the time interval corresponding to processing a target quantity of metadata modification requests as the current period.
12. An optimization device for a storage space, wherein: It includes: A first acquisition unit, configured to acquire the space utilization rate in the all-flash storage pool, wherein the space utilization rate is the ratio of the used storage space to the total storage space in the all-flash storage pool; A first processing unit, configured to determine a current metadata operation ratio of the current period based on a target space balance ratio of the current period and an actual space balance ratio of the previous period when the space utilization rate reaches a recycling threshold, where the current metadata operation ratio is a ratio between a first metadata operation count generated by writing data into the all-flash storage pool in the current period and a second metadata operation count generated by recycling data in the all-flash storage pool; A second processing unit, configured to determine a consumed storage space obtained by writing data and a released storage space obtained by recycling invalid data within the current period based on the current metadata operation ratio.
13. An electronic device, characterized in that, Comprising: A memory, configured to store a computer program; A processor, configured to implement the steps of the storage space optimization method according to any one of claims 1 to 11 when executing the computer program.
14. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, where the computer program implements the steps of the storage space optimization method according to any one of claims 1 to 11 when executed by a processor.
15. A computer program product comprising a computer program, characterized in that, The computer program implements the steps of the storage space optimization method according to any one of claims 1 to 11 when executed by a processor.
Citation Information
Patent Citations
Method, device and apparatus for recycling junk data
CN113835628A
Storage space optimization method and device, terminal equipment and storage medium
CN115237354A
Storage management method and device of application program, storage medium and product
CN116028452A
Storage space recovery method and device, storage medium and electronic equipment
CN117608496A
System and Method for Managing Storage Space Usage on a Storage System
US20210373803A1
Cited By
Data space recovery method, electronic equipment and storage medium
CN120491910A
Current limiting method and device of data operation unit, electronic equipment and storage medium
CN120687267A
Current limiting methods, devices, electronic equipment, and storage media for data operation units
CN120687267B