ZNS SSD garbage collection sensing method based on MLP

By introducing a garbage collection perception method based on MLP in ZNS SSD, the garbage collection strategy is dynamically adjusted, and the problem of inability to perceive the system load and data writing mode in the existing technology is solved, and more efficient garbage collection and performance optimization are achieved.

CN119473142AActive Publication Date: 2025-02-18QINGHAI NORMAL UNIV

Patent Information

Application Number
CN202411528853.2
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

Technical Problem

The garbage collection mechanism of existing ZNS SSDs cannot dynamically perceive system load and data writing mode, resulting in the inability to adjust the timing and priority of garbage collection in high load or multi-tenant environments, which may lead to system performance degradation and intensification of write amplification.

Method used

The garbage collection perception method based on multi-layer perceptron (MLP) is adopted to dynamically adjust the garbage collection strategy and optimize resource management and performance by monitoring the system load and data writing mode in real time. This method includes load-aware optimization, block priority recycling optimization, and adaptive garbage recycling strategy optimization.

Benefits of technology

It improves the accuracy of garbage collection, reduces the occurrence of write amplification, optimizes the utilization of storage space, and improves the overall system performance and the service life of SSD.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473142A_ABST
    Figure CN119473142A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer storage system and file system data management, and particularly discloses an MLP-based ZNS SSD garbage collection sensing method, which comprises the following steps of: introducing an intelligent monitoring and load sensing algorithm, monitoring a system load and a data writing mode in real time, and dynamically adjusting a garbage collection strategy according to the running state of a current system, so that the garbage collection efficiency is improved. More efficient resource management and performance optimization are realized; the garbage collection operation is only carried out when the system load is relatively low, so that the interference on normal I / O operation is reduced, the overall performance of the system is maintained, and the response speed and the stability of the system are improved especially in a high-load application scene. According to the scheme, the sequential write-in characteristic of the ZNS SSD is utilized, an intelligent garbage collection sensing mechanism is combined, an efficient garbage collection algorithm is provided, and the write-in amplification effect is further reduced and the storage space utilization rate is optimized by optimizing the trigger condition, the collection priority and the system self-adaptive adjustment mechanism of garbage collection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer storage system and file system data management, and in particular to a ZNS SSD garbage collection perception method based on MLP. Background Art

[0002] With the development of big data, cloud computing and artificial intelligence, the demand for data storage is growing, and traditional SSDs are facing performance bottlenecks. In order to optimize the performance of SSDs, ZNS SSD avoids the frequent write amplification phenomenon in traditional SSDs by dividing the logical space into multiple blocks and forcing sequential writes. However, the garbage collection process of ZNS SSD still faces the problem of how to ensure efficient performance while reducing write amplification.

[0003] Most existing garbage collection mechanisms are based on fixed collection strategies and cannot dynamically perceive the current load and data writing mode of the system. For example, the Greedy algorithm or the Cost-benefit algorithm decides when to perform the collection operation based on the proportion of invalid data in the block. Although these strategies can improve the efficiency of garbage collection to a certain extent, they cannot dynamically adapt to complex I / O workloads, especially in multi-tenant or multi-application environments. The timing and priority of garbage collection cannot be adjusted in time, which may lead to system performance degradation, increased latency, and even aggravated write amplification.

[0004] Therefore, a garbage collection method that can dynamically perceive system load and write patterns based on machine learning is needed to achieve more efficient garbage collection operations and further improve the overall performance of ZNS SSD. Summary of the invention

[0005] In order to solve the problems existing in the prior art, the present invention provides a ZNS SSD garbage collection perception method based on MLP, which aims to optimize the traditional garbage collection mechanism, reduce the write amplification effect, and improve the performance and service life of the ZNS SSD. The present invention introduces intelligent monitoring and load perception algorithms to monitor the system load and data writing mode in real time, and dynamically adjusts the garbage collection strategy according to the current system operation status, thereby achieving more efficient resource management and performance optimization. The garbage collection perception method mainly has three aspects of optimization: 1. Load perception optimization 2. Block priority recovery optimization 3. Adaptive garbage collection strategy optimization. This solution utilizes the sequential writing characteristics of the ZNS SSD, combined with the intelligent garbage collection perception mechanism, to provide an efficient garbage collection algorithm, which further reduces the write amplification effect, optimizes the storage space utilization, and improves the overall system performance and the service life of the SSD by optimizing the triggering conditions, recovery priority and system adaptive adjustment mechanism of garbage collection, thereby solving the problems mentioned in the above background technology.

