Space resource allocation method and apparatus, and system, storage medium and program product

By learning the target IO access features and write amplification relationship model, local extra space is dynamically allocated, which solves the write amplification problem in a distributed block storage system based on log architecture, and realizes efficient utilization and space optimization of the storage system.

WO2025181560A1PCT designated stage Publication Date: 2025-09-04CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD

Patent Information

Application Number
PCT/IB2025/050137
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-26
Filing Date
2025-01-07
Publication Date
2025-09-04

AI Technical Summary

Technical Problem

In a distributed block storage system based on log architecture, the write amplification problem caused by the garbage collection mechanism leads to waste of storage space and additional space overhead, which requires the overall reduction of write amplification problem.

Method used

By pre-learning the relationship model between the target IO access features, additional space and write amplification, local additional space is dynamically allocated to adapt to the access features of each storage device, and the additional space allocation device is used to optimize the allocation of additional space and reduce write amplification.

Benefits of technology

Overall, the write amplification problem is alleviated, the storage space is wasted, and the efficient utilization of the storage system is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2025050137_04092025_PF_FP_ABST
    Figure IB2025050137_04092025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are a space resource allocation method and apparatus, and a system, a storage medium and a program product. In the embodiments of the present disclosure, for a storage system, a relationship model between target IO access features related to garbage collection, additional spaces and write amplification is pre-learned; and on the basis of the relationship model and respective target IO access features of a plurality of storage devices within a target time period, local additional spaces for garbage collection are allocated to the plurality of storage devices on the basis of a global additional space for garbage collection, which is provided by the storage system. Since a relationship between write amplification and additional spaces is taken into consideration when a local additional space for garbage collection is allocated to each storage device, the problem of write amplification can be alleviated on the whole.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This disclosure claims priority to Chinese patent application number 202410213950.6, filed with the Chinese Patent Office on February 26, 2024, entitled "Space Resource Allocation Method, Apparatus, System, Storage Medium, and Program Product," the entire contents of which are incorporated herein by reference. Technical Field This disclosure relates to the field of cloud computing technology, and more particularly to a space resource allocation method, apparatus, system, storage medium, and program product. Background: In a cloud computing environment, a distributed block storage system can be used to provide storage services to cloud computing users. To improve write performance, distributed block storage systems employ log-structured block devices (LSBDs). These block devices employ an append-write mechanism. That is, when a user writes new data to the same address in a block device, the new data is not overwritten with the expired data at that address. Instead, the new data is appended to the end of all data. In block storage systems using the LSBD architecture, a garbage collection (GC) mechanism is used to reclaim storage space occupied by expired data and recycle it by moving valid data. Moving valid data involves data read and write operations. Compared to user-initiated write operations, these write operations are additional, leading to write amplification. However, for performance reasons, GC operations cannot be performed after every write operation. Instead, they are triggered according to a specific policy, such as when storage space usage reaches a set threshold. This requires additional space to compensate for the temporary storage space occupied by expired data. This additional space is called GC overhead. From the perspective of a single block device, the larger the GC overhead, the less frequent GC operations are triggered, and the lower the write amplification. However, for block storage systems, the overall amount of overhead space used for GC is fixed. Therefore, how to allocate GC overhead space to these block devices to mitigate write amplification is a key issue facing distributed block storage systems. SUMMARY OF THE INVENTION Various aspects of the present disclosure provide a method, apparatus, system, storage medium, and program product for allocating space resources to alleviate the write amplification problem of a storage system.An embodiment of the present disclosure provides a space resource allocation method, comprising: responding to a target event for triggering additional space allocation, determining multiple storage devices currently participating in additional space allocation in a storage system, wherein the storage system provides data storage space for OCR access and global additional space for garbage collection; obtaining target OCR access features corresponding to the multiple storage devices within the target time period based on OCR access data received by the multiple storage devices within a target time period, wherein the target OCR access features refer to OCR access features related to garbage collection; allocating local additional space for garbage collection to the multiple storage devices based on the target OCR access features corresponding to the multiple storage devices within the target time period, pre-learned target OCR access features, a relationship model between additional space and write amplification, and the global additional space. An embodiment of the present disclosure further provides a storage system, comprising: multiple storage devices and a space resource allocation device carried on at least one physical machine, the multiple storage devices jointly providing data storage space for IO access and a global extra space for garbage collection; wherein the space resource allocation device comprises: a determination module for determining, in response to a target time for triggering extra space allocation, multiple storage devices currently participating in extra space allocation in the storage system, the storage system providing data storage space for IO access and a global extra space for garbage collection; a first acquisition module for acquiring, based on IO access data received by the multiple storage devices within a target time period, target IO access features corresponding to the multiple storage devices within a target time period, the target IO access features referring to IO access features related to garbage collection; an allocation module for allocating local extra space for garbage collection to the multiple storage devices based on the target IO access features corresponding to the multiple storage devices within the target time period, pre-learned target IO access features, a relationship model between extra space and write amplification, and the global extra space. Embodiments of the present disclosure further provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement the steps of the above-described method. Embodiments of the present disclosure further provide a computer program product. The computer program product includes a computer program / instructions. When the computer program / instructions is executed by a processor, the processor is enabled to implement the steps of the above-described method embodiments.In an embodiment of the present disclosure, a relationship model between target 10 access characteristics, extra space, and write amplification related to garbage collection is pre-learned for a storage system. Based on this relationship model, local extra space for garbage collection is allocated to multiple storage devices from the global extra space provided by the storage system, according to the target 10 access characteristics of each storage device within a target time period. Because the relationship between write amplification and extra space is considered when allocating local extra space for garbage collection to each storage device, the overall write amplification problem can be alleviated. BRIEF DESCRIPTION OF THE DRAWINGS The drawings described herein are provided to provide a further understanding of the present disclosure and constitute a part of this disclosure. The illustrative embodiments of this disclosure and their description are provided to explain the present disclosure and are not intended to unduly limit the present disclosure. In the accompanying drawings: Figure 1a is a schematic diagram of the structure of a storage system provided by an exemplary embodiment of the present disclosure; Figure 1b is a schematic diagram of the structure of a storage system provided by another exemplary embodiment of the present disclosure; Figure 2 is a schematic diagram of the construction process of a relationship model construction device provided by an exemplary embodiment of the present disclosure; Figure 3 is a schematic diagram of the structure of a storage system provided by yet another exemplary embodiment of the present disclosure; Figure 4 is a schematic diagram of the structure of a space resource allocation device provided by yet another exemplary embodiment of the present disclosure; Figure 5 is a schematic diagram of the structure of a relationship construction device provided by yet another exemplary embodiment of the present disclosure; Figure 6 is a flowchart of a space resource allocation method provided by an exemplary embodiment of the present disclosure; and Figure 7 is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS To further clarify the objectives, technical solutions, and advantages of the present disclosure, the technical solutions of the present disclosure will be described clearly and completely below in conjunction with the specific embodiments of the present disclosure and the corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present disclosure, and are not exhaustive. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present disclosure without inventive effort are within the scope of protection of the present disclosure. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display) involved in this disclosure are all authorized by the user or fully authorized by all parties. The collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or deny. In addition, the various models involved in this disclosure (including but not limited to language models and large models) comply with relevant laws and standards. In the embodiments of this disclosure, a data processing method is provided for storage systems to address the write amplification problem faced by storage systems.In the embodiments of the present disclosure, the implementation method of the storage system is not limited. For example, the storage system can be a distributed storage system, but is not limited thereto. Furthermore, the storage system can employ a log-structured block storage system or a log-structured file system (LSF). This disclosure does not impose any restrictions on this. Any log-structured storage system is applicable to the embodiments of the present disclosure. Both log-structured file systems and log-structured block storage systems employ log-structured strategies to optimize write operations. The core concept of log-structured file systems is to convert random writes into sequential writes to improve write performance. Log-structured file systems reduce random writes by treating the entire disk as an append-only log file. Each written data is sequentially appended to the end of the log file. In other words, log-structured file systems do not overwrite existing data, but instead append written data to a new location on the disk. In distributed storage systems based on a log architecture, garbage collection (GC) mechanisms are used to reclaim storage space occupied by expired data. From a user's perspective, the ideal GC strategy is to trigger GC immediately after each write operation, ensuring maximum available storage space. However, this can introduce significant write amplification. Therefore, cloud service providers use specific strategies to trigger GC. These strategies reduce the frequency of GC triggering, thereby mitigating the write amplification problem. However, in some cases, reducing the frequency of GC triggering can lead to delayed GC operations. This can result in expired data remaining in the user's storage space, resulting in wasted storage space. To address this waste of user storage space, additional space overhead is required to compensate for the wasted storage space occupied by expired data due to delayed GC operations, thereby balancing user storage space utilization and write amplification. In the disclosed embodiments, this "extra space overhead" is collectively referred to as "extra space." To address the write amplification problem faced by storage systems, embodiments of the present disclosure pre-learn a relationship model for the storage system among target GC-related I / O (Input / Output) access characteristics, extra space, and write amplification. Based on this relationship model, local extra space for garbage collection is allocated to multiple storage devices from the global extra space provided by the storage system based on the target I / O access characteristics of each storage device within a target time period.Because the relationship between write amplification and extra space is taken into account when allocating local extra space for garbage collection to each storage device, the overall write amplification problem can be alleviated. The following, in conjunction with the accompanying drawings, details the technical solutions provided by various embodiments of the present disclosure. Figure 1a is a schematic diagram of the structure of a storage system provided by an exemplary embodiment of the present disclosure. Optionally, the storage system 100 can be used in a cloud computing environment to provide storage services to cloud computing users. As shown in Figure 1, the storage system 100 includes multiple storage devices 102 hosted on at least one physical machine 101. Physical machine 101 can be any device with storage resources and certain computing resources, such as a terminal device such as a computer, laptop, or tablet computer, or a server device such as a conventional server, server cluster, or server array. It can also be any physical storage device. A physical machine 101 can host one or more storage devices 102. Storage devices 102 are logically conceptual devices, and their specific implementation varies depending on the storage technology used by the storage system. For example, if the storage system uses block storage technology, storage devices 102 are implemented as block devices. Furthermore, storage devices 102 can be dynamically created or destroyed based on application or user needs. Specifically, when a user purchases a new storage device, a new storage device can be created. Alternatively, when an application's current storage devices are insufficient, a new storage device can be created for the application. In the embodiment of the present disclosure, physical machine 101 mounts a certain number of physical storage media, such as disks, HDDs (Hard Disk Drives) and / or SSDs (Solid-state Drives), SRAMs (Static Random-Access Memory), and EEPROMs (Electrically Erasable Programmable Read-Only Memory). This is not a limitation of the present disclosure. When physical machine 101 mounts a certain number of physical storage media, the storage space provided by these physical storage media is fixed, which in turn determines the storage space provided by the overall operating system.In this embodiment, the fixed storage space provided by the entire storage system is divided into two categories: data storage space, used to store user data; and global extra space, used for garbage collection. These storage spaces are ultimately provided by multiple storage devices 102 hosted on at least one physical machine 101. Specifically, multiple storage devices 102 collectively provide data storage space accessible by the system and global extra space for garbage collection. In this embodiment, the extra space used for garbage collection by the entire storage system is referred to as global extra space. This global extra space is ultimately allocated to each storage device, and the extra space allocated to each storage device 102 is referred to as local extra space. The storage space provided by each storage device 102 includes both local extra space and data storage space. In this embodiment, the storage system is based on a log architecture, so data is written in an append-only manner, forming a continuously growing log file. This architecture improves write performance but also causes data failure, resulting in garbage generation. When data is updated, old data is not removed; instead, new log files are appended to achieve the update. Over time, a large amount of failed data accumulates in the storage system. Therefore, in distributed storage systems based on log architectures, garbage collection mechanisms are used to reclaim storage space occupied by expired data. From a user's perspective, the ideal garbage collection strategy is to trigger GC immediately after each write operation, ensuring maximum available storage space. However, this can introduce significant write amplification. Therefore, cloud service providers use specific strategies to trigger GC. These strategies reduce the frequency of GC triggers, thereby mitigating the write amplification problem. However, in some cases, reducing the frequency of GC triggering can lead to delayed GC operations. This results in expired data remaining in the user's storage space, resulting in wasted storage space. To address this waste of user storage space, additional space overhead is required to compensate for the wasted storage space occupied by expired data due to delayed GC operations, thus striking a balance between user storage space utilization and write amplification. For example, if a user requests 1 terabyte (a unit of electronic storage) of C storage space, the system will allocate 1 terabyte (1TB) plus 0.2 terabyte (0.2TB) of storage space to the user. The 0.2 terabyte (0.2TB) of storage space is used to compensate for the storage space occupied by expired data due to delayed garbage collection (GC). In this embodiment, the 0.2TB of space is the "local excess space."In practical applications, extra space does affect write amplification. The larger the extra space, the less frequently GC operations are triggered, and the smaller the write amplification. However, the global extra space used for garbage collection in the entire storage system is fixed. Therefore, it is necessary to rationally allocate extra space across different storage devices to minimize the overall write amplification of the storage system. To achieve the above objectives, in the disclosed embodiments, a relationship model between target 10 access characteristics, extra space, and write amplification is pre-learned. Furthermore, a space resource allocation device 103 is added to the storage system. Based on the pre-learned relationship model between target 10 access characteristics, extra space, and write amplification, the space resource allocation device 103 allocates extra space among different storage devices, ensuring that the local extra space allocated to each storage device is compatible with its target 10 access characteristics. This avoids wasting extra space and prevents excessive write amplification in the storage system due to small extra space. A machine learning model is used to predict the write amplification of different storage devices under their corresponding target 10 access characteristics and with different extra space. An optimization solution (e.g., gradient projection descent) is then used to calculate the optimal allocation of local extra space under these target 10 access characteristics, minimizing the overall write amplification of the storage system while maintaining the global extra space. Furthermore, the local extra space allocated to storage devices is not allocated proportionally based on the size of the storage devices, nor is the local extra space of different storage devices proportional to their size. Instead, the local extra space allocated to each storage device is adapted to its target 10 access characteristics. Specifically, the space resource allocation device 103 is used to: respond to a target event for triggering additional space allocation, determine multiple storage devices 102 currently participating in the additional space allocation in the storage system 100, and the storage system 100 provides data storage space for 10 access and global additional space for garbage collection; obtain target 10 access features corresponding to the multiple storage devices 102 within the target time period based on the 10 access data received by the multiple storage devices 102 within the target time period, and the target 10 access features refer to 10 access features related to garbage collection; allocate local additional space for garbage collection to the multiple storage devices 102 based on the target 10 access features corresponding to the multiple storage devices 102 within the target time period, the pre-learned target 10 access features, the relationship model between additional space and write amplification, and the global additional space.It should be noted that in the disclosed embodiment, the size of the local extra space allocated to different storage devices 102 may be different or the same. This size is determined based on the target 10 access characteristics of each storage device 102 during a target time period, and is not proportionally allocated based on the size of the data storage space allocated to each storage device 102. It should be noted that, as shown in Figures 1a-1b, the space resource allocation device 103 points to each storage device 102, indicating that the local extra space is allocated to each storage device 102. Furthermore, in the disclosed embodiment, the deployment and implementation of the space resource allocation device 103 is not limited. The space resource allocation device 103 may be deployed on each physical machine 101, on any physical machine 101, or on other devices, as long as they are interconnected and communicate with each storage device 102. In this embodiment, the operation of allocating extra space to each storage device 102 is triggered by an event, and the event used to trigger the extra space allocation is referred to as a target event. These target events can be any event that may cause the reallocation of additional storage space. For example, a target event can be a change in the storage device 102, such as the creation / destruction of a storage device. Alternatively, a target event can be the expiration of a preset additional space allocation period. For example, if the additional space allocation period is set to one hour, the target event is the moment when the one-hour period expires. Alternatively, a target event can be a change in the load pattern corresponding to the storage system, that is, a change in the access pattern of applications using the storage device. Different application scenarios correspond to different access patterns. Optionally, the target event can be any one or a combination of the above-mentioned events. Furthermore, the storage system can be configured to monitor target events. The specific method for implementing target event monitoring in the storage system is not limited and can be, for example, an operating system tool, monitoring software, or a custom script. The specific implementation method for monitoring target events will vary depending on the target event. If the target event is a change in the number of storage devices, then the creation / destruction events of storage devices can be monitored. If the target event is the arrival of a preset extra space allocation period, then the extra space allocation period can be monitored. If the target event is a change in the I / O access pattern of an application using the storage device, then the I / O operations of the application can be monitored, and the I / O access pattern can be determined based on the I / O operations, and further, whether the I / O access pattern has changed can be determined. In this embodiment, the target time period is a time period of a set duration, and is used to collect recent I / O access feature data of the storage device and to generate statistics on the target I / O access features of the storage device.Alternatively, the range can be the last week, the last hour, the last half hour, etc., and can be set as needed. In this embodiment, the I / O access data comes from applications using the storage device 102. These applications can be deployed in virtualized instances such as VMs (Virtual Machines) and containers, or in various terminal devices, servers, cloud servers, server clusters, etc., without limitation. There is also no limitation on the type of application in the storage device 102, such as video applications, streaming computing applications, e-commerce applications, etc. In actual applications, based on the I / O access data received by multiple storage devices 102 within a target time period, various I / O access features corresponding to the multiple storage devices 102 within the target time period can be obtained. In the disclosed embodiment, I / O access features related to garbage collection are referred to as target I / O access features. Examples of target I / O access features can be found in the subsequent embodiments. The present disclosure does not limit the implementation method or implementation manner of allocating local extra space. Two exemplary implementation manners are provided below. In an optional embodiment A1, when allocating local extra space for garbage collection to multiple storage devices based on target 10 access characteristics corresponding to each of the multiple storage devices, a pre-learned target 10 access characteristics, a relationship model between extra space and write amplification, and the global extra space, the target 10 access characteristics corresponding to each of the multiple storage devices are specifically modeled based on the pre-learned target 10 access characteristics and the relationship model between extra space and write amplification to obtain an objective function. When modeling the target 10 access features corresponding to each of the multiple storage devices, the target 10 access features corresponding to each of the multiple storage devices are modeled based on a pre-learned relationship model between the target 10 access features, extra space, and write amplification, thereby obtaining a write amplification representation function corresponding to each of the multiple storage devices. The objective function is generated based on the write amplification representation functions corresponding to the multiple storage devices. Optionally, the write amplification representation functions corresponding to the multiple storage devices can be directly summed, weighted summed, or calculated using other calculation methods (such as multiplication or integration) to obtain the objective function. It is noted that any method of obtaining the objective function based on the write amplification representation function is applicable to the embodiments of the present disclosure. The write amplification representation function uses the write amplification of the corresponding storage device as a dependent variable and the size of the local extra space required to be allocated to the corresponding storage device as an independent variable. In one example, an access feature vector y is constructed based on the target access features of the i-th storage device, with the local extra space required to be allocated to the i-th storage device being the first element. The write amplification representation ratio of the i-th storage device, specifically denoted as y, can then be obtained. £= / (% £ , / i £ ); store the i-th item in the target time period The extra space size is denoted as S, the local extra space that needs to be allocated to the i-th storage device is denoted as S, and the space range is set as It should be noted that the aforementioned IO access features can all be statistically derived from IO access data. Specifically, when performing an IO operation, a storage device outputs a piece of IO access data (or operation record) including the access time, access operation (read or write), access address, and access length. The IO access data or operation record output by a storage device over a period of time constitutes an IO access dataset corresponding to the storage device. The operation records generated by multiple storage devices in a storage system during a target time period constitute an IO access dataset for the entire storage system. In the embodiments of the present disclosure, for ease of distinction and description, the IO access data generated by these storage devices during the target time period is referred to as target IO access data. The IO access data generated by these storage devices during the target time period can form a target IO access dataset, and at least one target IO access feature can be statistically derived based on this target IO access data. The following is an example of the statistical process of various 10 access features listed in Table 1: First 10 access feature: Filter out operation records in which the access operation is a write operation from the target 10 access data, count the number of writes to the corresponding storage units based on the access addresses in these operation records, and further count the number of storage units whose write times exceed a preset number within the target time period; obtain the access address and access length of each operation record from the target 10 access data, the access address plus the access length equals the storage units covered by this access, further count the access addresses and access lengths of all operation records in the target 10 access data, and based on this, the number of all storage units accessed within the target time period can be obtained; the ratio of the number of storage units whose write times exceed a preset number within the target time period to the number of all storage units accessed within the target time period is the first 10 access feature. The second 10 access feature is as follows: Operation records in which the access operation is a write operation are filtered out from the target 10 access data. The access address and access length of each operation record are obtained from these operation records. The range of storage units covered by each write operation is recorded. The number of writes to each storage unit is further counted based on all operation records. If the number of writes is greater than one, the remaining writes are overwrites. The number of operation records in which the access operation is a write operation in the target 10 access data is the total number of writes that occurred within the target time period. The ratio of the number of overwrites that occurred for storage units with existing data within the target time period to the total number of writes that occurred within the target time period is the second 10 access feature.The third access feature is as follows: operation records in which the access operation is a write operation are filtered out from the target 10 access data. The access address and access length of each operation record are obtained from these operation records. The range of storage units covered by each write operation is recorded. The number of writes to each storage unit is further counted based on all operation records. The storage units are sorted from largest to smallest according to the number of writes, and the sum of the number of writes to the first N storage units is calculated. The number of operation records in which the access operation is a write operation in the target 10 access data is the total number of writes that occurred within the target time period. The ratio of the sum of the number of writes to the N storage units with the most writes within the target time period to the total number of writes that occurred within the target time period is the third access feature. Fourth access feature: Filter out operation records where the target access data contains write operations. It is necessary to distinguish which write operations are sequential write operations. Sequential writes refer to consecutive write operations where the access address immediately follows the address of the previous write operation. Specifically, the starting address (access address) of the current write operation can be compared with the ending address (access address plus access length) of the previous write operation to determine whether the write is sequential. The total number of sequential writes can then be calculated. The number of operation records where the access operation is write in the target access data contains the total number of writes occurring within the target time period. The ratio of the number of sequential write operations occurring within the target time period to the number of all access operations occurring within the target time period contains the fourth access feature. Fifth access feature: Filter out operation records where the access operation is write from the target access data. Further, filter out sequential write operation records from these operation records. Calculate the length of the addresses written by each consecutive sequential write operation. The maximum length is selected as the fifth access feature. Sixth access feature: Filter out operation records where the access operation is a write operation from the target 10 access data. Further, filter out sequential write operation records from these operation records. Calculate the length of the addresses written by each consecutive sequential write operation. The average value is then calculated to obtain the sixth access feature. Seventh access feature: Filter out operation records where the access operation is a write operation from the target 10 access data. Obtain the access address and access length of each operation record from these operation records. Record the range of storage cells covered by each write operation. Further, count the number of writes to each storage cell based on all operation records. If the number is greater than one, the storage cell is considered an overwritten storage cell. Multiply the number of overwrites for each overwritten storage cell by the size of the storage cell to obtain the write traffic for the overwritten storage cell. The average value of the write traffic is then calculated as the statistical feature, which is the seventh access feature.Eighth access feature 10: Filter out operation records in which the access operation is a write operation from the target 10 access data. From these operation records, obtain the access address and access length of each operation record. Record the range of storage cells covered by each write operation, and then determine the range of storage cells covered by all write operations. Write operations may have overlapping address ranges. To calculate the total address space size written, remove these overlapping address ranges. The total address space size obtained is the eighth access feature 10. Ninth access feature 10: Filter out operation records in which the access operation is a write operation from the target 10 access data. From these operation records, obtain the access address and access length of each operation record. Record the range of storage cells covered by each write operation, and then determine the number of storage cells covered by all write operations. To calculate the total address space size written, remove overlapping address ranges from the range of storage cells covered by all write operations to obtain the total address space size. The ratio of the number of storage cells written during the target time period to the total address length of the written storage cells is the ninth access feature 10. In various embodiments of the present disclosure, a pre-learned relationship model between target IQ access features, extra space, and write amplification is relied upon. This disclosure does not limit the learning method for this relationship model. In an optional embodiment, as shown in FIG1b , to construct a relationship model, the storage system further includes a relationship model construction device. The relationship model construction device includes the following functions: collecting historical IQ access data; extracting IQ access features; replaying and processing historical target IQ access data; and performing regression analysis. The following describes the specific contents of each function: Collect historical 10 access data: At a historical moment, collect the historical 10 access data (target historical 10 access data) received by multiple historical storage devices in the storage system during the historical time period; Extract 10 access features: Based on the historical 10 access data (target historical 10 access data) received by multiple historical storage devices during the historical time period, obtain the target 10 access features corresponding to the multiple historical storage devices during the historical time period; Replay processing of target historical 10 access data: Under different local extra space, replay processing is performed on the historical 10 access data (target historical 10 access data) received by multiple historical storage devices during the historical period to obtain the write amplification values ​​of the multiple historical storage devices under different local extra space; Regression analysis: Regression analysis is performed on the write amplification values ​​of multiple historical storage devices under different local extra space and the corresponding target 10 access features during the historical time period to obtain a relationship model between target 10 access features, extra space, and write amplification.The various functions of the relationship model construction device cooperate with each other to jointly complete the construction of the relationship model. The specific construction process is shown in Figure 2. Historical 10 access data is collected to obtain target historical 10 access data T. Target 10 access features T are extracted from the target historical 10 access data. The target historical 10 access data is replayed to obtain write amplification values ​​T under different local extra space conditions. Regression analysis is performed based on the target 10 access features and the write amplification values ​​under different local extra space conditions to obtain the relationship model. The order of extracting 10 access features and replaying is not restricted. In this embodiment, the historical time period is the period before the historical moment, which can be the last day or the last hour, etc., and this disclosure does not impose any restrictions on this. In this embodiment, the replay process can be simulated by replaying the storage system using simulation software, or it can be directly replayed during idle time periods (such as nighttime) when the storage system is idle, and this disclosure does not impose any restrictions on this. Simulation provides a risk-free testing environment, allowing playback processing without impacting normal applications and posing no risk to the actual storage system. Regression processing performed directly in the storage system during idle periods can yield test results that are closest to those in a real-world environment. In a real-world environment, the regression processing method can be appropriately selected based on specific needs. To ensure the accuracy of the relationship model prediction, in an optional embodiment, the relationship model between the access characteristics of target 10, extra space, and write amplification is updated periodically or upon the occurrence of a predetermined trigger event. This predetermined trigger event is distinct from the target event; it refers to an event that affects the relationship model, such as various events that may cause changes in the access characteristics of target 10, changes in the storage system architecture or the storage system's application scenario, or changes in the number of different extra spaces used to generate the relationship model. In a cloud computing scenario, the storage system of the embodiment of the present disclosure can be specifically implemented as a distributed storage system. The distributed storage system adopts block devices based on a log architecture. As shown in FIG3 , the storage system 300 includes: a block device cluster; the block device cluster includes multiple block devices 302 hosted on at least one physical machine 301. Optionally, multiple VMs can be virtualized on the physical machine 301 based on virtualization technology. An application is deployed in each VM, and the application reads and stores data on the block device 302 corresponding to the VM.It is noted that VMs can be deployed on physical machines 301 within storage system 300 or on other electronic devices outside of storage system 300, without limitation. When VMs are deployed on other electronic devices outside of storage system 300, these VMs are interconnected with the storage devices via a network. In this embodiment, multiple block devices 302 collectively provide data storage space for IO access and global extra space for garbage collection within storage system 300. Furthermore, storage system 300 also includes a space resource allocation device 103 and a relationship model construction device 104. Optionally, space resource allocation device 103 is located within the block device cluster, while relationship model construction device 104 is located outside the block device cluster. Of course, relationship model construction device 104 can also be located within the block device cluster, without limitation in this disclosure. It should be noted that, as shown in FIG. 3 , space resource allocation device 103 points to each block device 302, indicating that the space resource allocation device allocates local extra space to each block device 302. In this embodiment, the relationship model construction device 104 pre-learns a relationship model between target I / O access characteristics, extra space, and write amplification, and provides this relationship model to the space resource allocation device 103. The process of pre-learning the relationship model between target I / O access characteristics, extra space, and write amplification can be found in the description of the previous embodiment and will not be repeated here. In response to a target event triggering extra space allocation, the space resource allocation device 103 determines the multiple block devices in the storage system currently participating in the extra space allocation and collects target I / O access data received by the multiple block devices within a target time period. Specifically, an I / O access request sent by each VM to a block device reaches the backend block device via the tap device connector (TDC) within the VM. The block device is responsible for performing I / O operations on the I / O access request, such as writing or reading data from the block device's data storage space. During the I / O operation, each block device 302 outputs an additional operation record, i.e., I / O access data, including the access time, access operation (read or write), access address, and access length. The space resource allocation device 103 collects operation records of multiple block devices 302 in the storage system within a target time period, namely, target 10 access data; based on the target 10 access data, the target 10 access characteristics corresponding to the multiple block devices 302 within the target time period are obtained. The specific implementation method of obtaining the target access characteristics can be referred to the aforementioned embodiment and will not be repeated here.Furthermore, the space resource allocation device 103 also obtains the relationship model between the target 10 access feature, the extra space, and write amplification pre-learned by the relationship model building device 104, and models the target 10 access feature corresponding to each of the multiple block devices 302 based on the pre-learned relationship model between the target 10 access feature, the extra space, and write amplification, to obtain a write amplification characterization function corresponding to each of the multiple block devices 302. The write amplification characterization functions corresponding to each of the multiple block devices 302 are directly summed to obtain a target function. The target function is optimized and solved with minimizing the global write amplification as the optimization goal, using the constraints that the sum of the sizes of the local extra space allocated to each of the multiple block devices 302 is less than or equal to the size of the global extra space and that the sizes of the local extra space allocated to each of the multiple block devices 302 are within a set space range. The target function is optimized and solved to obtain the size of the local extra space allocated to each of the multiple block devices 302. Furthermore, based on the sizes of the local extra space allocated to each of the multiple block devices 302, local extra space for garbage collection is allocated to the multiple block devices 302. In this embodiment, the detailed implementation of the relevant operations is described in the previous embodiment and will not be repeated here. It should be noted that in this embodiment, the storage system further includes a garbage collection module for performing garbage collection on each storage device based on the local extra space allocated to each storage device when a predetermined triggering event for garbage collection occurs. In this embodiment, the available space provided by the storage device to users includes data storage space and local extra space, and user data can be written to the available space in an appended manner. Therefore, if the event triggering garbage collection is the space utilization reaching a predetermined utilization threshold, then for any storage device, when the overall utilization of the user-provided data storage space and the allocated local extra space reaches the predetermined utilization threshold, the garbage collection module can initiate a garbage collection operation for that storage device. This operation involves clearing invalid data from all spaces and moving valid data to contiguous space to free up more available contiguous storage space. It should be noted that in the embodiments of the present disclosure, the implementation methods of the garbage collection module and the space resource allocation device are not limited. Optionally, the space resource allocation device can be integrated into the garbage collection module for implementation, or can be implemented independently of the garbage collection module and provide additional space allocation services for the garbage collection module.The present disclosure does not limit the implementation structure of the space resource allocation device. As shown in FIG4 , an exemplary internal implementation structure includes: a determination module 41, a first acquisition module 42, and an allocation module 43; the determination module 41 is configured to determine, in response to a target time for triggering additional space allocation, multiple storage devices currently participating in additional space allocation in the storage system, wherein the storage system provides data storage space for I / O access and global additional space for garbage collection; the acquisition module 42 is configured to acquire, based on I / O access data received by the multiple storage devices within the target time period, target I / O access features corresponding to the multiple storage devices within the target time period, wherein the target I / O access features refer to I / O access features related to garbage collection; and the allocation module 43 is configured to allocate local additional space for garbage collection to the multiple storage devices based on the target I / O access features corresponding to the multiple storage devices within the target time period, pre-learned target I / O access features, a relationship model between additional space and write amplification, and the global additional space. In an optional embodiment, when allocating local extra space for garbage collection to the multiple storage devices based on the target 10 access characteristics corresponding to each of the multiple storage devices, the pre-learned target 10 access characteristics, the relationship model between extra space and write amplification, and the global extra space, the allocation module 43 is specifically configured to: model the target 10 access characteristics corresponding to each of the multiple storage devices based on the pre-learned target 10 access characteristics and the relationship model between extra space and write amplification to obtain an objective function; use the global write amplification corresponding to the multiple storage devices as an optimization objective in the objective function and the size of the local extra space to be allocated to each of the multiple storage devices as a desired variable; construct a constraint condition based on the size of the global extra space, and optimize and solve the objective function to obtain the size of the local extra space allocated to each of the multiple storage devices; and allocate the local extra space for garbage collection to the multiple storage devices based on the size of the local extra space allocated to each of the multiple storage devices.In an optional embodiment, when modeling the target 10 access characteristics corresponding to each of the multiple storage devices based on a pre-learned relationship model between the target 10 access characteristics, the extra space, and write amplification to obtain an objective function, the allocation module 43 is specifically configured to: model the target 10 access characteristics corresponding to each of the multiple storage devices based on the pre-learned relationship model between the target 10 access characteristics, the extra space, and write amplification to obtain a write amplification characterization function corresponding to each of the multiple storage devices; and generate the objective function based on the write amplification characterization function corresponding to each of the multiple storage devices; wherein the write amplification characterization function uses the write amplification of the corresponding storage device as a dependent variable and the size of the local extra space required to be allocated to the corresponding storage device as an independent variable. In an optional embodiment, when constructing a constraint condition based on the size of the global extra space, the allocation module 43 is specifically configured to: use as the constraint conditions that the sum of the sizes of the local extra space allocated to each of the multiple storage devices is less than or equal to the size of the global extra space, and that the size of the local extra space allocated to each of the multiple storage devices is within a set space range. In an optional embodiment, when constituting a constraint condition based on the size of the global extra space and optimizing and solving the objective function to obtain the size of the local extra space allocated to each of the multiple storage devices, the allocation module 43 is specifically configured to: construct a constraint condition based on the size of the global extra space, optimize and solve the objective function with minimizing the global write amplification as the optimization objective, to obtain the size of the local extra space allocated to each of the multiple storage devices. In an optional embodiment, when acquiring target I / O access features corresponding to each of the multiple storage devices based on I / O access data received by the multiple storage devices within a target time period, the acquisition module 42 is specifically configured to: for each storage device, based on the I / O access data received by the storage device within the target time period, calculate at least one I / O access feature in Table 1 as the target I / O access feature.Accordingly, the present disclosure does not limit the internal implementation structure of the relationship model construction device. As shown in FIG5 , an exemplary internal implementation structure includes: a collection module 51, a second acquisition module 52, a playback module 53, and a construction module 54. The collection module 51 is configured to collect, at a historical moment, historical I0 access data received by multiple historical storage devices in the storage system at that time within a historical time period. The second acquisition module 52 is configured to obtain, based on the historical I0 access data received by the multiple historical storage devices within the historical time period, target I0 access features corresponding to the multiple historical storage devices within the historical time period. The playback module 53 is configured to replay the historical I0 access data received by the multiple historical storage devices within the historical time period in different local extra spaces to obtain write amplification values ​​of the multiple historical storage devices in different local extra spaces. The construction module 54 is configured to perform regression analysis on the write amplification values ​​of the multiple historical storage devices in different local extra spaces and the corresponding target I0 access features within the historical time period to obtain a relationship model between the target I0 access features, extra space, and write amplification. In the embodiment of the present disclosure, the first acquisition module 42 and the second acquisition module 52 may be the same module or different modules, and the present disclosure does not limit this. FIG6 is a flowchart of a spatial resource allocation method provided in an exemplary embodiment of the present disclosure. As shown in FIG6, the method includes:

