ZNS-SSD storage system-oriented garbage collection method
By refining garbage collection tasks in the ZNS-SSD storage system, establishing a recycling segmented linked list group, and processing data migration in parallel, solving the problems of large and wear of garbage collection in the existing technology, achieving more efficient garbage collection and more stable Storage system performance.
Patent Information
- Application Number
- CN202411528855.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-30
AI Technical Summary
The garbage collection method in the existing ZNS-SSD storage system has the problems of large data recycling migration overhead and frequent access to internal physical blocks lead to wear and shortening of service life. The traditional method has a high burden on the performance of the control unit of garbage collection.
A garbage collection method for ZNS-SSD storage system is proposed. By obtaining garbage collection request information, generating recycling segmentation information and target segmentation information, establishing a recycling segmentation linked list group based on these information, processing data migration in parallel, and optimizing the data structure To reduce resource consumption.
It improves the efficiency of garbage collection in ZNS-SSD storage system, reduces the impact on storage system performance, extends the service life of the equipment, and improves data access speed and system stability.
Smart Images

Figure CN119473143A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer storage technology, and in particular to a garbage collection method for a ZNS-SSD storage system. Background Art
[0002] With the development of computer storage technology, the ZNS-SSD storage system, namely the partitioned namespace solid-state drive storage system, has emerged. The ZNS-SSD storage system divides the storage area into multiple zones (ZONEs) that need to be written sequentially, reducing the write amplification of the storage system and helping to improve the performance and life of the storage device.
[0003] In the ZNS-SSD storage system, the existing garbage collection methods have problems such as large data recovery and migration overhead, and wear and tear caused by frequent access to internal physical blocks (BLOCKs), which directly affects the performance and reliability of the storage system. In addition, traditional garbage collection methods usually focus on garbage collection in units of zones (ZONE) and blocks (BLOCKs). However, the corresponding storage range of zones (ZONEs) is too large, and there are large differences in the type and access frequency of internal data; while the corresponding storage range of blocks (BLOCKs) is too small, and using blocks (BLOCKs) as units will bring a large performance burden to the control unit corresponding to garbage collection. Therefore, it is necessary to refine and concretize the garbage collection task and find a suitable garbage collection unit.
[0004] In the prior art, the performance overhead of the existing garbage collection strategy is still large because it is necessary to perform victim block selection and maintain memory data structures. In large-scale and high-performance ZNS-SSD storage systems, the maintenance cost of data structures that need to be updated by I / O is significantly higher than the selection and migration optimization of victim blocks. The data structure of garbage collection needs to be further optimized. Therefore, it is urgent to propose a garbage collection method for ZNS-SSD storage systems that can refine and concretize garbage collection tasks. Summary of the invention
[0005] In order to solve the problems existing in the prior art, the present invention provides a garbage collection method for a ZNS-SSD storage system, which solves the problems mentioned in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solution: a garbage collection method for a ZNS-SSD storage system, comprising the following steps:
[0007] S7001. Obtain garbage collection request information;
[0008] S7002, generating recycling segment information and target segment information according to the garbage recycling request information;
[0009] S7003. Obtaining the effective unit ratio and life cycle of the recycling segment based on the recycling segment information;
[0010] S7004. Establish a recycling segment linked list group based on the effective unit ratio and life cycle;
[0011] S7005. Obtain migration cost data of the recovery segment based on the recovery segment information;
[0012] S7006. If the migration cost data meets the parallel migration condition, the data migration process of the recovered segments is processed in parallel;
[0013] S7007, acquiring chip information of the recovery block and the target block based on the recovery segment information and the target segment information;
[0014] S7008, matching chip information of the recovery block and the target block, and performing data intra-chip migration on the common chip for the recovery block that shares a common chip with the target block after the matching is completed;
[0015] S7009, according to the recycling segment linked list group, based on the recycling segment information and the target segment information, migrate the valid data in the recycling segment to the target segment;
[0016] S7010. In response to migrating all valid data in the garbage collection area, erasing the segment mapped in the garbage collection area to implement garbage collection.
[0017] Preferably, in step S7001, the garbage collection request information includes segment pointer information of the data to be migrated or erased, and the garbage collection request information is used to indicate the operation of migrating or erasing data on the segment address in 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.
[0018] Preferably, in step S7002, the ZNS-SSD storage system generates recycling segment information and target segment information according to the acquired garbage collection request information, the recycling segment information is used to characterize the segments containing continuous invalid data exceeding a preset threshold, and the target segment information is used to characterize the segments with the best comprehensive factors including but not limited to data hot and cold matching, space utilization and physical distance from the recycling segment;
[0019] The recycling segment is determined by the greedy algorithm and / or the value cost algorithm. The expressions of the greedy algorithm and the value cost algorithm are as follows:
[0020]
[0021] Where, L CBis the objective function of the value cost algorithm, K is the proportion of invalid data units in the segment, T is the life cycle of the segment, F(T) is the hot and cold measurement function of the segment, and L G is the objective function of the greedy algorithm, s i is the data unit, C(s i ) is the recycling cost of the data unit.
[0022] Preferably, in step S7003, the life cycle is used to characterize the average access frequency of the data in the target segment; the life cycle is represented based on the average time interval at which the data in the recycling segment is accessed and / or the number of accesses per unit time.
[0023] Preferably, in step S7004, each recycling segment linked list in the recycling segment linked list group stores all recycling segments whose valid unit ratios are in the same range in order of life cycle; when the number of valid units in a segment changes, its life cycle is reset to zero, and the segment is inserted into the header or footer of the recycling segment linked list corresponding to the changed number of valid units. At this time, the recycling segment linked list still maintains the order of life cycle arrangement.
[0024] Preferably, in step S7005, the migration cost data is used to characterize the efficiency of the recycling segment in the garbage collection process. The migration cost data includes the proportion of valid units of the recycling segment and the size of the recycling segment. The expression of the migration cost data is as follows:
[0025] L Q =(N y +C)T y
[0026] Where, L Q is the migration cost, N y is the number of effective units to be migrated, C is a constant parameter, T y is the average cost of migrating effective units.
[0027] Preferably, in step S7006, the ZNS-SSD storage system determines whether the parallel migration conditions are met based on the migration cost data. If so, parallel threads for segmented garbage collection are allocated based on the number of consecutive valid units of the physical address and the total number of valid units to implement parallel processing of the recovered segmented data migration process.
[0028] Preferably, in step S7007, the ZNS-SSD storage system determines the chip information of the valid data of the physical recovery block logically mapped by the recovery segment based on the recovery 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.
[0029] Preferably, in step S7009, if a certain recovery segment satisfies the parallel migration condition and / or the address remapping condition, the list in which it is located and the remaining recovery segment lists in the corresponding order are judged to satisfy the corresponding parallel migration condition and / or the address remapping condition; after selecting the recovery segment and the target segment, the ZNS-SSD storage system migrates the valid data in the recovery segment to the target segment through physical read-write migration or address remapping based on the recovery segment information and the target segment information, and updates the corresponding metadata.
[0030] The beneficial effects of the present invention are:
[0031] 1) Reasonable garbage collection basic unit: By accurately managing and operating different segments in the garbage collection process, the garbage collection task is refined and concretized, the efficiency of garbage collection in the ZNS-SSD storage system is improved, the impact of the garbage collection process on the storage system performance is reduced, and the available space and comprehensive performance of the ZNS-SSD storage system are further improved. It can not only reduce the occupation of system resources during the recycling process, but also reduce the performance degradation caused by the accumulation of invalid data, and improve the data access speed and stability of the ZNS-SSD storage system 100.
[0032] 2) Optimization of response performance: By migrating data to the target space through parallel processing methods, multiple data migration tasks can be performed simultaneously, which can increase the amount of data migration that the system can handle simultaneously and reduce the waiting time for garbage disposal in the storage system. This greatly improves the efficiency of data migration in the garbage collection process and the response performance of the ZNS-SSD storage system 100, providing strong support for meeting the rapid response requirements of modern data storage and processing.
[0033] 3) Efficient and stable data structure: By building a segmented linked list, the system reduces the resource consumption of determining the segmented data migration method. Based on optimizing the data structure of the ZNS-SSD storage system, the response speed and stability of the ZNS-SSD storage system are systematically and fundamentally improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic diagram of an implementation environment provided for an embodiment of the present application;
[0035] Figure 2 A schematic diagram of a garbage collection scenario provided in an embodiment of the present application;
[0036] Figure 3 A schematic diagram of the structure of the ZNS-SSD storage system provided in an embodiment of the present application;
[0037] Figure 4 A schematic diagram of an improved garbage collection scenario provided in an embodiment of the present application;
[0038] Figure 5 A schematic diagram of the data structure of a segmented linked list group provided in an embodiment of the present application;
[0039] Figure 6 A schematic diagram of effective data intra-chip migration provided by an embodiment of the present application;
[0040] Figure 7 A flowchart of a garbage collection method for a ZNS-SSD storage system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] The present invention provides a technical solution: a garbage collection method for a ZNS-SSD storage system capable of refining and concretizing garbage collection tasks, the solution comprising:
[0043] Garbage collection based on segments:
[0044] Obtaining garbage collection request information, where the garbage collection request information is used to characterize a garbage collection area and a data migration target area;
[0045] Generate recycling segment information and target segment information according to garbage collection request information;
[0046] Migrating valid data in the recycling segment to the target segment based on the recycling segment information and the target segment information;
[0047] In response to migrating all valid data of the garbage collection area, the segment of the garbage collection area map is erased to implement garbage collection.
[0048] Migration cost management process scheduling based on recovery segmentation:
[0049] Based on the recycling segment information, 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 garbage collection process;
[0050] If the migration cost data meets the parallel migration conditions, the data migration process of the recovery segment is processed in parallel.
[0051] The migration cost data of the recovery segment can be measured by the proportion of valid units of the recovery segment and the estimated recovery response time according to the characteristics of its storage space.
[0052] Establish the recycling segment list group to optimize the data structure:
[0053] Based on the recycling segment information, the effective unit ratio and life cycle of the recycling segment are obtained, and the life cycle is used to represent the average access frequency of the data in the target segment;
[0054] A recycling segment linked list group is established based on the effective unit ratio and the life cycle, and each recycling segment linked list in the recycling segment linked list group stores all recycling segments with effective unit ratios in the same range in order of the life cycle;
[0055] According to the recycling segment linked list group, valid data in the recycling segment is migrated to the target segment based on the recycling segment information and the target segment information.
[0056] Specific data migration method:
[0057] Data migration includes physical migration and address remapping. Physical migration includes on-chip migration.
[0058] Physically migrate the recycling segments in the recycling segment linked list whose valid unit ratio does not exceed the second segment threshold, where the second segment threshold includes the ratio of the number of valid units of the target segment to the total number of units;
[0059] Address remapping is performed on the reclaimed segments in the reclaimed segment linked list whose valid unit ratio is greater than the second segment threshold.
[0060] Acquire chip information of a recycling block and a target block based on recycling segment information and target segment information, wherein the recycling segment includes the recycling block and the target segment includes the target block;
[0061] The chip information of the recovery block and the target block are matched, and the data of the recovery block that shares a common chip with the target block after the matching is completed is migrated on the common chip.
[0062] The garbage collection method for the ZNS-SSD storage system provided by the embodiment of the present invention is applied to Figure 1 In the application environment shown. The ZNS-SSD storage system 100 may include: a host 101, a memory 102 and a data channel. The memory 102 may include n ZNS-SSD storage modules. The memory 102 may be connected to the host 101 through the data channel. It should be noted that n≥1, Figure 1 In the example, a storage ZNS-SSD system 100 includes multiple ZNS-SSD storage modules. The terms are introduced as follows:
[0063] The Zoned Namespace-Solid State Drive storage system (ZNS-SSD) divides the storage area into multiple independent zones. Each zone has an independent address space, and data must be written to each zone in sequence. Unlike traditional SSDs, ZNS-SSD requires the host to understand its partition structure and write data to the corresponding partition in sequence.
[0064] Segment is a further subdivision of logical storage units within a partition, usually composed of multiple continuous physical storage units, such as multiple pages or blocks. Different types of data can be assigned to different segments for easy classification and management.
[0065] Flash Translation Layer (FTL) is responsible for managing and optimizing data read and write operations. ZNS-SSD moves some FTL functions to the host-side software.
[0066] Non-Volatile Memory Express (NVMe) is a high-speed storage communication protocol based on PCIe (Peripheral Component Interconnect). It achieves fast data transmission between storage devices and computer systems by utilizing the low latency and high bandwidth characteristics of PCIe.
[0067] In the embodiment of the present invention, the host 101 implements the function of controlling the memory 102. The host 101 may store an FTL mapping table, which may be used to record the conversion relationship between the physical address and the logical address in the n ZNS-SSD storage modules. The host 101 may implement the function of controlling the memory 102 according to the FTL mapping table.
[0068] It should be noted that the host 101 can be a central processing unit, and the host 101 can send an I / O request to the memory 102 so that the memory 102 can read, write or erase data at a 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 back the processing result to the host 101.
[0069] The whole process of traditional garbage collection for ZNS-SSD storage system may include four tasks: victim partition selection, target partition allocation, valid data replication and metadata update. The host 101 may find the partition with the lowest compression cost through victim partition selection; allocate continuous free space from the target partition through target partition allocation; move all valid data of the victim partition in the memory 102 to the target partition through valid data replication; and ensure the system's accurate reflection of the data status through metadata update.
[0070] Combined with the explanation of terms, implementation environment, and garbage collection scenarios, refer to Figures 1 to 7 In an exemplary embodiment, a garbage collection method for a ZNS-SSD storage system is provided, wherein the method is applied to Figure 1 The ZNS-SSD storage system 100 in the example is used to illustrate the recycling scenario. Figure 2 As shown, the garbage collection method is as follows Figure 7 As shown, the specific steps include:
[0071] Step S7001, obtaining garbage collection request information.
[0072] The structural diagram of the ZNS-SSD storage system is as follows: Figure 3 As shown, the ZNS-SSD storage system 100 can obtain garbage collection request information, and the garbage collection request information is used to characterize the garbage collection area and the data migration target area.
[0073] The garbage collection request information may include segment pointer information of the data to be migrated or erased, 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, and the target ZNS-SSD is any ZNS-SSD in the n ZNS-SSD storage modules in the memory 102 connected to the host 101. The garbage collection request information may be used to instruct an operation of migrating or erasing data on the segment address in the target ZNS-SSD corresponding to the segment pointer information.
[0074] Step S7002: Generate recycling segment information and target segment information according to the garbage collection request information.
[0075] The ZNS-SSD storage system 100 can generate recycling segment information and target segment information based on the acquired garbage collection request information. The recycling segment information can be used to represent continuous segments containing more invalid data, and the target segment information can be used to represent the best segment considering factors including but not limited to data hot and cold matching, space utilization, and physical distance from the recycling segment.
[0076] The recycling segment can be determined by the greedy algorithm and / or the value cost algorithm. The feasible expressions of the greedy algorithm and the value cost algorithm are as follows:
[0077]
[0078]
[0079] Where, L CB is the objective function of the value cost algorithm, K is the proportion of invalid data units in the segment, T is the life cycle of the segment, F(T) is the hot and cold measurement function of the segment, and L G is the objective function of the greedy algorithm, s i is the data unit, C(s i ) is the recycling cost of the data unit.
[0080] Step S7003, based on the recycling segment information, the effective unit ratio and life cycle of the recycling segment are obtained, and the life cycle is used to characterize the average access frequency of the data in the target segment.
[0081] The life cycle may be expressed based on an average time interval between accesses to data in the recycling segment and / or the number of accesses per unit time.
[0082] The ZNS-SSD storage system 100 can predict the life cycle of the recycled segment through a machine learning model based on the access patterns and features in the historical data.
[0083] Step S7004: A recycling segment linked list group is established based on the effective unit ratio and the life cycle. Each recycling segment linked list in the recycling segment linked list group stores all recycling segments with effective unit ratios in the same range in order of the life cycle.
[0084] like Figure 5 As shown, the recycling segment linked list group is taken as an example in ascending order of life cycle. The ZNS-SSD storage system 100 establishes a recycling segment linked list group based on the effective unit ratio of the recycling segment and its 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 ascending order of life cycle.
[0085] When the number of valid units of a segment changes, its life cycle is reset to zero, and the segment can be inserted into the head or tail of the recycling segment linked list corresponding to the changed number of valid units. At this time, the recycling segment linked list still maintains the order of life cycle.
[0086] Step S7005: acquiring migration cost data of the recycling segment based on the recycling segment information, where the migration cost data is used to characterize the efficiency of the recycling segment in the garbage collection process.
[0087] The ZNS-SSD storage system 100 can obtain the 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 garbage collection process. The migration cost data may include the proportion of valid units of the recycling segment and the size of the recycling segment. The feasible expression of the migration cost data is as follows:
[0088] L Q =(N y +C)T y
[0089] Where, L Q is the migration cost, N y is the number of effective units to be migrated, C is a constant parameter, N y is the average cost of migrating effective units.
[0090] Step S7006: If the migration cost data meets the parallel migration condition, the data migration process of the recovered segments is processed in parallel.
[0091] The ZNS-SSD storage system 100 can determine whether the parallel migration condition is met based on the migration cost data. If so, the parallel threads of the segment garbage collection can be allocated based on the number of consecutive valid units of the physical address and the total number of valid units to implement the data migration process of the segmented recycling in parallel. The FTL module implemented based on the host 101 can implement process scheduling management to achieve parallel process and serial process management of the segmented garbage collection.
[0092] Step S7007, based on the recycling segment information and the target segment information, the chip information of the recycling block and the target block is obtained, the recycling segment includes the recycling block, and the target segment includes the target block.
[0093] The ZNS-SSD storage system 100 can determine chip information of valid data of a physical recycling block logically mapped by a recycling segment based on recycling segment information, and can also determine chip information of free space of a physical target block logically mapped by a target segment based on target segment information.
[0094] Step S7008, matching chip information of the recovery block and the target block, such as Figure 4 As shown, after matching, the recovered blocks that share a common chip with the target blocks are migrated within the common chip.
[0095] refer to Figure 6 The ZNS-SSD storage system 100 can match the chip information of the physical recovery block with the chip information of the physical target block. If a shared chip is identified, the physical recovery block with the shared chip and the physical target block are matched, and the effective data of the matched recovery block is migrated on the common chip.
[0096] Step S7009: according to the recycled segment linked list group, based on the recycled segment information and the target segment information, migrate the valid data in the recycled segment to the target segment.
[0097] If a certain reclaimed segment meets the parallel migration condition and / or the address remapping condition, then the list in which it is located and the remaining reclaimed segment lists in the corresponding order can be determined to meet the corresponding parallel migration condition and / or the address remapping condition.
[0098] like Figure 4 As shown, after selecting the recycling segment and the target segment, the ZNS-SSD storage system 100 can migrate the valid data in the recycling segment to the target segment through physical read-write migration or address remapping based on the recycling segment information and the target segment information, and update the corresponding metadata.
[0099] Step S7010, in response to migrating all valid data in the garbage collection area, erasing the segment mapped in the garbage collection area to implement garbage collection.
[0100] The ZNS-SSD storage system 100 can determine whether all valid data in the garbage collection area has been migrated based on the updated metadata, and in response to the migration of all valid data in the garbage collection area, erase the segment mapped in the garbage collection area to implement garbage collection.
[0101] At this point, all the implementation steps of the garbage collection method for a ZNS-SSD storage system described in the present invention are completed.
[0102] In several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus and method embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the apparatus, method and computer program product according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0104] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention is essentially or partly contributed to the prior art or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. It should be noted that, in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
[0105] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0106] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0107] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0108] The "first\second" mentioned in the embodiments is only to distinguish similar objects, and does not represent a specific order for the objects. It is understandable that the "first\second" can be interchanged with the specific order or sequence where permitted. It should be understood that the objects distinguished by "first\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.
[0109] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A garbage collection method for a ZNS-SSD storage system, characterized in that: The steps include: S7001. Obtain garbage collection request information; S7002, generating recycling segment information and target segment information according to the garbage recycling request information; S7003. Obtaining the effective unit ratio and life cycle of the recycling segment based on the recycling segment information; S7004. Establish a recycling segment linked list group based on the effective unit ratio and life cycle; S7005. Obtain migration cost data of the recovery segment based on the recovery segment information; S7006. If the migration cost data meets the parallel migration condition, the data migration process of the recovered segments is processed in parallel; S7007, acquiring chip information of the recovery block and the target block based on the recovery segment information and the target segment information; S7008, matching chip information of the recovery block and the target block, and performing data intra-chip migration on the common chip for the recovery block that shares a common chip with the target block after the matching is completed; S7009, according to the recycling segment linked list group, based on the recycling segment information and the target segment information, migrate the valid data in the recycling segment to the target segment; S7010. In response to migrating all valid data in the garbage collection area, erasing the segment mapped in the garbage collection area to implement garbage collection.
2. The garbage collection method for the ZNS-SSD storage system according to claim 1, characterized in that: 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 indicate the operation of migrating or erasing data on 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.
3. The garbage collection method for the ZNS-SSD storage system according to claim 1, characterized in that: In step S7002, the ZNS-SSD storage system generates recycling segment information and target segment information according to the acquired garbage collection request information. The recycling segment information is used to represent the segments that contain continuous invalid data exceeding a preset threshold, and the target segment information is used to represent the segments that are optimal in comprehensive considerations including but not limited to data hot and cold matching, space utilization, and physical distance from the recycling segment. The recycling segment is determined by the greedy algorithm and / or the value cost algorithm. The expressions of the greedy algorithm and the value cost algorithm are as follows: Where, L CB is the objective function of the value cost algorithm, K is the proportion of invalid data units in the segment, T is the life cycle of the segment, F(T) is the hot and cold measurement function of the segment, and L G is the objective function of the greedy algorithm, s i is the data unit, C(s i ) is the recycling cost of the data unit.
4. The garbage collection method for the ZNS-SSD storage system according to claim 1, characterized in that: In step S7003, the life cycle is used to characterize the average access frequency of the data in the target segment; the life cycle is represented based on the average time interval at which the data in the recycling segment is accessed and / or the number of accesses per unit time.
5. The garbage collection method for the ZNS-SSD storage system according to claim 1, characterized in that: In step S7004, each recycling segment linked list in the recycling segment linked list group stores all recycling segments whose valid unit ratios are in the same range in order of life cycle; when the number of valid units in a segment changes, its life cycle is reset to zero, and the segment is inserted into the header or footer of the recycling segment linked list corresponding to the changed number of valid units. At this time, the recycling segment linked list still maintains the order of life cycle.
6. The garbage collection method for the ZNS-SSD storage system according to claim 1, characterized in that: In step S7005, the migration cost data is used to characterize the efficiency of the recycling segment in the garbage collection process. The migration cost data includes the proportion of valid units in the recycling segment and the size of the recycling segment. The expression of the migration cost data is as follows: L Q =(N y +C)T y Where, L Q is the migration cost, N y is the number of effective units to be migrated, C is a constant parameter, T y is the average cost of migrating effective units.
7. The garbage collection method for the ZNS-SSD storage system according to claim 1, characterized in that: In step S7006, the ZNS-SSD storage system determines whether the parallel migration conditions are met based on the migration cost data. If so, it allocates parallel threads for segmented garbage collection based on the number of consecutive valid units of the physical address and the total number of valid units to implement the data migration process of parallel processing of recovered segments.
8. The garbage collection method for the 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 recovery block logically mapped by the recovery segment based on the recovery 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.
9. The garbage collection method for the ZNS-SSD storage system according to claim 1, characterized in that: In step S7009, if a certain recovery segment satisfies the parallel migration condition and / or address remapping condition, the list in which it is located and the remaining recovery segment lists in the corresponding order are judged to satisfy the corresponding parallel migration condition and / or address remapping condition; after selecting the recovery segment and the target segment, the ZNS-SSD storage system migrates the valid data in the recovery segment to the target segment through physical read-write migration or address remapping based on the recovery 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
Method and system for improving garbage collection accuracy, terminal and storage medium
CN115114182A
ZNS-SSD storage system-oriented garbage collection method
CN116301576A
Data writing method, system and equipment based on small-partition ZNS SSD and medium
CN117991992A
Self-adaptive learning solid state disk garbage collection method
CN118152301A
Cited By
Verification method, platform and equipment for garbage collection strategy stored by universal flash memory and storage medium
CN120610667A
Verification method, platform, device and storage medium for garbage collection strategy of universal flash storage
CN120610667B