[0006] To achieve the above object, the present invention provides the following technical solution: a ZNS SSD garbage collection perception method based on MLP, comprising the following steps:

[0007] Step 1: Initialize ZNS blocks and extract features: Divide the storage space of ZNS SSD into multiple zones. Each zone is responsible for processing a logical sequential write data. During the initialization phase, feature extraction of the running data of each zone is started at the same time.

[0008] Step 2: System load monitoring and data collection: Track the current system I / O load and determine whether the system is in a high load or low load state;

[0009] Step 3: Determine whether the current I / O load is higher than the preset threshold:

[0010] Step 4: Block status scanning and intelligent classification: Scan all blocks, record the amount of valid data and the proportion of invalid data in each block, and use the pre-trained multi-layer perceptron MLP model to intelligently classify the multi-dimensional data of each block;

[0011] Step 5: Determine whether there are blocks that need to be recycled:

[0012] Step 6: Intelligently select the target zone to be recycled;

[0013] Step 7: Determine whether there is valid data in the target zone;

[0014] Step 8: Determine whether the target zone has enough free space;

[0015] Step 9: Intelligently migrate valid data to the target zone;

[0016] Step 10: Determine whether the data migration is successful;

[0017] Step 11: Execute invalid data erasure: After successful migration, the system uses a delayed erasure mechanism to perform on-demand erasure of invalid data in the recovery zone. The system is busy and the erasure task may be postponed until the load decreases. At the same time, by analyzing the characteristics of I / O load, data access frequency, and storage space usage, the MLP model can intelligently determine whether to execute the erasure immediately or postpone it to a more appropriate time.

[0018] Step 12, update the FTL mapping table: After the data migration is completed, the system will update the logical address to the physical address of the target zone, and the logical address in the FTL mapping table will be redirected to the new physical storage location; at the same time, the system will update the relevant metadata to record the newly migrated physical address and data status to ensure that the data in the new address can be correctly read and written during the next access; after completing the update of the FTL mapping table, the system will perform a consistency check to ensure that all logical addresses are correctly mapped to the new physical address; by comparing the mapping relationship in the metadata, the system can verify whether the mapping table is consistent with the actual data storage status;

[0019] Step 13: System performance monitoring.

[0020] Preferably, in step 3, a multi-layer perceptron MLP model is used to monitor the status of each Zone in real time, including the invalid data ratio of each Zone and the current I / O request queue length; if the invalid data ratio exceeds a threshold, step 2 is entered to delay garbage collection; if the load is low, garbage collection continues to be performed; if it does not exceed the threshold, the Zone status continues to be monitored and waits for the next detection cycle.

[0021] Preferably, in step 5, the MLP model is used to determine whether there are blocks that need to be recycled in the system. If the system detects that one or more zones meet the conditions for garbage collection, it proceeds to step 6, at which point it will further determine which zones are most suitable for recycling and optimize storage space utilization. If the status of all zones does not meet the recycling standard, it proceeds to step 2, at which point the system will continue to monitor the load and zone status until the next scan or trigger event is re-evaluated;

[0022] The conditions for the Zone to meet garbage collection specifically include: a high proportion of invalid data, insufficient available capacity, or the number of erase and write times is close to the upper limit.

[0023] Preferably, in step 6, the MLP model performs multi-layer nonlinear mapping on the features of each Zone and outputs a "recycling priority score" for each Zone. The higher the score, the more suitable the Zone is for garbage collection. At the same time, an adaptive dynamic partition selection algorithm is used to select partitions based on load-aware scheduling, combined with the current I / O load of the system, block wear and Zone activity, invalid data ratio of the block, and write frequency indicators to dynamically adjust the target partition for garbage collection and select blocks for priority recycling.

[0024] Preferably, in step 7, the valid data in the block to be recovered is migrated to the free block to ensure the integrity and sequential writing requirements of the data, and the multi-layer perceptron MLP model is used to predict the distribution of valid data in the target Zone; if there is valid data in the Zone, proceed to step 8 to further determine whether the target Zone has enough free space; if all data in the Zone is invalid, there is no need to migrate the data, and the system can directly jump to step 11 to execute the erase block operation to release storage space.

[0025] Preferably, in step 8, the following is specifically included:

[0026] First, calculate the size of the data blocks that need to be migrated, that is, the total amount of valid data that needs to be migrated from the zone to be reclaimed;

