A garbage collection method for ZNS-SSD storage systems

By adopting a segmented garbage collection method as the basic unit in the ZNS-SSD storage system, the garbage collection process is optimized, solving the problems of high data migration overhead and severe wear and tear, improving the system's efficiency and stability, and meeting the requirements for rapid response.

CN119473143BActive Publication Date: 2026-03-13QINGHAI NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing garbage collection methods for ZNS-SSD storage systems suffer from high data recycling and migration overhead, severe wear caused by frequent access to internal physical blocks, which affects the performance and reliability of the storage system. Furthermore, traditional methods fail to effectively refine the garbage collection task.

Method used

A garbage collection method based on segments is adopted. By acquiring the information of the recycling segments and the target segments, a group of recycling segment linked lists is established. Data migration is processed in parallel based on migration cost data. The garbage collection process is optimized by combining greedy algorithms and value cost algorithms, so as to realize intra-segment migration and address remapping.

Benefits of technology

It improves the garbage collection efficiency of the ZNS-SSD storage system, reduces the occupation of system resources, enhances data access speed and system stability, and meets the fast response requirements of modern data storage and processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473143B_ABST
    Figure CN119473143B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of computer storage technology, specifically disclosing a garbage collection method for ZNS-SSD storage systems. The method includes garbage collection based on segments, migration cost management and process scheduling based on the reclaimed segments, establishing a list of reclaimed segments to optimize the data structure, and specific data migration methods. This invention refines and specifies the garbage collection task by precisely managing and operating different segments during the garbage collection process. It migrates data to the target space through parallel processing, enabling multiple data migration tasks to be performed simultaneously, thus improving the efficiency of garbage collection in ZNS-SSD storage systems. By constructing a segmented linked list, it reduces the resource consumption of the system in determining the segmented data migration method. Based on optimizing the data structure of the ZNS-SSD storage system, it systematically and fundamentally improves the response speed and stability of the ZNS-SSD storage system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer storage technology, and more specifically to a garbage collection method for ZNS-SSD storage systems. Background Technology

[0002] With the development of computer storage technology, ZNS-SSD storage system, namely partition namespace solid-state drive storage system, has emerged. ZNS-SSD storage system divides the storage area into multiple zones that need to be written sequentially, reducing write amplification of the storage system and helping to improve the performance and lifespan of storage devices.

[0003] In ZNS-SSD storage systems, existing garbage collection methods suffer from high data migration overhead and reduced lifespan due to wear and tear from frequent access to internal physical blocks, directly impacting system performance and reliability. Furthermore, traditional garbage collection methods typically focus on zones and blocks; however, zones have large storage areas with significant differences in data type and access frequency, while blocks have small storage areas, placing a heavy performance burden on the garbage collection control unit. Therefore, it is necessary to refine and specify the garbage collection task and find suitable garbage collection units.

[0004] In existing technologies, the performance overhead of current garbage collection strategies remains significant due to the need to perform victim block selection and maintain memory data structures. In large and high-performance ZNS-SSD storage systems, the maintenance cost of data structures that require I / O updates is significantly higher than the optimization of victim block selection and migration. Therefore, further optimization of the garbage collection data structure is needed. Consequently, there is an urgent need to propose a garbage collection method for ZNS-SSD storage systems that can refine and specify the garbage collection task. Summary of the Invention

[0005] To address the problems existing in the prior art, this invention provides a garbage collection method for ZNS-SSD storage systems, which solves the problems mentioned in the background section.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a garbage collection method for ZNS-SSD storage systems, comprising the following steps:

[0007] S7001, Obtain garbage collection request information;

[0008] S7002. Generate recycling segment information and target segment information based on the waste recycling request information;

[0009] S7003. Obtain the effective unit ratio and lifecycle of the recycling segment based on the recycling segment information;

[0010] S7004. Establish a recycling segmented linked list group based on the effective unit ratio and life cycle;

[0011] S7005. Obtain migration cost data of recycling segments based on recycling segment information;

[0012] S7006. If the migration cost data meets the conditions for parallel migration, process the data migration process of the recovery segments in parallel.

[0013] S7007: Obtain chip information for the recycled block and the target block based on the recycled segment information and the target segment information;

[0014] S7008: Match the chip information of the recycling block and the target block, and perform intra-chip data migration on the common chip for the recycling block that shares a chip with the target block after the matching is completed.

