An MLP-based ZNS SSD garbage collection awareness method
By introducing MLP-based intelligent monitoring and load-aware algorithms, the garbage collection strategy of ZNS SSD is dynamically adjusted, solving the problem of the inability to adjust the garbage collection timing in a timely manner in existing technologies. This achieves more efficient garbage collection, optimizes system performance and storage space utilization, and extends the lifespan of the SSD.
Patent Information
- Application Number
- CN202411528853.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-10-30
AI Technical Summary
The existing ZNS SSD garbage collection mechanism cannot dynamically sense system load and data write patterns, which makes it impossible to adjust the timing and priority of garbage collection in a timely manner in multi-tenant or multi-application environments, resulting in degraded system performance and aggravated write amplification effect.
We introduce intelligent monitoring and load awareness algorithms based on multilayer perceptron (MLP) to monitor system load and data write patterns in real time, dynamically adjust garbage collection strategies, optimize garbage collection triggering conditions, collection priorities, and system adaptive adjustment, and provide efficient garbage collection algorithms in combination with the sequential write characteristics of ZNS SSD.
It improves the accuracy of garbage collection, reduces write amplification, optimizes storage space utilization, enhances system performance and SSD lifespan, reduces interference with normal I/O operations, extends SSD lifespan, and lowers maintenance costs.
Smart Images