[0027] Then, the system will check the current available space of the target zone to see if it is sufficient to accommodate the data;

[0028] Finally, the system compares the total amount of migrated data with the available space of the target zone. If the available space is close to the critical value, or there are multiple possible target zones in the system, the MLP model will further use historical data and feature predictions to determine whether the zone can continue to provide sufficient free space to avoid migration failure. If there is enough free space, proceed to step 9 for data migration. If there is not enough space, return to step 6 and reselect the target zone to be reclaimed.

[0029] Preferably, in step 9, the system migrates the valid data in the recycled zone to the selected target zone. The migration process adopts the sequential write mechanism of ZNS SSD. At the same time, the system sets priorities for the data blocks to be migrated, and hot data with higher access frequency will be migrated first to ensure that the data can quickly resume normal reading and writing.

[0030] Preferably, in step 10, after the data migration is completed, the system will use CRC verification or other consistency verification technology to ensure the integrity of the data after the migration; introduce a double verification mechanism, including source data consistency verification before migration and target data integrity verification after migration; if the data migration is successful, enter step 11 and perform invalid data erasure; if the migration fails, return to step 9, and the system re-executes the migration through the exception handling module of Zone FTL.

[0031] Preferably, in step 13, after the mapping table is updated, the system monitors the I / O performance, monitors the system I / O performance after garbage collection, checks whether there are delay or throughput anomalies, and monitors whether the performance decreases after collection; through performance monitoring, the system records the specific impact of the current collection operation on delay and throughput, and feeds these data back to the MLP model to adjust future collection plans;

[0032] The garbage collection frequency and block selection strategy are dynamically adjusted according to the system load, performance monitoring results, and recycling effects. The MLP model prioritizes recycling blocks with a high proportion of invalid data to maximize the release of storage space. By analyzing historical I / O activity, the MLP model prioritizes recycling blocks that store cold data, while temporarily postponing recycling of hot data blocks. The system is regularly maintained by combining system performance monitoring with the intelligent scheduling of the MLP model.

[0033] The beneficial effects of the present invention are:

[0034] 1) Improve the accuracy of garbage collection triggering: Traditional garbage collection mechanisms are usually based on simple static thresholds. This method cannot flexibly respond to dynamic load changes in the system and may trigger recycling operations at inappropriate times, resulting in system performance degradation. By introducing the MLP model, the solution can monitor multiple factors in real time, including the invalid data ratio of the zone, I / O load, and the read and write frequency of the device. The multi-layer perceptron can learn and identify the operating mode of the system. By learning from historical data, the model can predict future I / O load trends. In this way, garbage collection operations can be accurately triggered when the system load is low, avoiding negative impacts on system performance. Since garbage collection operations are only performed when the system load is low, interference with normal I / O operations is reduced, maintaining the overall performance of the system, especially in high-load application scenarios, improving the system's response speed and stability.

[0035] 2) Optimize data migration efficiency and wear leveling: In traditional ZNS SSDs, data migration is usually based on fixed rules and lacks intelligent analysis of specific zone status and future read and write requirements, which may cause data to be migrated to inappropriate zones, increase write amplification effects and reduce wear leveling effects. The MLP-based perception method can select the target zone more effectively through real-time intelligent analysis. The MLP model can intelligently select the most suitable target zone for data migration by analyzing the current status of the zone (such as remaining available space, write frequency) and future load predictions (based on historical write patterns). This not only reduces the write operations required for data migration, but also ensures that the migrated data can be rewritten less frequently in the future. Through this optimization, the total number of writes to the SSD is reduced, reducing the write amplification effect, while more evenly distributing the write operations of the zone, reducing excessive wear of certain zones, and extending the service life of the entire SSD.

[0036] 3) Reduce the negative impact on system performance: When garbage collection is triggered, data migration and invalid data erasure are performed simultaneously, the I / O performance of the system may be seriously affected, especially under high load. If garbage collection occurs frequently, it will cause the normal I / O operations of the system (such as read and write requests) to be delayed or even blocked. The MLP-based perception method can reduce this impact through intelligent scheduling. The MLP model can not only predict the load of the system, but also intelligently adjust the garbage collection operation according to the current and future I / O requirements. For example, when the system load is high, the erasure and mapping table update can be postponed, and high-priority I / O operations can be performed first; when the load is low, garbage collection can be performed immediately. MLP is also able to analyze the system performance bottleneck and avoid performing expensive erasure operations under high load. Through this intelligent scheduling, the I / O performance of the system is significantly optimized, especially when dealing with high load and large-scale concurrent operations, reducing the conflict between I / O operations and garbage collection, thereby improving the system's responsiveness and overall performance.