[0015] S7009. Based on the recycling segment linked list group, migrate the valid data in the recycling segment to the target segment based on the recycling segment information and the target segment information;

[0016] S7010: In response to the migration of all valid data in the waste recycling area, erase the segments mapped to the waste recycling area to achieve waste recycling.

[0017] Preferably, in step S7001, the garbage collection request information includes segment pointer information of the data to be migrated or erased. The garbage collection request information is used to instruct the operation of migrating or erasing data at the segment address in the target ZNS-SSD corresponding to the segment pointer information. The segment pointer information is used to represent the logical address of the data to be migrated or erased in the target ZNS-SSD.

[0018] Preferably, in step S7002, the ZNS-SSD storage system generates recycling segment information and target segment information based on the obtained garbage collection request information. The recycling segment information is used to characterize segments that contain more than a preset threshold of invalid data in a continuous manner, and the target segment information is used to characterize the segment that is optimally selected by comprehensively considering factors including but not limited to data hotness matching, space utilization and physical distance from the recycling segment.

[0019] The recycling segments are determined using a greedy algorithm and / or a value-cost algorithm. The expressions for the greedy algorithm and the value-cost algorithm are as follows:

[0020]

[0021]

[0022] In the formula, The objective function of the value-cost algorithm is... This represents the percentage of invalid data units within a segment. For segmented lifecycles, For piecewise hot and cold measurement functions, Let be the objective function of the greedy algorithm. For data units, The cost of recycling data units.

[0023] Preferably, in step S7003, the lifecycle is used to characterize the average access frequency of data in the recycling segment; the lifecycle is represented based on the average time interval and / or the number of accesses per unit time of data access in the recycling segment.

[0024] Preferably, in step S7004, each recycling segment linked list in the recycling segment linked list group stores all recycling segments with the same percentage of valid units in lifecycle order; when the number of valid units in a segment changes, its lifecycle is reset to zero, and the segment is inserted at the head or tail of the recycling segment linked list corresponding to the changed number of valid units, and the recycling segment linked list still maintains the lifecycle order.

[0025] Preferably, in step S7005, the migration cost data is used to characterize the efficiency of the recycling segment in the waste recycling process. The migration cost data includes the proportion of effective units in the recycling segment and the size of the recycling segment. The expression for the migration cost data is as follows:

[0026]

[0027] In the formula, For migration costs, The number of valid units to be migrated. For constant parameters, The average cost of migrating an effective unit.

[0028] Preferably, in step S7006, the ZNS-SSD storage system determines whether the parallel migration conditions are met based on the migration cost data. If the conditions are met, then parallel threads for segmented garbage collection are allocated based on the number of valid units with contiguous physical addresses and the total number of valid units, so as to realize the parallel processing of the data migration process of the garbage collection segments.

[0029] Preferably, in step S7007, the ZNS-SSD storage system determines the chip information of the valid data of the physical reclaimed block logically mapped by the reclaimed segment based on the reclaimed segment information. At the same time, the ZNS-SSD storage system determines the chip information of the free space of the physical target block logically mapped by the target segment based on the target segment information.

[0030] Preferably, in step S7009, if a certain reclaimed segment meets the parallel migration condition and / or address remapping condition, then its list and the remaining reclaimed segment lists in the corresponding order are determined to meet the corresponding parallel migration condition and / or address remapping condition; after selecting the reclaimed segment and the target segment, the ZNS-SSD storage system migrates the valid data in the reclaimed segment to the target segment through physical read-write migration or address remapping based on the reclaimed segment information and the target segment information, and updates the corresponding metadata.

[0031] The beneficial effects of this invention are:

[0032] 1) Optimized Garbage Collection Units: By precisely managing and operating different segments during the garbage collection process, the garbage collection task is refined and specified, improving the efficiency of garbage collection in the ZNS-SSD storage system, reducing the impact of the garbage collection process on storage system performance, and further improving the available space and overall performance of the ZNS-SSD storage system. This not only reduces the occupation of system resources during the collection process but also reduces performance degradation caused by the accumulation of invalid data, improving the data access speed and stability of the ZNS-SSD storage system by 100%.

[0033] 2) Optimization of response performance: By migrating data to the target space through parallel processing, multiple data migration tasks can be performed simultaneously, which can increase the amount of data migration that the system can process at the same time, reduce the waiting time of the storage system for garbage collection, greatly improve the efficiency of data migration in the garbage collection process and the response performance of the ZNS-SSD storage system 100, and provide strong support for meeting the fast response requirements of modern data storage and processing.