[0002] S601: In response to a target event for triggering extra space allocation, multiple storage devices currently participating in extra space allocation in a storage system are determined, and the storage system provides data storage space for IO access and global extra space for garbage collection;

[0003] S602: Obtain target I / O access features corresponding to the multiple storage devices within the target time period based on I / O access data received by the multiple storage devices within the target time period, where the target I / O access features refer to I / O access features related to garbage collection.

[0004] S603: Allocate local extra space for garbage collection to the multiple storage devices according to target I0 access features corresponding to the multiple storage devices in the target time period, pre-learned target I0 access features, a relationship model between extra space and write amplification, and the global extra space. In an optional embodiment, allocating local extra space for garbage collection to the multiple storage devices based on target 10 access features corresponding to each of the multiple storage devices, a pre-learned target 10 access features, a relationship model between extra space and write amplification, and the global extra space includes: modeling the target 10 access features corresponding to each of the multiple storage devices based on the pre-learned target 10 access features and the relationship model between extra space and write amplification to obtain an objective function; using the global write amplification corresponding to the multiple storage devices as an optimization objective in the objective function and the size of the local extra space to be allocated to each of the multiple storage devices as a desired quantity; constructing a constraint condition based on the size of the global extra space, and optimizing and solving the objective function to obtain the size of the local extra space allocated to each of the multiple storage devices; and allocating local extra space for garbage collection to the multiple storage devices based on the size of the local extra space allocated to each of the multiple storage devices. In an optional embodiment, modeling the target 10 access features corresponding to each of the multiple storage devices based on a pre-learned relationship model between target 10 access features, extra space, and write amplification to obtain an objective function includes: modeling the target 10 access features corresponding to each of the multiple storage devices based on the pre-learned relationship model between target 10 access features, extra space, and write amplification to obtain a write amplification characterization function corresponding to each of the multiple storage devices; and generating the objective function based on the write amplification characterization function corresponding to each of the multiple storage devices; wherein the write amplification characterization function uses the write amplification of the corresponding storage device as a dependent variable and the size of the local extra space required to be allocated to the corresponding storage device as an independent variable. In an optional embodiment, constituting a constraint condition based on the size of the global extra space includes: using as the constraint conditions the sum of the sizes of the local extra space allocated to each of the multiple storage devices being less than or equal to the size of the global extra space, and the size of the local extra space allocated to each of the multiple storage devices being within a set space range.In an optional embodiment, constituting a constraint condition based on the size of the global extra space and optimizing and solving the objective function to obtain the size of the local extra space allocated to each of the multiple storage devices includes: constituting a constraint condition based on the size of the global extra space, optimizing and solving the objective function with minimizing the global write amplification as the optimization goal to obtain the size of the local extra space allocated to each of the multiple storage devices. In an optional embodiment, the target event includes at least one of the following: a change in the number of storage devices; the expiration of a preset extra space allocation period; the creation of a new storage device; the destruction of an existing storage device; or a change in the I / O access pattern of an application using the storage device. In an optional embodiment, obtaining target I / O access features corresponding to each of the multiple storage devices based on I / O access data received by the multiple storage devices within a target time period includes: for each storage device, based on the I / O access data received by the storage device within the target time period, calculating at least one I / O access feature in Table 1 as the target I / O access feature. In an optional embodiment, before responding to a target event for triggering extra space allocation, the method further includes: collecting, at a historical moment, historical I / O access data received by multiple historical storage devices in the storage system during a historical time period; obtaining target I / O access characteristics corresponding to the multiple historical storage devices during the historical time period based on the historical I / O access data received by the multiple historical storage devices during the historical time period; replaying the historical I / O access data received by the multiple historical storage devices during the historical time period under different local extra spaces to obtain write amplification values ​​for the multiple historical storage devices under different local extra spaces; and performing regression analysis on the write amplification values ​​of the multiple historical storage devices under different local extra spaces and the corresponding target I / O access characteristics during the historical time period to obtain a relationship model between target I / O access characteristics, extra space, and write amplification. In an optional embodiment, the storage system is a distributed block storage system, and the storage devices are block devices. The detailed implementation and beneficial effects of each step in the method of this embodiment have been described in detail in the previous embodiments and will not be elaborated upon here. It should be noted that the execution entity of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution entity of steps 601 to 603 can be device A; for another example, the execution entity of steps 601 and 602 can be device A, and the execution entity of step 603 can be device B; and so on.In addition, some processes described in the above embodiments and figures include multiple operations that appear in a specific order. However, it should be understood that these operations may be executed in a different order than the order in which they appear herein or in parallel. Operation numbers, such as 601 and 602, are merely used to distinguish between different operations and do not represent any specific order of execution. Furthermore, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that terms such as "first" and "second" are used herein to distinguish between different messages, devices, modules, and the like, and do not imply a sequential order or limit the "first" and "second" to different types. FIG7 is a schematic diagram of the structure of an electronic device provided by another exemplary embodiment of the present disclosure. As shown in FIG5 , the electronic device includes a memory 74 and a processor 75. Memory 74 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, images, videos, and the like. The memory 74 may be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. The processor 75 is coupled to the memory 74 and is configured to execute a computer program in the memory 74 to: determine, in response to a target event for triggering extra space allocation, multiple storage devices currently participating in extra space allocation in a storage system, the storage system providing data storage space for OCR access and global extra space for garbage collection; obtain, based on OCR access data received by the multiple storage devices within a target time period, target OCR access features corresponding to the multiple storage devices within the target time period, the target OCR access features being OCR access features related to garbage collection; and allocate local extra space for garbage collection to the multiple storage devices based on the target OCR access features corresponding to the multiple storage devices within the target time period, pre-learned target OCR access features, a relationship model between extra space and write amplification, and the global extra space.In an optional embodiment, when allocating local extra space for garbage collection to the multiple storage devices based on the target 10 access characteristics corresponding to each of the multiple storage devices, the pre-learned target 10 access characteristics, the relationship model between extra space and write amplification, and the global extra space, the processor 75 is specifically configured to: model the target 10 access characteristics corresponding to each of the multiple storage devices based on the pre-learned target 10 access characteristics and the relationship model between extra space and write amplification to obtain an objective function; the objective function uses the global write amplification corresponding to the multiple storage devices as an optimization target and the size of the local extra space to be allocated to each of the multiple storage devices as a desired quantity; constructs a constraint condition based on the size of the global extra space, and optimizes and solves the objective function to obtain the size of the local extra space allocated to each of the multiple storage devices; and allocates local extra space for garbage collection to the multiple storage devices based on the size of the local extra space allocated to each of the multiple storage devices. In an optional embodiment, when modeling the target 10 access characteristics corresponding to each of the multiple storage devices based on a pre-learned relationship model between the target 10 access characteristics, the extra space, and write amplification to obtain an objective function, the processor 75 is specifically configured to: model the target 10 access characteristics corresponding to each of the multiple storage devices based on the pre-learned relationship model between the target 10 access characteristics, the extra space, and write amplification to obtain a write amplification characterization function corresponding to each of the multiple storage devices; and generate the objective function based on the write amplification characterization function corresponding to each of the multiple storage devices; wherein the write amplification characterization function uses the write amplification of the corresponding storage device as a dependent variable and the size of the local extra space required to be allocated to the corresponding storage device as an independent variable. In an optional embodiment, when constructing a constraint condition based on the size of the global extra space, the processor 75 is specifically configured to: use as the constraint conditions that the sum of the sizes of the local extra space allocated to each of the multiple storage devices is less than or equal to the size of the global extra space, and that the size of the local extra space allocated to each of the multiple storage devices is within a set space range. In an optional embodiment, when the processor 75 constructs a constraint condition based on the size of the global extra space and optimizes and solves the objective function to obtain the size of the local extra space allocated to each of the multiple storage devices, the processor 75 is specifically configured to: construct a constraint condition based on the size of the global extra space, optimize and solve the objective function with minimizing the global write amplification as the optimization goal, to obtain the size of the local extra space allocated to each of the multiple storage devices.In an optional embodiment, when the processor 75 obtains the target I / O access features corresponding to each of the multiple storage devices based on the I / O access data received by the multiple storage devices within the target time period, the processor 75 is specifically configured to: for each storage device, based on the I / O access data received by the storage device within the target time period, calculate at least one I / O access feature in Table 1 as the target I / O access feature. In an optional embodiment, before responding to a target event for triggering extra space allocation, the processor 75 is further configured to: collect, at a historical moment, historical I / O access data received by multiple historical storage devices in the storage system during a historical time period; obtain, based on the historical I / O access data received by the multiple historical storage devices during the historical time period, target I / O access characteristics corresponding to the multiple historical storage devices during the historical time period; replay the historical I / O access data received by the multiple historical storage devices during the historical time period under different local extra spaces to obtain write amplification values ​​for the multiple historical storage devices under different local extra spaces; and perform regression analysis on the write amplification values ​​of the multiple historical storage devices under different local extra spaces and the target I / O access characteristics corresponding to the historical time period to obtain a relationship model between the target I / O access characteristics, extra space, and write amplification. Optionally, the target event includes at least one of the following: a change in the number of storage devices; the arrival of a preset extra space allocation period; the creation of a new storage device; the destruction of an existing storage device; or a change in the I / O access pattern of an application using the storage device. Optionally, the storage system is a distributed block storage system, and the storage device is a block device. Furthermore, as shown in FIG7 , the electronic device also includes other components, such as a communication component 76, a display 77, a power supply component 78, and an audio component 79. FIG7 only schematically illustrates some components, and does not mean that the electronic device only includes the components shown in FIG7 . Furthermore, the components within the dashed box in FIG7 are optional, not required, and the specific requirements depend on the product form of the working node. The working node of this embodiment can be implemented as a terminal device such as a desktop computer, laptop computer, smartphone, or IoT device, or as a server-side device such as a conventional server, cloud server, or server array. If the working node of this embodiment is implemented as a terminal device such as a desktop computer, laptop computer, or smartphone, it may include the components within the dashed box in FIG7 . If the working node of this embodiment is implemented as a server-side device such as a conventional server, cloud server, or server array, it may not include the components within the dashed box in FIG7 .The detailed implementation and beneficial effects of each step in the method of this embodiment have been described in detail in the previous embodiments and will not be elaborated upon here. Accordingly, embodiments of the present disclosure further provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement each step in the above-described method embodiment. Accordingly, embodiments of the present disclosure further provide a computer program product. The computer program product includes a computer program / instructions. When the computer program / instructions are executed by a processor, the processor is enabled to implement the steps in the above-described method embodiment. The aforementioned memory can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random-access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The aforementioned communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / ETE, 5G, or other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.The display includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, it may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensors can detect not only the boundaries of a touch or slide action, but also the duration and pressure associated with the touch or slide action. The power supply assembly provides power to various components of the device in which the power supply assembly resides. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply assembly resides. The audio assembly may be configured to output and / or input audio signals. For example, the audio assembly includes a microphone (MIC). When the device in which the audio assembly resides is in an operating mode, such as call mode, recording mode, or voice recognition mode, the microphone is configured to receive external audio signals. The received audio signals may be further stored in a memory or transmitted via the communication assembly. In some embodiments, the audio assembly also includes a speaker for outputting audio signals. Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) containing computer-usable program code. The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, may be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device for implementing the functions specified in one or more processes in the flowchart and / or one or more blocks in the block diagram.These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means that implement the functions specified in one or more flows in a flowchart and / or one or more blocks in a block diagram. These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing the computer or other programmable device to execute a series of operational steps to produce a computer-implemented process, such that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows in a flowchart and / or one or more blocks in a block diagram. In a typical configuration, a computing device includes one or more processors (Central Processing Units, CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. oMemory is an example of computer-readable media. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can implement information storage using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves. It should also be noted that the terms "comprise," "include," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, product, or apparatus comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, product, or apparatus. Without further limitation, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, product, or apparatus comprising the element. The foregoing are merely examples of the present disclosure and are not intended to limit the present disclosure. Those skilled in the art will readily appreciate that various modifications and variations of the present disclosure are possible. Any modifications, equivalent substitutions, improvements, and the like made within the spirit and principles of the present disclosure are intended to be encompassed by the claims of the present disclosure.

Claims

Claims 1. A space resource allocation method, comprising: In response to a target event for triggering extra space allocation, determining a plurality of storage devices currently participating in extra space allocation in a storage system, wherein the storage system provides data storage space for access and global extra space for garbage collection; Based on the IO access data received by the multiple storage devices within the target time period, the target IO access features corresponding to the multiple storage devices within the target time period are obtained, and the target IO access features refer to IO access features related to garbage collection; based on the target IO access features corresponding to the multiple storage devices within the target time period, the pre-learned target IO access features, the relationship model between extra space and write amplification, and the global extra space, local extra space for garbage collection is allocated to the multiple storage devices.

2. The method according to claim 1, allocating local extra space for garbage collection to the multiple storage devices based on target 10 access features corresponding to the multiple storage devices, pre-learned target 10 access features, a relationship model between extra space and write amplification, and the global extra space, comprising: Based on a pre-learned relationship model between target 10 access features, extra space, and write amplification, the target 10 access features corresponding to each of the multiple storage devices are modeled to obtain an objective function; the objective function uses the global write amplification corresponding to the multiple storage devices as an optimization target, and the size of the local extra space required to be allocated to each of the multiple storage devices as a desired quantity; a constraint condition is established based on the size of the global extra space, and the objective function is optimized and solved to obtain the size of the local extra space allocated to each of the multiple storage devices; and based on the size of the local extra space allocated to each of the multiple storage devices, local extra space for garbage collection is allocated to the multiple storage devices.

3. The method according to claim 2, wherein: Modeling the target 10 access features corresponding to each of the multiple storage devices based on a pre-learned relationship model among target 10 access features, extra space, and write amplification to obtain an objective function includes: modeling the target 10 access features corresponding to each of the multiple storage devices based on the pre-learned relationship model among target 10 access features, extra space, and write amplification to obtain a write amplification characterization function corresponding to each of the multiple storage devices; generating the objective function based on the write amplification characterization function corresponding to each of the multiple storage devices; wherein the write amplification characterization function uses the write amplification of the corresponding storage device as a dependent variable and uses the size of the local extra space required to be allocated to the corresponding storage device as an independent variable.

4. The method according to claim 2 or 3, wherein: Constructing a constraint condition based on the size of the global extra space includes: using, as the constraint condition, the sum of the sizes of the local extra spaces allocated to each of the multiple storage devices is less than or equal to the size of the global extra space, and the sizes of the local extra spaces allocated to each of the multiple storage devices are within a set space range.

5. The method according to any one of claims 2 to 4, wherein: Constructing a constraint condition based on the size of the global extra space and optimizing and solving the objective function to obtain the size of the local extra space allocated to each of the multiple storage devices includes: constructing a constraint condition based on the size of the global extra space, taking minimizing the global write amplification as an optimization goal, and optimizing and solving the objective function to obtain the size of the local extra space allocated to each of the multiple storage devices.

6. The method according to any one of claims 1 to 5, wherein: The target event includes at least one of the following: an event in which the number of storage devices changes; The event of the arrival of the preset additional space allocation cycle; Events for creating new storage devices; Events for destroying existing storage devices; 10. Event indicating a change in access mode of an application using a storage device.

7. The method according to any one of claims 1 to 6, wherein: Obtaining target IO access features corresponding to the multiple storage devices within the target time period based on IO access data received by the multiple storage devices within the target time period, including: for each storage device, based on the IO access data received by the storage device within the target time period, counting at least one of the following IO access features as the target IO access feature: a first IO access feature, representing a ratio of the number of storage units with more than a preset number of writes within the target time period to the number of all storage units accessed within the target time period; a second IO access feature, representing a ratio of the number of overwrites occurring to storage units with existing data within the target time period to the total number of writes occurring within the target time period; a third IO access feature, representing a ratio of the sum of the number of writes to the N storage units with the most writes within the target time period to the total number of writes occurring within the target time period, where N is a positive integer and 1WNWM, M is the total number of storage units written within the target time period; a fourth IO access feature, representing a ratio of the number of sequential write operations occurring within the target time period to the number of all IO access operations occurring within the target time period; a fifth IO access feature, The sixth access feature represents the maximum write length among the write lengths of each sequential write operation occurring within the target time period; the seventh access feature represents the statistical characteristics of the traffic distribution between the storage units rewritten within the target time period; the eighth access feature represents the size of the address space written by all write operations within the target time period; the ninth access feature represents the ratio of the number of storage units written within the target time period to the total address length of the written storage units.

8. The method according to any one of claims 1 to 7, wherein: Before responding to the target event for triggering additional space allocation, it also includes: collecting historical 10 access data received by multiple historical storage devices existing in the storage system at that time within the historical time period at a historical moment; obtaining target 10 access features corresponding to the multiple historical storage devices within the historical time period based on the historical 10 access data received by the multiple historical storage devices within the historical time period; replaying the historical 10 access data received by the multiple historical storage devices within the historical time period under different local additional spaces to obtain write amplification values ​​of the multiple historical storage devices under different local additional spaces; performing regression analysis on the write amplification values ​​of the multiple historical storage devices under different local additional spaces and the corresponding target 10 access features within the historical time period to obtain a relationship model between target 10 access features, additional space and write amplification.

9. The method according to any one of claims 1 to 8, wherein: The storage system is a distributed block storage system, and the storage device is a block device.

10. A storage system, comprising: Multiple storage devices and a space resource allocation device carried on at least one physical machine, the multiple storage devices jointly providing data storage space for 10 access and global extra space for garbage collection; wherein the space resource allocation device includes: A determination module is configured to respond to a target event for triggering additional space allocation and determine multiple storage devices currently participating in additional space allocation in a storage system, wherein the storage system provides data storage space for IO access and global additional space for garbage collection; a first acquisition module is configured to obtain target IO access features corresponding to the multiple storage devices within a target time period based on IO access data received by the multiple storage devices within a target time period, wherein the target IO access features refer to IO access features related to garbage collection; and an allocation module is configured to allocate local additional space for garbage collection to the multiple storage devices based on the target IO access features corresponding to the multiple storage devices within the target time period, pre-learned target IO access features, a relationship model between additional space and write amplification, and the global additional space.

11. The system according to claim 10, further comprising: Relationship model building device; The relationship model construction device includes: a collection module, which is used to collect historical 10 access data received by multiple historical storage devices existing in the storage system at that time within the historical time period at a historical moment; a second acquisition module, which is used to obtain the target 10 access features corresponding to the multiple historical storage devices within the historical time period based on the historical 10 access data received by the multiple historical storage devices within the historical time period; a playback module, which is used to replay the historical 10 access data received by the multiple historical storage devices within the historical time period under different local extra spaces, so as to obtain the write amplification values ​​of the multiple historical storage devices under different local extra spaces; a construction module, which is used to perform regression analysis on the write amplification values ​​of the multiple historical storage devices under different local extra spaces and the corresponding target 10 access features within the historical time period, so as to obtain a relationship model between the target 10 access features, extra space and write amplification.

12. An electronic device, comprising: memory and processor; The memory is used to store a computer program, and the processor is coupled to the memory and is used to execute the computer program in the memory to implement the steps in the method according to any one of claims 1 to 9.

13. A computer-readable storage medium storing a computer program / instructions, wherein when the computer program is executed by a processor, the processor is enabled to implement the steps of the method according to any one of claims 1 to 9.

14. A computer program product comprising: A computer program / instruction, which, when executed by a processor, enables the processor to implement the steps of the method according to any one of claims 1 to 9. 18

Citation Information

Patent Citations

  • Efficient implementation of optimized host-based garbage collection strategies using xcopy and multiple logical stripes

    CN108475232A

Cited By

  • Data recovery method, device, equipment, medium and product

    CN121705200A