[0037] 4) Extend SSD life and reduce maintenance costs: Under the traditional garbage collection mechanism, frequent garbage collection and write operations will increase the wear of the SSD. In particular, write hot spots will cause some zones to be erased and written much more frequently than other zones, causing these zones to fail prematurely. The MLP model can perform dynamic wear leveling based on the usage history of the zones and future load predictions. By analyzing the historical erase and write times and remaining life of the zones, the MLP model can balance the erase and write loads of each zone and avoid excessive use of hot spots. In addition, MLP can also predict the future usage frequency of the zones and avoid writing new data to zones whose life is about to expire, thereby reducing wear. This MLP-based wear leveling not only extends the service life of the SSD, but also reduces the equipment maintenance and replacement costs caused by premature failure. At the same time, it can ensure the reliability of the SSD, allowing it to maintain high performance after long-term use.

[0038] 5) Improve system resource utilization: The MLP-based garbage collection method not only optimizes the timing of data migration and recycling, but also improves overall resource utilization by properly managing invalid data and storage space. The MLP model can effectively predict which zones' storage resources should be recycled first to maximize the available space of storage devices. The MLP model can identify which zones have the highest proportion of invalid data, and can predict through historical analysis which zones will become new storage hotspots in the future and give priority to recycling. In addition, the system can also intelligently adjust the frequency of garbage collection to avoid I / O performance waste caused by excessive recycling. This intelligent resource management method enables the system to use available storage space more efficiently, reduces the long-term occupation of storage resources by invalid data, and thus improves the overall storage utilization and throughput of the SSD. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a principle architecture diagram of the ZNS SSD garbage collection perception method based on MLP of the present invention;

[0040] Figure 2 The figure is a flow chart of the ZNS SSD garbage collection perception method based on MLP of the present invention. 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 embodiment of the present invention discloses a ZNS SSD garbage collection perception method based on MLP, the basic principle of which is as follows: Figure 1 As shown, the entire garbage collection process is divided into four processes: triggering garbage collection operations, data migration and invalid data erasure, and mapping table update.

[0043] Garbage collection triggering: When performing normal I / O operations at the file system layer (such as NTFS or EXT4), the control module of the storage device will still monitor the usage of each zone according to the characteristics of the ZNS SSD. By introducing the MLP model, the system can combine multi-dimensional data for real-time analysis and prediction. The garbage collection module uses the MLP model to analyze the invalid data ratio and future usage of each zone in real time. When the storage device layer of the system monitors that the invalid data ratio in some zones reaches the threshold and the load is low in the short term in the future, the Host FTL module will issue a recycling request through the garbage collection module. The MLP model continuously evaluates the system I / O load and the usage status of the zone. If the system is currently under high load, the MLP model can predict future load trends and intelligently postpone garbage collection operations to avoid interfering with normal I / O operations. If the system is under low load, or MLP predicts that the load will continue to remain low, garbage collection will be triggered immediately to improve the overall efficiency of the system. This triggering mechanism based on the MLP model not only improves the accuracy of garbage collection triggering, but also effectively avoids the performance degradation caused by recycling operations when the system is under high load, thereby optimizing the overall I / O performance.

[0044] Data migration: When a zone is selected as a reclaimed block, the MLP model makes intelligent decisions on the migration operation based on multiple factors. Through the MLP model, the system can predict the future usage of the target zone and avoid migrating data to a zone that may need to be reclaimed in the short term, thereby reducing future garbage collection overhead. During the migration operation, the "request redirection module" in the Host FTL module combined with the intelligent analysis of MLP can accurately identify valid data and migrate it to the optimal target zone. The MLP model is also responsible for predicting the performance changes of the zone after migration to ensure that the migrated data can maintain high availability and access efficiency in the new zone. During this process, the FTL module creates and updates a new logical to physical address mapping to ensure that the migrated data can be correctly accessed. When the Zone FTL layer schedules I / O operations, the MLP model can further optimize the scheduling strategy through real-time monitoring of the migration process and future load prediction to ensure that the migration operation has the least impact on system performance, and even actively postpone the migration or disperse the operation under high load conditions to maintain the overall performance stability of the system.