[0034] 3) Efficient and stable data structure: By constructing a segmented linked list, the resource consumption of the system in determining the segmented data migration method is reduced. Based on the optimized data structure of the ZNS-SSD storage system, the response speed and stability of the ZNS-SSD storage system are systematically and fundamentally improved. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of the implementation environment provided for the embodiments of this application;

[0036] Figure 2 This is a schematic diagram of a waste recycling scenario provided in an embodiment of this application;

[0037] Figure 3 This is a schematic diagram of the structure of the ZNS-SSD storage system provided in an embodiment of this application;

[0038] Figure 4 A schematic diagram of an improved waste recycling scenario provided in an embodiment of this application;

[0039] Figure 5 This is a schematic diagram of the data structure of the segmented linked list group provided in the embodiments of this application;

[0040] Figure 6 A schematic diagram illustrating effective intra-chip migration provided in embodiments of this application;

[0041] Figure 7 This is a flowchart illustrating a garbage collection method for ZNS-SSD storage systems provided in an embodiment of this application. Detailed Implementation

[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] This invention provides a technical solution: a garbage collection method for ZNS-SSD storage systems that can refine and specify garbage collection tasks, the solution including:

[0044] Waste recycling based on segments:

[0045] Obtain garbage collection request information, which is used to characterize the garbage collection area and the data migration target area;

[0046] Generate recycling segment information and target segment information based on waste collection request information;

[0047] Based on the information of the recovered segments and the information of the target segments, the valid data in the recovered segments are migrated to the target segments;

[0048] In response to the migration of all valid data in the waste recycling area, the segments mapped to the waste recycling area are erased to achieve waste recycling.

[0049] Migration cost management process scheduling based on recycling segments:

[0050] Based on the recycling segment information, the migration cost data of the recycling segment is obtained, and the migration cost data is used to characterize the efficiency of the recycling segment in the waste recycling process;

[0051] If the migration cost data meets the conditions for parallel migration, the data migration process of the recovery segments is processed in parallel.

[0052] The migration cost data for the recycling segment can be measured using the proportion of effective units in the recycling segment and the estimated recycling response time, respectively, based on the characteristics of its storage space.

[0053] Optimize the data structure by creating a recycling segment list group:

[0054] Based on the recycling segment information, the effective unit ratio and life cycle of the recycling segment are obtained. The life cycle is used to characterize the average access frequency of data in the recycling segment.

[0055] A recycling segment linked list group is established based on the effective unit ratio and life cycle. Each recycling segment linked list group stores all recycling segments with the effective unit ratio within the same range in life cycle order.

[0056] Based on the recycled segment linked list group, the valid data in the recycled segment is migrated to the target segment based on the recycled segment information and the target segment information.

[0057] Specific data migration methods:

[0058] Data migration includes physical migration and address remapping; physical migration includes on-chip migration.

[0059] Physical migration is performed on the recycling segments in the recycling segment list where the proportion of effective units does not exceed the second segment threshold. The second segment threshold includes the ratio of the number of effective units in the target segment to the total number of units.

[0060] For recycling segments in the recycling segment list where the proportion of effective units is greater than the second segment threshold, address remapping is performed.

[0061] The chip information of the recycling block and the target block is obtained based on the recycling segment information and the target segment information. The recycling segment includes the recycling block, and the target segment includes the target block.

[0062] The chip information of the reclaimed block and the target block is matched, and the data of the reclaimed block that shares a chip with the target block after the matching is completed is migrated on the common chip.

[0063] The garbage collection method for ZNS-SSD storage systems provided in this embodiment of the invention is applied to, for example... Figure 1 The application environment shown is illustrated. The ZNS-SSD storage system 100 may include: a host 101, a storage device 102, and data channels. The storage device 102 may include n ZNS-SSD storage modules, each of which can be connected to the host 101 via a data channel. It should be noted that n ≥ 1. Figure 1 The ZNS-SSD system 100, which includes multiple ZNS-SSD storage modules, is used as an example. The following is a brief introduction to the terminology:

[0064] A Zoned Namespace-Solid State Drive (ZNS-SSD) divides the storage area into multiple independent zones. Each zone has its own independent address space, and data must be written to each zone sequentially. Unlike traditional SSDs, ZNS-SSDs require the host to understand their partition structure and write data to the appropriate partitions in order.