Figure CN119473142B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer storage systems and file system data management, and particularly relates to a ZNS SSD garbage collection perception method based on MLP. BACKGROUND
[0002] With the development of big data, cloud computing and artificial intelligence, the demand for data storage is growing, and the traditional SSD is facing performance bottlenecks. In order to optimize the performance of SSD, ZNS SSD divides the logical space into multiple blocks and forces sequential writing, avoiding the frequent write amplification phenomenon in traditional SSD. However, the garbage collection process of ZNS SSD still faces the problem of how to reduce write amplification while ensuring high performance.
[0003] Existing garbage collection mechanisms are mostly based on fixed recovery strategies and cannot dynamically perceive the current load and data write mode of the system. For example, Greedy algorithm or Cost-benefit algorithm, these algorithms decide when to perform recovery operation according to the invalid data proportion of the block. Although these strategies can improve the efficiency of garbage collection to some extent, they cannot dynamically adapt to complex I / O workloads, especially in multi-tenant or multi-application environments, and cannot timely adjust the timing and priority of garbage collection, which may lead to system performance degradation, increased latency, and even exacerbation of write amplification.
[0004] Therefore, a garbage collection method based on machine learning is needed to dynamically perceive system load and write mode, in order to achieve more efficient garbage collection operations and further improve the overall performance of ZNS SSD. SUMMARY
[0005] To solve the problems in the prior art, the present application provides a ZNS SSD garbage collection perception method based on MLP, which aims to optimize the traditional garbage collection mechanism, reduce write amplification effect, and improve the performance and service life of ZNS SSD. By introducing intelligent monitoring and load perception algorithm, the present application monitors system load and data write mode in real time, dynamically adjusts garbage collection strategy according to the current system running state, and realizes 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 scheme uses the sequential writing characteristics of ZNS SSD, combines with intelligent garbage collection perception mechanism, provides an efficient garbage collection algorithm, optimizes the trigger condition of garbage collection, recovery priority and system adaptive adjustment mechanism, further reduces write amplification effect, optimizes storage space utilization, improves overall system performance and service life of SSD, and solves the problems mentioned in the above background technology.
[0006] To achieve the above object, the present application provides the following technical scheme: a ZNS SSD garbage collection sensing method based on MLP, comprising the following steps:
[0007] Step 1, initialization of ZNS block and feature extraction: the storage space of ZNS SSD is divided into multiple Zones, each Zone is responsible for processing a segment of logically sequential write data, and in the initialization stage, the running data of each Zone is simultaneously subjected to feature extraction;
[0008] Step 2, system load monitoring and data collection: track the I / O load of the current system to 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 state scanning and intelligent classification: scan all blocks, record the amount of valid data and the proportion of invalid data of each block, and use the pre-trained multi-layer perception MLP model to intelligently classify the multi-dimensional data of each block;
[0011] Step 5, determine whether there is a block that needs 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 execute on-demand erasure of invalid data in the recycled Zone, the system is in a busy state, and the erasure task may be delayed, waiting for the load to decrease before execution; at the same time, by analyzing the features of I / O load, data access frequency, and storage space usage, the MLP model can intelligently determine whether to immediately execute erasure or to delay it to a more appropriate time;
[0018] Step 12, updating the FTL mapping table: after the data migration is completed, the system updates the logical address to the physical address of the target Zone, and the logical address in the FTL mapping table is redirected to the new physical storage location; at the same time, the system updates the related metadata to record the newly migrated physical address and data state, so as to ensure that the data in the new address can be correctly read and written next time; after the FTL mapping table is updated, the system performs consistency check to ensure that all logical addresses are correctly mapped to the new physical addresses; by comparing the mapping relationship in the metadata, the system can verify whether the mapping table is consistent with the actual data storage state;
[0019] Step 13, system performance monitoring.
[0020] Preferably, in step 3, a multi-layer perception (MLP) model is used to monitor the state of each Zone in real time, including the proportion of invalid data and the current I / O request queue length of each Zone; if the proportion of invalid data exceeds the threshold, step 2 is entered to delay garbage collection; if the load is low, garbage collection is continued, and if the threshold is not exceeded, the state of the Zone is continued to be monitored and the next detection period is waited.
[0021] Preferably, in step 5, the MLP model is used to determine whether there is a block that needs to be recycled in the system at present; if the system detects that one or more Zones meet the conditions for garbage collection, step 6 is entered, at which point it is further decided which Zones are most suitable for recycling to optimize storage space utilization; if the state of all Zones does not meet the recycling standard, step 2 is entered, at which point the system continues to monitor the load and the state of the Zone until the next scan or triggering event re-evaluation.
[0022] The conditions for the Zone to meet the garbage collection include a high proportion of invalid data, insufficient available capacity, or a number of erasing times close to the upper limit.
[0023] Preferably, in step 6, the MLP model performs multi-layer non-linear mapping on the characteristics of each Zone to output a “recycle 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 the partition based on load-aware scheduling, combined with the current I / O load of the system, the wear condition of the block, the activity of the Zone, the proportion of invalid data of the block, and the frequency of writing, to dynamically adjust the target partition of garbage collection and thus select the block to be recycled preferentially.
[0024] Preferably, in step 7, the valid data in the to-be-recovered block is migrated to the idle block, ensuring the integrity of the data and the sequential writing requirement, and the distribution of the valid data in the target Zone is predicted by using a multi-layer perception (MLP) model; if there is valid data in the Zone, step 8 is further performed to determine whether the target Zone has sufficient idle space; if all the data in the Zone has been invalidated, i.e., invalid data, data migration is not needed, and the system can directly jump to step 11 to perform a block erasing operation to release the storage space.
[0025] Preferably, in step 8, the following is specifically included:
[0026] Firstly, the size of the data block to be migrated is calculated, i.e., the total amount of valid data to be migrated from the to-be-recovered Zone;
[0027] Then, the system checks the available space of the target Zone to see whether it is sufficient to accommodate the data;
[0028] Finally, the system compares the total amount of the migrated data with the available space of the target Zone: if the available space is close to the critical value, or the system has multiple possible target Zones, the MLP model further determines whether the Zone can continuously provide sufficient idle space by historical data and feature prediction to avoid migration failure; if there is sufficient idle space, step 9 is performed for data migration; if there is not sufficient space, step 6 is returned to reselect the target Zone to be recovered.
[0029] Preferably, in step 9, the system migrates the valid data in the to-be-recovered Zone to the selected target Zone, and the sequential writing mechanism of the ZNS SSD is used in the migration process, and the system sets priorities for the data blocks to be migrated, and the hot data with a high access frequency is preferentially migrated to ensure that the data can be quickly restored to normal reading and writing.
[0030] Preferably, in step 10, after the data migration is completed, the system ensures the integrity of the migrated data by using CRC check or other consistency verification technology; a double-checking mechanism is introduced, including the consistency check of the source data before migration and the integrity check of the target data after migration; if the data migration is successful, step 11 is entered to perform invalid data erasing; if the migration fails, step 9 is returned, and the system re-executes the migration through the abnormal processing module of the Zone FTL.
[0031] Preferably, after the mapping table is updated in step 13, the system monitors the I / O performance, monitors the system I / O performance after garbage collection, checks whether there is a delay or abnormality in throughput, and monitors whether the performance decreases after recovery; through performance monitoring, the system records the specific influence of the current recovery operation on the delay and throughput, and feeds these data back to the MLP model to adjust future recovery plans;
[0032] According to the load of the system, the performance monitoring result and the recovery effect, the garbage recovery frequency and the block selection strategy are dynamically adjusted, the MLP model preferentially selects blocks with a high proportion of invalid data for recovery to maximize the release of storage space; by analyzing the historical I / O activity, the MLP model preferentially recovers blocks storing cold data, and temporarily postpones the recovery of hot data blocks; the system is regularly maintained through the intelligent scheduling of system performance monitoring and the MLP model.
[0033] The beneficial effects of the present application are:
[0034] 1) Improve the accuracy of garbage collection triggering: The traditional garbage collection mechanism is usually based on simple static thresholds, and this method cannot flexibly respond to the dynamic load changes of the system, and may trigger the recovery operation at an inappropriate time, causing the system performance to decrease. By introducing the MLP model, this scheme can monitor multiple factors in real time, including the proportion of invalid data of Zone, I / O load, read-write frequency of devices, etc. The multi-layer perceptron can learn and identify the running mode of the system, and through the learning of historical data, the model can predict the future I / O load trend. In this way, the garbage collection operation can be triggered accurately when the system load is low, avoiding the negative impact on the performance of the system. Since the garbage collection operation is only performed when the system load is low, the interference to normal I / O operations is reduced, the overall performance of the system is maintained, and especially in high-load application scenarios, the response speed and stability of the system are improved.
[0035] 2) Optimizing data migration efficiency and wear leveling: In traditional ZNS SSDs, data migration is usually based on fixed rules, lacking intelligent analysis of the specific Zone state and future read-write demands, which may lead to data migration to inappropriate Zones, increasing write amplification and reducing wear leveling effects. The perception method based on MLP can more effectively select target Zones through real-time intelligent analysis. The MLP model can intelligently select the most suitable target Zone for data migration by analyzing the current state of the Zone (such as remaining available space, write frequency) and future load prediction (according to historical write patterns). This not only reduces the number of write operations required for data migration, but also ensures that migrated data can reduce the number of rewrites 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 Zones, reducing the excessive wear of some Zones, and extending the service life of the entire SSD.
[0036] 3) Reduce the negative impact on system performance: When garbage collection triggers, data migration, and invalid data erasure occur simultaneously, the I / O performance of the system may be severely affected, especially under high load. If garbage collection occurs frequently, it will cause delays or even blockages in the system's normal I / O operations (such as read-write requests). The perception method based on MLP can reduce this impact through intelligent scheduling. The MLP model can not only predict the system's load, but also intelligently adjust garbage collection operations based on current and future I / O demands. For example, when the system load is high, erasure and mapping table updates can be delayed, and high-priority I / O operations can be performed first; when the load is low, garbage collection can be performed immediately. MLP can also analyze system performance bottlenecks to avoid performing costly erasure operations under high load. Through this intelligent scheduling, the I / O performance of the system is significantly optimized, especially when handling high loads and large-scale concurrent operations, reducing conflicts between I / O operations and garbage collection, thereby improving the system's response speed and overall performance.
[0037] 4) Prolonging SSD lifespan and reducing maintenance costs: Under the traditional garbage collection mechanism, frequent garbage collection and write operations increase the wear and tear of SSDs, especially hot spots of writing cause some Zones to have much higher erase-write times than others, leading to premature failure of these Zones. The MLP model can dynamically balance wear and tear based on the history and future load prediction of Zone usage. By analyzing the historical erase-write times and remaining lifespan of Zones, the MLP model can balance the erase-write load of each Zone, avoiding the overuse of hot spot Zones. In addition, MLP can also predict the future usage frequency of Zones, avoiding writing new data to Zones with an imminent expiration date, thereby reducing wear and tear. This MLP-based wear leveling not only prolongs the service life of SSDs, but also reduces the cost of device maintenance and replacement due to premature failure. At the same time, it can ensure the reliability of SSDs, so that they can maintain high performance after long-term use.
[0038] 5) Improve system resource utilization: The MLP-based garbage collection method not only optimizes data migration and collection timing, but also improves overall resource utilization by reasonably managing invalid data and storage space. The MLP model can effectively predict which Zones should have their storage resources prioritized for recycling to maximize the available space of the storage device. The MLP model can identify which Zones have the highest proportion of invalid data and can predict which Zones will become new storage hotspots in the future through historical analysis, prioritizing recycling. In addition, the system can intelligently adjust the frequency of garbage collection to avoid wasting I / O performance due to excessive recycling. This intelligent resource management method enables the system to use available storage space more efficiently, reducing the situation where invalid data occupies storage resources for a long time, thereby improving the overall storage utilization and throughput of SSDs. BRIEF DESCRIPTION OF DRAWINGS
[0039] Figure 1 The MLP-based ZNS SSD garbage collection perception method principle architecture diagram of the application;
[0040] Figure 2 The MLP-based ZNS SSD garbage collection perception method flowchart of the application. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the application will be described in detail below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all embodiments. Based on the embodiments in the application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the application.
[0042] The embodiment of the application discloses a ZNS SSD garbage collection sensing method based on MLP, and the basic principle is as shown in Figure 1 The whole garbage collection process is divided into four processes, i.e., triggering a garbage collection operation, data migration and invalid data erasing, and mapping table updating.
[0043] Garbage collection triggering: when normal I / O operation is performed in the file system layer (such as NTFS or EXT4), the control module of the storage device still monitors the use of each Zone according to the characteristics of the ZNS SSD. By introducing the MLP model, the system can combine multiple dimensions of data for real-time analysis and prediction. The garbage collection module analyzes the invalid data proportion and future use of each Zone in real time through the MLP model. When the system storage device layer monitors that the invalid data proportion in certain Zone reaches a threshold value and the load is low in the future, the Host FTL module will issue a recovery request through the garbage collection module. The MLP model continuously evaluates the system I / O load and the use state of the Zone. If the system is currently in a high load state, the MLP model can predict the future load trend, intelligently delay the garbage collection operation, and avoid interfering with normal I / O operation. If the system is in a low load state, or the MLP predicts that the load will continue to be low, the 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 decline caused by the recovery operation in the high load state, thereby optimizing the overall I / O performance.
[0044] Data migration: when a certain Zone is selected as a recovery block, the MLP model will make intelligent decisions on the migration operation according to multiple factors. Through the MLP model, the system can predict the future use of the target Zone, avoid migrating data to the Zone that may need to be recovered in the short term, and thus reduce the future garbage collection overhead. In the migration operation, the "request redirection module" in the Host FTL module combines the intelligent analysis of the MLP to accurately identify valid data and migrate it to the optimal target Zone. The MLP model is responsible for predicting the performance change of the Zone after migration, ensuring that the data after migration can maintain high availability and access efficiency in the new Zone. In this process, the FTL module creates and updates the new logical-to-physical address mapping to ensure that the data after migration can be accessed correctly. When scheduling I / O operation, the MLP model can further optimize the scheduling strategy through real-time monitoring and future load prediction of the migration process, so as to minimize the impact of the migration operation on the system performance, or even actively delay the migration or scatter the operation under high load to maintain the overall performance stability of the system.
[0045] Invalid data erasure: After data migration is completed, the remaining invalid data in the original recycling block will be erased through intelligent monitoring and analysis of the MLP model. The MLP model will dynamically adjust the timing and execution of erasure based on the health status of the Zone, the wear level of the storage chip, and the current and future load of the system, to maximize hardware life and improve operational efficiency. Under the traditional internal control mechanism of ZNS SSD, the erasure operation is directly performed on the data marked as invalid. With the addition of MLP, the system not only issues erasure commands through the FTL control module, but also analyzes which Zones are suitable for immediate erasure and which Zones can temporarily postpone erasure operations. Based on the current system load and future estimated I / O demand, the MLP intelligently schedules erasure tasks. This makes the erasure operation more flexible and can avoid unnecessary performance loss during high system load. The MLP model can also detect the health status of the storage device in real time, especially during the erasure process. The MLP monitors the wear of the Zone and combines the abnormal handling mechanism of the Zone FTL to predict possible hardware failures in advance. In addition, the MLP model can predict the optimal strategy for batch erasure based on historical data and current conditions, further optimizing the block structure of ZNS, making the erasure operation more orderly and efficient.
[0046] Map table update: After completing data migration and recycling operations, the MLP model intelligently determines the optimal timing and method for updating the mapping table (Map_table). The FTL module will accurately adjust the mapping of logical addresses to physical addresses based on the analysis results of the MLP, ensuring that the physical locations of all valid data are correctly mapped. The 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 normal I / O operations. At the same time, with the assistance of MLP, the "wear leveling" operation of Zone FTL becomes more intelligent. The MLP model will analyze the service life and write times of each Zone to accurately predict which Zones need to be evenly distributed for write operations to avoid excessive wear of some Zones due to frequent erasing and writing. During the mapping update process, the MLP can also monitor the usage of storage resources in real time to ensure that mapping updates and storage resource management are synchronized.
[0047] A MLP-based ZNS SSD garbage collection awareness method, as shown in Figure 2 , includes the following implementation steps:
[0048] First Step: Initialization of ZNS Blocks and Feature Extraction, according to storage requirements, the storage space of ZNS SSD is divided into multiple Zones, each Zone is responsible for handling a segment of logically sequential write data, during the initialization phase, the relevant running data of each Zone is simultaneously started to be extracted, these features will be used for subsequent machine learning model training and decision-making;
[0049] Second Step: System Load Monitoring and Data Collection, real-time tracking of the current system I / O load, determining whether the system is in a high load or low load state. At the same time, using machine learning model (MLP) to evaluate the current system load, through detecting CPU utilization, I / O queue length and read-write request frequency, the system determines whether it is suitable to perform garbage collection operation. If the load is too high, garbage collection will be postponed to avoid affecting the performance of ongoing applications; if the load is low, it is safe to perform garbage collection to optimize the utilization efficiency of system resources;
[0050] Third Step: Determine the current I / O load, use the multi-layer perception (MLP) model to monitor the state of each Zone in real time, including the proportion of invalid data in each Zone and the current I / O request queue length. The MLP model will also periodically update the usage of each Zone, if the proportion of invalid data exceeds the threshold, go to step two, delay garbage collection. If the load is low, continue to perform garbage collection, if it does not exceed the threshold, continue to monitor the Zone state and wait for the next detection period;
[0051] Fourth Step: Block State Scanning and Intelligent Classification, scan all blocks, record the amount of valid data and the proportion of invalid data of each block, and use the pre-trained multi-layer perception (MLP) model to intelligently classify the multi-dimensional data of each block. The MLP model not only relies on the current scanning data, but also can refer to historical data, dynamically adjust the classification standard according to the overall running situation of the system. The model balances the current system load, I / O activity and block wear during classification, making the garbage collection operation more accurate. The state of the block is dynamically changing, as more data is collected, the MLP model will continuously update the classification results according to the real-time changes in the state, to ensure that the garbage collection operation is always based on the latest decision-making information;
[0052] Step 5: Determine whether the system currently has a block that needs to be recycled through the MLP model. 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 erasures approaching the upper limit), it will proceed to Step 6. At this time, it will further determine which Zones are most suitable for recycling to optimize storage space utilization. If the status of all Zones does not meet the recycling criteria, it will proceed to Step 2, and the system will continue to monitor the load and Zone status until the next scan or triggering event re-evaluation;
[0053] Step 6: Intelligently select the target Zone for recycling. The MLP model performs multi-layer nonlinear mapping on the characteristics of each Zone, outputting a "recycling priority score" for each Zone. The higher the score, the more suitable the Zone is for garbage collection. At the same time, use the adaptive dynamic partition selection algorithm to dynamically adjust the target partition for garbage collection based on load-aware scheduling partition selection, combining current I / O load, Zone wear, Zone activity, invalid data proportion, write frequency, and other indicators to select the priority recycling block;
[0054] Step 7: Determine whether there is valid data in the target Zone and migrate valid data in the recycling block to the free block to ensure data integrity and sequential write requirements. Use the multi-layer perception (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 8 to further determine whether the target Zone has enough free space. If all data in the Zone has been invalidated (invalid data), no data migration is needed, and the system can directly proceed to Step 11 to perform the erase block operation to release storage space;
[0055] Step 8: Determine if the target Zone has sufficient free space. The system first makes a simple judgment based on the current available free space data. First, calculate the size of the data block that needs to be migrated, which is the total amount of valid data that needs to be migrated from the Zone to be recycled. Then, the system checks the current available space of the target Zone to see if it is sufficient to accommodate these 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 predict whether the Zone can continue to provide sufficient free space by historical data and features, avoiding migration failure. At the same time, as time goes on, the MLP model will adaptively optimize according to the real-time performance of the system, constantly improving the accuracy and efficiency of the prediction. If there is sufficient free space, proceed to Step 9 for data migration, which needs to be safely migrated to other free blocks to ensure data integrity. If there is not enough space, return to Step 6 to reselect the target Zone to be recycled;
[0056] Step 9: Intelligent migration of valid data to the target Zone. The system migrates the valid data in the recycling Zone to the selected target Zone, using the sequential write mechanism of ZNS SSD to avoid the problem of random write in traditional SSD. In order to improve the efficiency of migration, the system uses a multi-layer perception (MLP) model to make intelligent decisions on the migration order and target position of valid data. According to the output of the MLP model, the system will set priorities for the data blocks to be migrated. Hot data with high access frequency will be migrated first to ensure that data can be quickly restored to normal read and write. After the migration operation is completed, the system will monitor the data consistency and integrity in real time, and through the verification mechanism, it will ensure that the data is not damaged during the migration process. The MLP model can continuously adjust and optimize subsequent migration decisions based on feedback data from the migration results;
[0057] Step 10: Determine if the data migration is successful. After the data migration is completed, the system will use CRC verification or other consistency verification techniques to ensure the integrity of the migrated data. A double verification mechanism is introduced, including pre-migration source data consistency verification and post-migration target data integrity verification. 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 will re-execute the migration through the exception handling module of the Zone FTL;
[0058] Tenth step: Perform invalid data erasure. After successful migration, the system uses a delayed erasure mechanism to perform on-demand erasure of invalid data in the recycling Zone. To avoid affecting system performance, the erasure operation can also be optimized through intelligent scheduling strategies to ensure that erasure tasks are performed when the system load is low or idle. The system monitors the current I / O load to avoid performing erasure operations during high load. If the system is busy, the erasure task can be postponed until the load decreases. This reduces interference with current read-write operations and maintains stable system performance. At the same time, by analyzing I / O load, data access frequency, storage space usage, and other characteristics, the MLP model can intelligently determine whether to immediately perform erasure or postpone it to a more appropriate time;
[0059] Twelfth step: Update the FTL mapping table. After data migration is complete, the system updates the logical address to the physical address of the target Zone. The logical address in the FTL mapping table is redirected to the new physical storage location. At the same time, the system updates the relevant metadata, recording the newly migrated physical address and data state, to ensure that the next access can correctly read and write data in the new address. After completing the FTL mapping table update, the system performs consistency verification to ensure that all logical addresses are correctly mapped to new physical addresses. By comparing the mapping relationship in the metadata, the system can verify whether the mapping table is consistent with the actual data storage state. After updating the mapping table, the system monitors I / O performance to ensure that the mapping table update does not affect ongoing read-write operations. Through real-time monitoring, the system can optimize subsequent mapping table update strategies;
[0060] Thirteenth step: System performance monitoring. Monitor the system I / O performance after garbage collection to check for any delays or throughput abnormalities and monitor whether performance decreases after collection. Through performance monitoring, the system records the specific impact of current collection operations on latency and throughput and feeds this data back to the MLP model to adjust future collection plans;
[0061] Fourteenth step: Adaptive adjustment of recycling strategies. Based on system load, performance monitoring results, and recycling effects, dynamically adjust the garbage collection frequency and block selection strategy. The MLP model will preferentially select blocks with a high proportion of invalid data for recycling to maximize storage space release. By analyzing historical I / O activity, the MLP model can also preferentially recycle blocks storing cold data, while hot data blocks can be temporarily postponed for recycling to avoid affecting performance. Through continuous performance monitoring and feedback from the MLP model, the system can adaptively optimize the scheduling plan for garbage collection to ensure that system performance is not affected in the long term;
[0062] Fifteenth step: the system is regularly maintained, combined with the intelligent scheduling of the MLP model, the system can dynamically adjust the maintenance plan, minimize the impact on business, while extending the service life of the SSD, and improving the utilization efficiency of storage resources.
[0063] So far, the steps of the MLP-based ZNS SSD garbage collection awareness method provided in the embodiments of the application are completed.
[0064] In several embodiments provided by the embodiments of the application, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The embodiments of the apparatus and method described above are only schematic, for example, the flowcharts and block diagrams in the drawings show the possible implementation architectures, functions and operation of the apparatus, method and computer program product according to the embodiments of the application. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logic function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in a different order than that noted in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and the combination of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0065] In addition, each functional module in the various embodiments of the application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[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 understanding, the technical solutions of the present application or parts of the present application that essentially contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes. It should be noted that in this document, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the processes, methods, articles or devices that include a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of other identical elements in the process, method, article or device that includes the element.
[0067] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms "a", "an" and "the" used in the embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0068] It should be understood that the term "and / or" used herein is only to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this document generally represents an "or" relationship between the front and rear associated objects.
[0069] Depending on the context, the word "if" as used herein can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if it is determined" or "if (a stated condition or event) is detected" can be interpreted as "when it is determined" or "in response to determining" or "when (a stated condition or event) is detected" or "in response to detecting (a stated condition or event)".
[0070] Although the present application has been described in detail with reference to the foregoing embodiments, the technical solutions recorded in the foregoing embodiments can be modified, or some of the technical features can be replaced by equivalent features, by those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An MLP-based ZNS SSD garbage collection-aware method, characterized in that, Comprising the following steps: Step 1, initialization of ZNS block and feature extraction: divide the storage space of ZNS SSD into multiple Zones, each Zone is responsible for processing a segment of logically sequential write data, and in the initialization phase, start feature extraction on the running data of each Zone; Step 2, system load monitoring and data collection: track the current system I / O load, 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 state scanning and intelligent classification: scan all blocks, record the amount of valid data and the proportion of invalid data of each block, and use the pre-trained multi-layer perception MLP model to intelligently classify the multi-dimensional data of each block; Step 5, determine whether there is a block that needs 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 execute on-demand erasure of invalid data in the recycled Zone, the system is in a busy state, and the erasure task may be delayed, waiting for the load to drop before executing; 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 immediately execute erasure or to delay it to a more appropriate time; Step 12, update the FTL mapping table: after data migration is complete, 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 related metadata, record the new migrated physical address and data state, to ensure that the next access can correctly read and write data in the new address; After completing the update of the FTL mapping table, the system will perform consistency checking to ensure that all logical addresses are correctly mapped to new physical addresses; By comparing the mapping relationship in the metadata, the system can verify whether the mapping table is consistent with the actual data storage state; Step 13, system performance monitoring.
2. The MLP-based ZNS SSD garbage collection-aware method of claim 1, wherein: In step 3, use the multi-layer perception MLP model to monitor the state of each Zone in real time, including the invalid data proportion of each Zone and the current I / O request queue length; If the invalid data proportion exceeds the threshold, go to step 2, delay garbage collection; If the load is low, continue garbage collection, if it does not exceed the threshold, continue to monitor the Zone state and wait for the next detection period.
3. The MLP-based ZNS SSD garbage collection-aware method of claim 1, wherein: In step 5, the MLP model determines whether the system currently has a block that needs to be recycled. If the system detects that one or more Zones meet the conditions for garbage collection, it proceeds to step 6, where it further determines which Zones are most suitable for recycling to optimize storage space utilization. If none of the Zones meet the recycling criteria, the system proceeds to step 2, where it continues to monitor the load and Zone status until the next scan or triggering event re-evaluation. The conditions for the Zones to meet the garbage collection criteria include a high proportion of invalid data, insufficient available capacity, or a high number of erase cycles.
4. The MLP-based ZNS SSD garbage collection-aware method of claim 1, wherein: In step 6, the MLP model performs a multi-layer nonlinear mapping of each Zone's characteristics and outputs a "recycle priority score" for each Zone. The higher the score, the more suitable the Zone is for garbage collection. Meanwhile, an adaptive dynamic partition selection algorithm is used to select the target partition for garbage collection based on load-aware scheduling, taking into account the current I / O load, Zone wear, Zone activity, invalid data proportion, and write frequency.
5. The MLP-based ZNS SSD garbage collection awareness method of claim 1, wherein: In step 7, the valid data in the block to be recycled is migrated to the free block to ensure data integrity and sequential writing requirements. The 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 there is enough free space in the target Zone. If all data in the Zone has been invalidated, no data migration is needed, and the system can directly proceed to step 11 to perform the erase block operation and release storage space.
6. The MLP-based ZNS SSD garbage collection awareness method of claim 1, wherein: In step 8, the following steps are included: First, calculate the size of the data block that needs to be migrated, which is the total amount of valid data that needs to be migrated from the Zone to be recycled. Then, the system checks the available space in the target Zone to see if it is sufficient to accommodate the data. Finally, the system compares the total amount of data to be migrated with the available space in the target Zone. If the available space is close to the critical value, or if there are multiple possible target Zones, the MLP model will further determine whether the Zone can continue to provide sufficient free space based on historical data and feature prediction 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 to select a new target Zone for recycling.
7. The MLP-based ZNS SSD garbage collection awareness method of claim 1, wherein: In step 9, the system migrates the valid data in the recycled Zone to the selected target Zone, using the sequential writing mechanism of ZNS SSD. At the same time, the system sets priorities for the data blocks to be migrated, with hot data with high access frequency being migrated first to ensure that data can be quickly restored to normal read and write.
8. The MLP-based ZNS SSD garbage collection awareness method of claim 1, wherein: In step 10, after data migration is complete, the system performs CRC check or other consistency verification techniques to ensure data integrity. 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, go 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 the Zone FTL.
9. The MLP-based ZNS SSD garbage collection awareness method of claim 1, wherein: 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 is a delay or abnormality in throughput, and monitors whether the performance decreases after recovery. Through performance monitoring, the system records the specific influence of the current recovery operation on the delay and throughput, and feeds these data back to the MLP model to adjust the future recovery plan. According to the load of the system, the performance monitoring result and the recovery effect, the garbage collection frequency and the block selection strategy are dynamically adjusted. The MLP model preferentially selects the blocks with high proportion of invalid data for recovery to maximize the release of storage space. By analyzing the historical I / O activity, the MLP model preferentially recovers the blocks storing cold data, while the hot data blocks are temporarily postponed for recovery. The system is regularly maintained through the intelligent scheduling of the system performance monitoring and 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