[0045] Invalid data erasure: When data migration is completed, the only invalid data left in the original recovery block will be erased through the intelligent monitoring and analysis of the MLP model. The MLP model will dynamically adjust the timing and execution method of erasure according to the health status of the zone, the wear degree of the storage chip, and the current and future load of the system to maximize the hardware life and improve operation efficiency. Under the traditional ZNS SSD internal control mechanism, the erase operation is directly executed on the data marked as invalid. After adding MLP, the system will not only issue an erase command through the FTL control module, but also use MLP to analyze which zones are suitable for immediate erasure and which zones can temporarily postpone the erase operation. Based on the current system load and the estimated future I / O requirements, the erase task is intelligently scheduled. This makes the erase operation more flexible and avoids unnecessary performance loss when the system is highly loaded. The MLP model can also detect the health status of the storage device in real time. In particular, during the erase process, MLP will monitor the wear of the zone and combine the exception handling mechanism of the zone FTL to predict possible hardware failures in advance. In addition, the MLP model can also predict the optimal strategy for batch erasure through historical data and current conditions, further optimizing the block structure of ZNS and making the erasure operation more orderly and efficient.

[0046] Mapping table update: After completing the data migration and recycling operations, the MLP model will intelligently determine the optimal time and method for updating the mapping table (Map_table). The FTL module will accurately adjust the mapping from logical addresses to physical addresses based on the analysis results of MLP to ensure that the physical locations of all valid data are correctly mapped. MLP will determine when to update the mapping based on the system's load prediction model to ensure that the update process does not affect the normal I / O operations of the system. At the same time, with the assistance of MLP, the "wear leveling" operation of Zone FTL becomes more intelligent. The MLP model will accurately predict which zones need to be evenly distributed with write operations by analyzing the service life and number of writes of each zone to avoid excessive wear of some zones due to frequent erasure. During the mapping update process, MLP can also monitor the usage of storage resources in real time to ensure that mapping updates and storage resource management are carried out simultaneously.

[0047] A ZNS SSD garbage collection perception method based on MLP, such as Figure 2 As shown, the implementation steps include:

[0048] Step 1: Initialize ZNS blocks and extract features. According to storage requirements, the storage space of ZNS SSD is divided into multiple zones. Each zone is responsible for processing a logical sequence of written data. During the initialization phase, feature extraction of the relevant operating data of each zone is started at the same time. These features will be used for subsequent machine learning model training and decision-making.

[0049] Step 2: System load monitoring and data collection, real-time tracking of the current system I / O load, to determine whether the system is in a high-load or low-load state. At the same time, the machine learning model (MLP) is used to evaluate the current system load. By detecting CPU utilization, I / O queue length, and read and write request frequency, the system determines whether it is currently suitable to perform garbage collection operations. If the load is too high, garbage collection will be postponed to avoid affecting the performance of ongoing applications; if the load is low, garbage collection can be safely performed to optimize the utilization efficiency of system resources;

[0050] Step 3: Determine the current I / O load and use the multi-layer perceptron (MLP) model to monitor the status of each zone in real time, including the invalid data ratio of each zone and the current I / O request queue length. The MLP model also periodically updates the usage of each zone. If the invalid data ratio exceeds the threshold, it goes to step 2 and delays garbage collection. If the load is low, continue to perform garbage collection. If it does not exceed the threshold, continue to monitor the zone status and wait for the next detection cycle;

[0051] Step 4: Block status scanning and intelligent classification, scan all blocks, record the amount of valid data and the proportion of invalid data in each block, and use the pre-trained multi-layer perceptron (MLP) model to intelligently classify the multi-dimensional data of each block. The MLP model not only relies on the current scan data, but also refers to historical data to dynamically adjust the classification criteria according to the overall operation of the system. When classifying, the model will balance the current system load, I / O activity, and block wear to make garbage collection operations more accurate. The state of the block changes dynamically. As more data is collected, the MLP model will continuously update the classification results according to the real-time changing state to ensure that garbage collection operations are always based on the latest decision information;

[0052] Step 5: Use the MLP model to determine whether there are blocks that need to be recycled in the system. If the system detects that one or more zones meet the conditions for garbage collection (such as a high proportion of invalid data, insufficient available capacity, or the number of erases and writes is close to the upper limit), it will enter step 6. At this time, it will further determine which zones are most suitable for recycling and optimize storage space utilization. If the status of all zones does not meet the recycling standard, it will enter step 2. At this time, the system will continue to monitor the load and zone status until the next scan or trigger event for re-evaluation;