[0065] A segment is a further subdivision of logical storage units within a partition. It typically consists of multiple contiguous physical storage units, such as multiple pages or blocks. Different types of data can be allocated to different segments for easier classification and management.

[0066] The Flash Translation Layer (FTL) is responsible for managing and optimizing data read and write operations. ZNS-SSD has moved some FTL functions to the host software.

[0067] Non-Volatile Memory Express (NVMe) is a high-speed storage communication protocol based on PCIe (Peripheral Component Interconnect). It leverages the low latency and high bandwidth of PCIe to enable rapid data transfer between storage devices and computer systems.

[0068] In this embodiment of the invention, the host 101 implements the function of controlling the memory 102. The host 101 may store an FTL mapping table, which can be used to record the conversion relationship between physical addresses and logical addresses in n ZNS-SSD storage modules. The host 101 can implement the function of controlling the memory 102 according to the FTL mapping table.

[0069] It should be noted that the host 101 can be a central processing unit. The host 101 can send I / O requests to the memory 102 so that the memory 102 can perform read, write or erase operations on a certain physical address in the memory 102 according to the I / O request, and obtain the processing result of the I / O request, and then feed the processing result back to the host 101.

[0070] The traditional garbage collection process for ZNS-SSD storage systems can include four tasks: victim partition selection, target partition allocation, valid data replication, and metadata update. Host 101 can find the partition with the lowest compression cost through victim partition selection; allocate contiguous free space from the target partition through target partition allocation; move all valid data from the victim partition in storage 102 to the target partition through valid data replication; and ensure the system accurately reflects the data status through metadata updates.

[0071] Combining definitions, implementation environment, and waste recycling scenarios, refer to Figures 1 to 7 In one exemplary embodiment, a garbage collection method for ZNS-SSD storage systems is provided, which is applied to... Figure 1 Taking the ZNS-SSD storage system 100 as an example, the recycling scenario is as follows: Figure 2 As shown, waste recycling methods are as follows Figure 7 As shown, the specific steps include:

[0072] Step S7001: Obtain garbage collection request information.

[0073] A schematic diagram of the ZNS-SSD storage system is shown below. Figure 3 As shown, the ZNS-SSD storage system 100 can obtain garbage collection request information, which is used to characterize the garbage collection area and the data migration target area.

[0074] The garbage collection request information may include segment pointer information of the data to be migrated or erased. The segment pointer information is used to represent the logical address of the data to be migrated or erased in the target ZNS-SSD, which is any one of the n ZNS-SSD storage modules in the memory 102 connected to the host 101. This garbage collection request information can be used to instruct the operation of migrating or erasing data at the segment address in the target ZNS-SSD corresponding to the segment pointer information.

[0075] Step S7002: Generate recycling segment information and target segment information based on the waste recycling request information.

[0076] The ZNS-SSD storage system 100 can generate recycling segment information and target segment information based on the obtained garbage collection request information. The recycling segment information can be used to characterize continuous segments containing a lot of invalid data, and the target segment information can be used to characterize the best segment by comprehensively considering factors including but not limited to data hotness matching, space utilization and physical distance from the recycling segment.

[0077] The recycling segments can be determined using a greedy algorithm and / or a value-cost algorithm. Feasible expressions for the greedy algorithm and the value-cost algorithm are as follows:

[0078]

[0079]

[0080] In the formula, The objective function of the value-cost algorithm is... This represents the percentage of invalid data units within a segment. For segmented lifecycles, For piecewise hot and cold measurement functions, Let be the objective function of the greedy algorithm. For data units, The cost of recycling data units.

[0081] Step S7003: Obtain the effective unit ratio and lifecycle of the recycling segment based on the recycling segment information. The lifecycle is used to characterize the average access frequency of data in the target segment.

[0082] Lifecycle can be represented based on the average time interval between data accesses in the recycling segment and / or the number of accesses per unit time.

[0083] The ZNS-SSD storage system 100 can predict the lifecycle of reclaimed segments based on access patterns and characteristics in historical data using a machine learning model.

[0084] Step S7004: Establish a recycling segment linked list group based on the effective unit ratio and life cycle. Each recycling segment linked list in the recycling segment linked list group stores all recycling segments with the same effective unit ratio in life cycle order.

[0085] like Figure 5 As shown, taking the reclaimed segment linked list group ordered by lifecycle in ascending order as an example, the ZNS-SSD storage system 100 establishes a reclaimed segment linked list group based on the effective unit ratio of the reclaimed segments and their lifecycle. Each reclaimed segment linked list in the reclaimed segment linked list group stores all reclaimed segments with the same effective unit ratio in ascending order by lifecycle.