[0053] Step 6: Intelligently select the target zone to be recycled. The MLP model performs multi-layer nonlinear mapping on the characteristics of each zone and outputs a "recycling priority score" for each zone. The higher the score, the more suitable the zone is for garbage collection. At the same time, an adaptive dynamic partition selection algorithm is used to select partitions based on load-aware scheduling, combined with the current system I / O load, block wear and zone activity, invalid data ratio of the block, write frequency and other indicators, to dynamically adjust the target partition for garbage collection and select the blocks to be recycled first;

[0054] Step 7: Determine whether there is valid data in the target Zone, and migrate the valid data in the block to be recovered to the free block to ensure data integrity and sequential writing requirements. Use the multi-layer perceptron (MLP) model to predict the distribution of valid data in the target Zone. By inputting relevant features, the MLP model can help quickly identify which data blocks may still be valid. If there is valid data in the Zone, proceed to step eight to further determine whether the target Zone has enough free space. If all data in the Zone has expired (invalid data), there is no need to migrate data, and the system can directly jump to step eleven to perform the erase block operation to free up storage space;

[0055] Step 8: To determine whether the target Zone has enough free space, the system first makes a simple judgment based on the currently available free space data. First, calculate the size of the data block that needs to be migrated, that is, the total amount of valid data that needs to be migrated from the Zone to be reclaimed. Then, the system checks the current available space of the target Zone to see if it is sufficient to accommodate this data. Finally, the system compares the total amount of migrated data with the available space of the target Zone. If the free space is close to the critical value, or there are multiple possible target Zones in the system, the MLP model will further use historical data and feature predictions to determine whether the Zone can continue to provide sufficient free space to avoid migration failure. At the same time, as time goes by, the MLP model will adaptively optimize according to the real-time performance of the system to continuously improve the accuracy and efficiency of the prediction. If there is enough free space, proceed to step nine for data migration. These data need to be safely migrated to other free blocks to ensure data integrity. If there is not enough space, return to step six and reselect the target Zone to be reclaimed;

[0056] Step 9: Intelligently migrate valid data to the target zone. The system will migrate valid data in the recycling zone to the selected target zone. The migration process adopts the sequential write mechanism of ZNS SSD to avoid the random write problem in traditional SSD. In order to improve the migration efficiency, the system uses the multi-layer perceptron (MLP) model to make intelligent decisions on the migration order and target location of valid data. According to the results output by the MLP model, the system will set priorities for the data blocks to be migrated. Hot data with higher access frequency will be migrated first to ensure that the data can be quickly restored to normal reading and writing. After the migration operation is completed, the system will monitor the data consistency and integrity in real time, and ensure that the data is not damaged during the migration process through a verification mechanism. The MLP model can continuously adjust and optimize subsequent migration decisions based on the feedback data of the migration results;

[0057] Step 10: Determine whether the data migration is successful. After the data migration is completed, the system will use CRC verification or other consistency verification technologies to ensure the integrity of the migrated data. A double verification mechanism is introduced, including the source data consistency check before migration and the target data integrity check after migration. If the data migration is successful, proceed to step 11 to perform invalid data erasure. If the migration fails, return to step 9, and the system re-executes the migration through the exception handling module of Zone FTL;

[0058] Step 11: Perform invalid data erasure. After the migration is successful, the system uses a delayed erasure mechanism to perform on-demand erasure of invalid data in the recovery zone. To avoid affecting system performance, the erasure operation can also be optimized through intelligent scheduling strategies to ensure that the erasure task is performed when the system load is low or idle. The system monitors the current I / O load to avoid performing erasure operations under high load. If the system is busy, the erasure task may be postponed and executed after the load drops. This can reduce interference with current read and write operations and maintain stable system performance. At the same time, by analyzing characteristics such as I / O load, data access frequency, and storage space utilization, the MLP model can intelligently determine whether to perform erasure immediately or postpone it to a more appropriate time;

[0059] Step 12: Update the FTL mapping table. After the data migration is completed, the system will update the logical address to the physical address of the target zone. The logical address in the FTL mapping table will point to the new physical storage location again. At the same time, the system will update the relevant metadata to record the newly migrated physical address and data status to ensure that the data in the new address can be correctly read and written during the next access. After completing the update of the FTL mapping table, the system will perform a consistency check to ensure that all logical addresses are correctly mapped to the new physical address. By comparing the mapping relationship in the metadata, the system can verify whether the mapping table is consistent with the actual data storage status. After the mapping table is updated, the system will monitor the I / O performance to ensure that the mapping table update does not affect the ongoing read and write operations. Through real-time monitoring, the system can optimize subsequent mapping table update strategies;

[0060] Step 13: System performance monitoring, monitor the system I / O performance after garbage collection, check whether there are delays or throughput anomalies, and monitor whether the performance decreases after collection. Through performance monitoring, the system will record the specific impact of the current collection operation on latency and throughput, and feed this data back to the MLP model to adjust future collection plans;

[0061] Step 14: Adaptively adjust the recycling strategy. Dynamically adjust the garbage collection frequency and block selection strategy based on the system load, performance monitoring results, and recycling effects. The MLP model will prioritize recycling blocks with a high proportion of invalid data to maximize storage space release. By analyzing historical I / O activity, the MLP model can also prioritize recycling blocks that store cold data, while hot data blocks can be temporarily postponed to avoid affecting performance. Through continuous performance monitoring and feedback from the MLP model, the system can adaptively optimize the garbage collection scheduling plan to ensure that system performance is not affected in the long term.

[0062] Step 15: Regular system maintenance. Combined with the intelligent scheduling of the MLP model, the system can dynamically adjust the maintenance plan to minimize the impact on the business, while extending the service life of the SSD and improving the utilization efficiency of storage resources.

[0063] At this point, all the implementation steps of the MLP-based ZNS SSD garbage collection perception method described in the embodiment of the present invention are completed.

[0064] 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.

[0065] 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.

[0066] 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.

[0067] 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.

[0068] 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.

[0069] 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.

[0070] 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 ZNS SSD garbage collection perception method based on MLP, characterized in that: The steps include: Step 1: Initialize ZNS blocks and extract features: Divide the storage space of ZNS SSD into multiple zones. Each zone is responsible for processing a logical sequential write data. During the initialization phase, feature extraction of the running data of each zone is started at the same time. Step 2: System load monitoring and data collection: Track the current system I / O load and determine whether the system is in a high load or low load state; Step 3: Determine whether the current I / O load is higher than the preset threshold: Step 4: Block status scanning and intelligent classification: Scan all blocks, record the amount of valid data and the proportion of invalid data in each block, and use the pre-trained multi-layer perceptron MLP model to intelligently classify the multi-dimensional data of each block; Step 5: Determine whether there are blocks that need to be recycled: Step 6: Intelligently select the target zone to be recycled; Step 7: Determine whether there is valid data in the target zone; Step 8: Determine whether the target zone has enough free space; Step 9: Intelligently migrate valid data to the target zone; Step 10: Determine whether the data migration is successful; Step 11: Execute invalid data erasure: After successful migration, the system uses a delayed erasure mechanism to perform on-demand erasure of invalid data in the recovery zone. The system is busy and the erasure task may be postponed until the load decreases. At the same time, by analyzing the characteristics of I / O load, data access frequency, and storage space usage, the MLP model can intelligently determine whether to execute the erasure immediately or postpone it to a more appropriate time. Step 12, update the FTL mapping table: After the data migration is completed, the system will update the logical address to the physical address of the target zone, and the logical address in the FTL mapping table will be redirected to the new physical storage location; at the same time, the system will update the relevant metadata to record the newly migrated physical address and data status to ensure that the data in the new address can be correctly read and written during the next access; after completing the update of the FTL mapping table, the system will perform a consistency check to ensure that all logical addresses are correctly mapped to the new physical address; by comparing the mapping relationship in the metadata, the system can verify whether the mapping table is consistent with the actual data storage status; Step 13: System performance monitoring.

2. The MLP-based ZNS SSD garbage collection perception method according to claim 1, characterized in that: In step 3, a multi-layer perceptron (MLP) model is used to monitor the status of each zone in real time, including the invalid data ratio of each zone and the current I / O request queue length. If the invalid data ratio exceeds the threshold, step 2 is entered to delay garbage collection. If the load is low, garbage collection continues. If it does not exceed the threshold, the zone status continues to be monitored and waits for the next detection cycle.

3. The MLP-based ZNS SSD garbage collection perception method according to claim 1, characterized in that: In step 5, the MLP model is used to determine whether there are blocks that need to be recycled in the system. If the system detects that one or more zones meet the conditions for garbage collection, it will enter step 6, at which point it will further determine which zones are most suitable for recycling and optimize storage space utilization. If the status of all zones does not meet the recycling criteria, it will enter step 2, at which point the system will continue to monitor the load and zone status until the next scan or trigger event for re-evaluation; The conditions for the Zone to meet garbage collection specifically include: a high proportion of invalid data, insufficient available capacity, or the number of erase and write times is close to the upper limit.