[0086] When the number of valid units in a segment changes, its lifetime is reset to zero. The segment can then be inserted at the head or tail of the recycling segment list corresponding to the changed number of valid units. At this time, the recycling segment list still maintains the lifetime order.

[0087] Step S7005: Obtain migration cost data of the recycling segment based on the recycling segment information. The migration cost data is used to characterize the efficiency of the recycling segment in the waste recycling process.

[0088] The ZNS-SSD storage system 100 can obtain migration cost data for recycling segments based on recycling segment information. This migration cost data characterizes the efficiency of the recycling segment during the garbage collection process. The migration cost data can include the proportion of effective units in the recycling segment and the size of the recycling segment. A feasible expression for the migration cost data is as follows:

[0089]

[0090] In the formula, For migration costs, The number of valid units to be migrated. For constant parameters, The average cost of migrating an effective unit.

[0091] Step S7006: If the migration cost data meets the conditions for parallel migration, process the data migration process of the recovery segment in parallel.

[0092] The ZNS-SSD storage system 100 can determine whether the conditions for parallel migration are met based on migration cost data. If so, it can allocate parallel threads for segmented garbage collection based on the number of valid units with contiguous physical addresses and the total number of valid units, thereby enabling parallel processing of the data migration process for the garbage collection segments. The FTL module implemented on the host 101 can perform process scheduling and management to achieve parallel and serial process management for segmented garbage collection.

[0093] Step S7007: Obtain chip information for the recycling block and the target block based on the recycling segment information and the target segment information. The recycling segment includes the recycling block, and the target segment includes the target block.

[0094] The ZNS-SSD storage system 100 can determine the chip information of the valid data of the physical reclaimed block logically mapped by the reclaimed segment based on the reclaimed segment information, and can also determine the chip information of the free space of the physical target block logically mapped by the target segment based on the target segment information.

[0095] Step S7008: Match the chip information of the recycled block and the target block, such as... Figure 4 As shown, after matching, the recycled blocks that share a chip with the target block are migrated within the common chip.

[0096] refer to Figure 6 The ZNS-SSD storage system 100 can match the chip information of the physical reclaimed block with the chip information of the physical target block. If a shared chip is identified, the physical reclaimed block with the shared chip is matched with the physical target block, and the reclaimed block after matching is effectively migrated within the common chip.

[0097] Step S7009: Based on the recycling segment linked list group, migrate the valid data in the recycling segment to the target segment based on the recycling segment information and the target segment information.

[0098] If a certain reclaimed segment satisfies the parallel migration condition and / or address remapping condition, then its list and the remaining reclaimed segments in the corresponding order can be determined to satisfy the corresponding parallel migration condition and / or address remapping condition.

[0099] like Figure 4 As shown, after selecting the reclaimed segment and the target segment, the ZNS-SSD storage system 100 can migrate the valid data in the reclaimed segment to the target segment through physical read-write migration or address remapping based on the reclaimed segment information and the target segment information, and update the corresponding metadata.

[0100] Step S7010: In response to the migration of all valid data in the waste recycling area, the segments mapped to the waste recycling area are erased to achieve waste recycling.

[0101] The ZNS-SSD storage system 100 can determine whether all valid data in the garbage collection area has been migrated based on updated metadata, and in response to the migration of all valid data in the garbage collection area, erase the segments mapped to the garbage collection area to achieve garbage collection.

[0102] This concludes the implementation steps of the garbage collection method for a ZNS-SSD storage system described in this invention.

[0103] In the several embodiments provided in this invention, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0104] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0105] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0106] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0107] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0108] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0109] The terms "first" and "second" used in the embodiments are merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" can be interchanged in a specific order or sequence where permitted. It should be understood that the objects distinguished by "first" and "second" can be interchanged where appropriate so that the embodiments described herein can be implemented in an order other than those illustrated or described herein.