4. The MLP-based ZNS SSD garbage collection perception method according to claim 1, characterized in that: In step 6, the MLP model performs multi-layer nonlinear mapping on the features of each Zone and outputs a "recycling priority score" for each Zone. The higher the score, the more suitable the Zone is for garbage collection. At the same time, an adaptive dynamic partition selection algorithm is used to select partitions based on load-aware scheduling. The algorithm combines the current I / O load of the system, the wear of the blocks, the activity of the Zone, the proportion of invalid data in the blocks, and the write frequency to dynamically adjust the target partition for garbage collection and select the blocks for priority recycling.

5. The MLP-based ZNS SSD garbage collection perception method according to claim 1, characterized in that: In step 7, the valid data in the block to be recovered is migrated to the free block to ensure the integrity and sequential writing requirements of the data, and the multi-layer perceptron MLP model is used to predict the distribution of valid data in the target Zone; if there is valid data in the Zone, go to step 8 to further determine whether the target Zone has enough free space; if all the data in the Zone is invalid, there is no need to migrate the data, and the system can directly jump to step 11 to execute the erase block operation to release storage space.

6. The MLP-based ZNS SSD garbage collection perception method according to claim 1, characterized in that: In step 8, the specific steps include: First, calculate the size of the data blocks that need to be migrated, that is, the total amount of valid data that needs to be migrated from the zone to be reclaimed; Then, the system will check the current available space of the target zone to see if it is sufficient to accommodate the data; Finally, the system compares the total amount of migrated data with the available space of the target zone. If the available space is close to the critical value, or there are multiple possible target zones in the system, the MLP model will further use historical data and feature predictions to determine whether the zone can continue to provide sufficient free space to avoid migration failure. If there is enough free space, proceed to step 9 to migrate the data. If there is not enough space, return to step 6 and reselect the target zone to be recycled.

7. The MLP-based ZNS SSD garbage collection perception method according to claim 1, characterized in that: In step 9, the system migrates the valid data in the recycled zone to the selected target zone. The migration process adopts the sequential write mechanism of ZNS SSD. At the same time, the system sets priorities for the data blocks to be migrated. Hot data with higher access frequency will be migrated first to ensure that the data can be quickly restored to normal reading and writing.

8. The MLP-based ZNS SSD garbage collection perception method according to claim 1, characterized in that: In step 10, after the data migration is completed, the system will use CRC verification or other consistency verification technologies to ensure the integrity of the migrated data; a double verification mechanism is introduced, including source data consistency verification before migration and target data integrity verification after migration; If the data migration is successful, proceed to step 11 to perform invalid data erasure; If the migration fails, return to step 9, and the system re-executes the migration through the exception handling module of Zone FTL.

9. The MLP-based ZNS SSD garbage collection perception method according to claim 1, characterized in that: In step 13, after the mapping table is updated, the system will monitor the I / O performance, monitor the system I / O performance after garbage collection, check whether there are latency or throughput anomalies, and monitor whether the performance decreases after collection; through performance monitoring, the system will record the specific impact of the current collection operation on latency and throughput, and feed this data back to the MLP model to adjust future collection plans; The garbage collection frequency and block selection strategy are dynamically adjusted according to the system load, performance monitoring results, and recycling effects. The MLP model prioritizes recycling blocks with a high proportion of invalid data to maximize the release of storage space. By analyzing historical I / O activity, the MLP model prioritizes recycling blocks that store cold data, while temporarily postponing recycling of hot data blocks. The system is regularly maintained by combining system performance monitoring with the intelligent scheduling of the MLP model.

Citation Information

Patent Citations

  • Using data similarity to select segments for garbage collection

    CN116601596A

  • Data protection method and system for solid state disk

    CN118051190A

  • KR20240130056A

Cited By

  • Garbage recycling method and device of storage device, medium and computer equipment

    CN120256328A

  • Storage space recovery method, electronic equipment, storage medium and program product

    CN120335733A

  • Storage space recovery method, electronic device, storage medium and program product

    CN120335733B

  • Flash memory management method for edge computing equipment

    CN120371218A

  • Self-adaptive storage capacity adjusting method and system for industrial-grade solid state disk

    CN120596037A