[0110] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A garbage collection method for a ZNS-SSD storage system, characterized in that, The method comprises the following steps: S7001, obtaining garbage collection request information; S7002, generating collection segment information and target segment information according to the garbage collection request information, specifically including: the ZNS-SSD storage system generates the collection segment information and the target segment information according to the obtained garbage collection request information, the collection segment information is used to represent a segment containing invalid data exceeding a preset threshold, and the target segment information is used to represent a segment that is best in terms of factors including but not limited to data hotness matching, space utilization rate and physical distance from the collection segment; S7003, obtaining the valid unit proportion and the life cycle of the collection segment based on the collection segment information; the life cycle is used to represent the average access frequency of the data in the collection segment; S7004, establishing a collection segment linked list group based on the valid unit proportion and the life cycle, specifically including: each collection segment linked list in the collection segment linked list group stores all collection segments with the valid unit proportion in the same range in the life cycle order; when the number of valid units of a collection segment changes, the life cycle of the collection segment is reset to zero, the collection segment is inserted into the head or tail of the collection segment linked list corresponding to the changed number of valid units, and the collection segment linked list is still arranged in the life cycle order; S7005, obtaining migration cost data of the collection segment based on the collection segment information; S7006, if the migration cost data meets the parallel migration condition, processing the data migration process of the collection segment in parallel; S7007, obtaining chip information of the collection block and the target block based on the collection segment information and the target segment information; S7008, matching the chip information of the collection block and the target block, and performing data intra-migration on the collection block sharing the chip with the target block after the matching is completed; S7009, migrating the valid data in the collection segment to the target segment based on the collection segment information and the target segment information according to the collection segment linked list group; S7010, in response to migrating all valid data of the garbage collection area, erasing the segment mapped by the garbage collection area, and realizing garbage collection.

2. The garbage collection method for ZNS-SSD storage system according to claim 1, characterized in that: In step S7001, the garbage collection request information includes segment pointer information of data to be migrated or erased, and the garbage collection request information is used to indicate the operation of migrating or erasing data in the segment address of the target ZNS-SSD corresponding to the segment pointer information, and the segment pointer information is used to represent the logical address of the data to be migrated or erased in the target ZNS-SSD.

3. The garbage collection method for ZNS-SSD storage system according to claim 1, characterized in that: In step S7002, the collection segment is determined by a greedy algorithm and / or a value cost algorithm, and the expressions of the greedy algorithm and the value cost algorithm are as follows: ; ; wherein, is an objective function of a value cost algorithm, is a ratio of invalid data units within a segment, is a life cycle of a segment, is a cold-hot metric function of a segment, is an objective function of a greedy algorithm, is a data unit, is a recycle cost of a data unit.

4. The garbage collection method for ZNS-SSD storage system according to claim 1, characterized in that: In step S7003, the life cycle is based on the average time interval of data access in the collection segment and / or the number of accesses per unit time.

5. The garbage collection method for ZNS-SSD storage system according to claim 1, characterized in that: In step S7005, the migration cost data is used to represent the efficiency of the collection segment in the garbage collection process, the migration cost data includes the proportion of valid units of the collection segment and the size of the collection segment, and the expression of the migration cost data is as follows: ; wherein is the migration cost, is the number of valid cells to migrate, is a constant parameter, is the average cost of migrating a valid cell.

6. The garbage collection method for ZNS-SSD storage system according to claim 1, characterized in that: In step S7006, the ZNS-SSD storage system determines whether the parallel migration condition is met based on the migration cost data. If the condition is met, the ZNS-SSD storage system allocates parallel threads for segment garbage collection based on the number of valid units with continuous physical addresses and the total number of valid units, and implements parallel processing of the data migration process of the collected segments.

7. The garbage collection method for ZNS-SSD storage system according to claim 1, characterized in that: In step S7007, the ZNS-SSD storage system determines the chip information of the valid data of the physical collected segment logically mapped by the collected segment based on the collected segment information. At the same time, the ZNS-SSD storage system determines the chip information of the idle space of the physical target segment logically mapped by the target segment based on the target segment information.

8. The garbage collection method for ZNS-SSD storage system according to claim 1, characterized in that: In step S7009, if a certain collected segment meets the parallel migration condition and / or the address remapping condition, the list of the collected segment and the list of the remaining collected segments in the corresponding order are determined to meet the corresponding parallel migration condition and / or address remapping condition. After selecting the collected segment and the target segment, the ZNS-SSD storage system migrates the valid data in the collected segment to the target segment through physical read-write migration or address remapping migration based on the collected segment information and the target segment information, and updates the corresponding metadata.

Citation Information

Patent Citations

  • Garbage collection method based on SSD-SMR mixed key value storage system

    CN109783020A

  • ZNS-SSD storage system-oriented garbage collection method

    CN116301576A