Data storage method and system of all-flash storage system, medium and program product

By dividing data types and optimizing storage strategies in an all-flash storage system, dynamically adjusting unit usage and garbage collection, the wear and reliability of flash memory cells are solved, extending the service life of the system and improving performance and security.

CN119002820AInactive Publication Date: 2024-11-22SHENZHEN WEIKEWEIYE ELECTRONIC TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411211590.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The limited number of writes of flash memory units in all-flash storage systems leads to accelerated wear, affecting the reliability and life of the system. Especially under high temperature processing and frequent write operations, the structural damage of materials and electrical performance degradation are difficult to solve.

Method used

By dividing the data into static data and dynamic data, and storing the static data in units with the number of uses less than the preset threshold, dynamic data is written to the unit with the least number of use, static data transfer mechanism and garbage collection mechanism are introduced, and dynamic adjustment units are adjusted Usage and garbage collection speed, timely detect and isolate damaged units, and optimize data storage strategies.

Benefits of technology

Effectively reduce the number of erases and wear of the unit, extend the service life of the unit, improve the space utilization and performance of the system, enhance data security and system reliability, and avoid data loss caused by insufficient space or damage to the unit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119002820A_ABST
    Figure CN119002820A_ABST
Patent Text Reader

Abstract

The invention discloses a data storage method and system of an all-flash storage system, a medium and a program product, and the method comprises the steps: dividing initial data in the all-flash storage system into static data and dynamic data; determining a first unit group in the all-flash memory system, wherein all units in the first unit group are units of which the use times are smaller than a preset threshold value; storing the static data in any unit in the first unit group; when the difference value between the number of use times of the current unit storing the static data and the average number of use times is not greater than a preset difference value, transferring the static data to any unit in other first unit groups except the current unit; generating a sorting list according to the use frequency of each unit in the first unit group; and writing the dynamic data into a unit which is used for the least times in the sorting list, and updating the sorting list. And the durability of the all-flash memory system is improved while the flash memory is not damaged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of storage technology, and in particular, relates to a data storage method, system, medium and program product of an all-flash storage system. Background Art

[0002] All-Flash Storage Systems refer to systems that rely entirely on Flash Memory technology for data storage. Flash memory technology has many advantages over traditional disk storage (such as HDD), including higher read and write speeds, lower latency, higher reliability and energy efficiency. These advantages have made all-flash storage systems widely used in modern data-intensive applications, such as cloud computing, big data analysis, artificial intelligence, and enterprise-level databases. However, the number of writes to flash memory is limited. Frequent write operations will cause wear and shorten the life of flash memory. Each flash memory cell can only undergo a limited number of write and erase cycles (commonly referred to as P / E cycles). After exceeding this number, the cell may fail, affecting the reliability of the entire storage device.

[0003] In the related art, based on a three-dimensional NAND flash memory, for a device that performs multiple erase and program operations, when the BER reaches a threshold set by the user, the memory is finally kept in an erased state and the device is annealed to improve the durability of the three-dimensional NAND flash memory.

[0004] However, long-term high-temperature treatment may cause thermal stress accumulation in flash memory materials, resulting in structural damage to the materials. Repeated high-temperature treatment may cause degradation of the electrical performance of flash memory cells, such as increased leakage current of gate electrodes. Therefore, a method for improving the durability without damaging the flash memory is needed to solve the above problems. Summary of the invention

[0005] The present application provides a data storage method, system, medium and program product of an all-flash storage system, which are used to improve the durability of the all-flash storage system without damaging the flash memory.

[0006] In a first aspect, the present application provides a data storage method, system, medium, and program product of an all-flash storage system, which divides initial data in the all-flash storage system into static data and dynamic data, wherein the static data is data updated less than a preset number of times, and the dynamic data is data updated not less than a preset number of times; Determine a first cell group in the all-flash storage system, where all cells in the first cell group are cells with a usage count less than a preset threshold; storing static data in any cell in the first cell group; When the difference between the usage count of the current unit storing the static data and the average usage count is not greater than a preset difference, the static data is transferred to any unit in the first unit group other than the current unit; generating a sorted list according to the number of times each unit in the first unit group is used; Write the dynamic data to the least used cell in the sorted list and update the sorted list.

[0007] By adopting the above technical solution, the initial data in the all-flash storage system is divided into static data and dynamic data, and the static data is stored in the first unit group whose usage times are less than the preset threshold, and the dynamic data is written to the unit with the least usage times in the sorted list, which can effectively reduce the number of erasures and the degree of wear of the unit. Because the number of updates of static data is less than the preset number, storing it in the unit with less usage times can avoid frequent erasure operations and extend the service life of these units. The number of updates of dynamic data is high, and writing it to the unit with the least usage times can balance the number of erasures of each unit and avoid premature wear and failure of some units. In addition, the method also introduces a transfer mechanism for static data. When the difference between the number of uses of the current unit storing static data and the average number of uses is not greater than the preset difference, the static data is transferred to other units with less usage times, which further optimizes the usage of the unit and slows down the wear rate of the unit. By distinguishing and processing static data and dynamic data, and dynamically adjusting the usage of the unit, the method improves the durability of the all-flash storage system without damaging the flash memory.

[0008] In combination with some embodiments of the first aspect, in some embodiments, after writing the dynamic data into the unit with the least number of uses in the sorted list and updating the sorted list, the method further includes: Traverse all data blocks in the all-flash storage system, including free data blocks and non-free data blocks; Marking data blocks to be erased that contain invalid data in non-free data blocks; Transfer the valid data in the data block to be erased to the free data block to obtain an invalid data block; The invalid data in the invalid data block is erased to obtain a free data block.

[0009] By adopting the above technical solution, all data blocks are traversed, the data blocks to be erased containing invalid data are marked, and the valid data in these data blocks are transferred to the free data blocks, and then the invalid data blocks are erased, thereby realizing the recovery and reuse of space. This garbage collection mechanism can effectively solve the problem of performance degradation caused by invalid data occupying too much space after long-term operation. By timely cleaning up invalid data, it can be ensured that there is always enough available space in the system to store new data, avoiding frequent erasure and data migration operations due to insufficient space, and improving the response speed and processing efficiency of the system. In addition, storing valid data in free data blocks can also reduce data fragmentation problems and further optimize space utilization. It effectively improves the space utilization and performance of the all-flash storage system and extends the service life of the system.

[0010] In combination with some embodiments of the first aspect, in some embodiments, after erasing invalid data in the invalid data block to obtain a free data block, the method further includes: Determine a space recovery rate of the all-flash storage system within a preset time, where the space recovery rate is obtained by dividing the number of free data blocks after invalid data is erased within the preset time by the number of all data blocks; Determine whether the space recovery rate is greater than the preset recovery rate; If not, increase the speed of erasing invalid data; If it is greater, the speed of erasing invalid data is reduced.

[0011] By adopting the above technical solution, the concept of space recovery rate is introduced, that is, the number of free data blocks after invalid data is erased within a preset time divided by the number of all data blocks, to dynamically adjust the speed of garbage collection. Specifically, if the space recovery rate is greater than the preset recovery rate, it means that the current garbage collection speed is fast, and the speed of erasing invalid data can be appropriately reduced; conversely, if the space recovery rate is not greater than the preset recovery rate, it means that the current garbage collection speed is slow, and the speed of erasing invalid data needs to be increased. Through this dynamic adjustment mechanism, the speed of garbage collection can be flexibly controlled according to the actual operation of the system, avoiding too frequent or too slow garbage collection operations. When the system space utilization rate is high, the speed of garbage collection can be appropriately accelerated, invalid data can be cleaned up in time, and the available space of the system can be guaranteed; when the system space utilization rate is low, the speed of garbage collection can be appropriately slowed down to reduce the impact on system performance. This adaptive garbage collection mechanism can maximize the performance and efficiency of the system while ensuring system reliability and extend the service life of the system.

[0012] In combination with some embodiments of the first aspect, in some embodiments, after writing the dynamic data into the unit with the least number of uses in the sorted list and updating the sorted list, the method further includes: Perform read and write tests on all units in the all-flash storage system at preset intervals to obtain a read and write error rate; Determine a cell whose read / write error rate is greater than a preset error rate as a damaged cell; Deactivating the damaged unit to deny data from being written to the damaged unit; When it is determined that valid data exists in the damaged unit, the valid data is transferred to any unit except the damaged unit.

[0013] By adopting the above technical solution, read and write tests are performed on all units at preset intervals to obtain the read and write error rate, and the unit with a read and write error rate greater than the preset error rate is determined as a damaged unit. Once a damaged unit is found, the system will immediately deactivate the unit and refuse to write data to it, avoiding the risk of data loss or damage. At the same time, if there is valid data in the damaged unit, the system will automatically transfer the data to other normal units to ensure the integrity and accessibility of the data. This mechanism of regular detection and timely processing of damaged units can effectively improve the reliability and data security of the all-flash storage system. By early detection and isolation of damaged units, the negative impact of damaged units on the system can be avoided and the risk of data loss or damage can be reduced. Transferring valid data in damaged units to normal units can ensure the continuous availability of data and avoid the problem of data inaccessibility due to unit damage.

[0014] In combination with some embodiments of the first aspect, in some embodiments, after writing the dynamic data into the unit with the least number of uses in the sorted list and updating the sorted list, the method further includes: Acquire the first update frequency and the second update frequency corresponding to the static data and the dynamic data in real time; When it is determined that the first update frequency is greater than the preset update threshold, the static data corresponding to the first update frequency is changed to dynamic data; when it is determined that the second update frequency is not greater than the preset update threshold, the dynamic data corresponding to the second update frequency is updated to static data.

[0015] By adopting the above technical solution, the update frequency corresponding to static data and dynamic data is obtained in real time, and the type of data is dynamically adjusted according to the preset update threshold. When the update frequency of static data is greater than the preset update threshold, it means that the update times of these data are already high and are no longer suitable for static data storage. It is necessary to change them to dynamic data and adjust the storage strategy accordingly; similarly, when the update frequency of dynamic data is not greater than the preset update threshold, it means that the update times of these data are already low and they can be updated to static data to optimize storage efficiency. Through this dynamic adjustment mechanism of data type, the storage method of data can be optimized in time according to the actual update situation of data, and the storage efficiency and system performance can be improved. Converting frequently updated static data into dynamic data can avoid the problem of aggravated unit wear caused by too many update operations; converting less updated dynamic data into static data can reduce unnecessary data migration and erase operations and extend the service life of the unit.

[0016] In combination with some embodiments of the first aspect, in some embodiments, after writing the dynamic data into the unit with the least number of uses in the sorted list and updating the sorted list, the method further includes: Determine the number of erasures of each cell, and input the number of erasures of each cell into a standard deviation calculation formula to obtain an erasure standard deviation; When it is determined that the erasure standard deviation is greater than the preset standard deviation, the static data is transferred to any cell in the first cell group whose usage times are less than the preset usage times.

[0017] By adopting the above technical solution, the number of erase and write times of each unit is calculated, and the standard deviation of the erase and write times is obtained using the standard deviation calculation formula to measure the unit usage. Balance. When the erase and write standard deviation is greater than the preset standard deviation, it means that the erase and write times of each unit are quite different, the usage is not balanced, and optimization is needed. At this time, the system will automatically transfer the static data to the unit with less usage to balance the erase and write times of each unit and slow down the wear rate of the unit. Through this standard deviation-based static data transfer mechanism, the usage of the unit can be dynamically adjusted to ensure that the erase and write times of each unit are as close as possible, thereby improving the balance of unit usage.

[0018] In conjunction with some embodiments of the first aspect, in some embodiments, the standard deviation calculation formula is: In the formula, σ is the erase standard deviation, N is the number of units, i is the independent variable, and x is the i is the number of erase and write times for each unit, and μ is the average number of erase and write times.

[0019] By adopting the above technical solution, a calculation basis is provided for the erasure standard deviation, thereby enhancing the reliability of data.

[0020] In a second aspect, an embodiment of the present application provides a data storage system of an all-flash storage system, the system comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and one or more processors call the computer instructions to enable the system to execute the method described in the first aspect and any possible implementation method of the first aspect.

[0021] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a system, causes the system to execute the method described in the first aspect and any possible implementation of the first aspect.

[0022] In a fourth aspect, an embodiment of the present application provides a computer program product, characterized in that when the computer program product runs on a system, the system executes the method described in any possible implementation manner in the first aspect.

[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. The present application provides a data storage method for an all-flash storage system, which divides the initial data in the all-flash storage system into static data and dynamic data, and stores the static data in the first unit group whose usage times are less than a preset threshold, and writes the dynamic data to the unit with the least usage times in the sorted list, which can effectively reduce the number of erasures and the degree of wear of the unit. Because the number of updates of static data is less than the preset number of times, storing it in the unit with less usage times can avoid frequent erasure operations and extend the service life of these units. The number of updates of dynamic data is high, and writing it to the unit with the least usage times can balance the number of erasures of each unit and avoid premature wear and failure of some units. In addition, the method also introduces a transfer mechanism for static data. When the difference between the number of uses of the current unit storing static data and the average number of uses is not greater than the preset difference, the static data is transferred to other units with less usage times, which further optimizes the usage of the unit and slows down the wear rate of the unit. By distinguishing and processing static data and dynamic data, and dynamically adjusting the usage of the unit, the method improves the durability of the all-flash storage system without damaging the flash memory.

[0024] 2. The present application provides a data storage method for an all-flash storage system, which marks data blocks to be erased that contain invalid data, transfers valid data in these data blocks to free data blocks, and then erases the invalid data blocks, thereby realizing space recovery and reuse. This garbage collection mechanism can effectively solve the problem of performance degradation caused by invalid data occupying too much space after long-term operation. By timely cleaning up invalid data, it can be ensured that there is always enough available space in the system to store new data, avoiding frequent erasure and data migration operations due to insufficient space, and improving the response speed and processing efficiency of the system. In addition, storing valid data in free data blocks can also reduce data fragmentation problems and further optimize space utilization. It effectively improves the space utilization and performance of the all-flash storage system and extends the service life of the system.

[0025] 3. The present application provides a data storage method for an all-flash storage system, which introduces the concept of space recovery rate, that is, the number of free data blocks after invalid data is erased within a preset time divided by the number of all data blocks, to dynamically adjust the speed of garbage collection. Specifically, if the space recovery rate is greater than the preset recovery rate, it means that the current garbage collection speed is faster, and the speed of erasing invalid data can be appropriately reduced; conversely, if the space recovery rate is not greater than the preset recovery rate, it means that the current garbage collection speed is slower, and the speed of erasing invalid data needs to be increased. Through this dynamic adjustment mechanism, the speed of garbage collection can be flexibly controlled according to the actual operation of the system, avoiding too frequent or too slow garbage collection operations. When the system space utilization rate is high, the speed of garbage collection can be appropriately accelerated, invalid data can be cleaned up in time, and the available space of the system can be guaranteed; when the system space utilization rate is low, the speed of garbage collection can be appropriately slowed down to reduce the impact on system performance. This adaptive garbage collection mechanism can maximize the performance and efficiency of the system while ensuring system reliability and extend the service life of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flow chart of a data storage method of an all-flash storage system in an embodiment of the present application.

[0027] Figure 2 This is another flowchart of the data storage method of the all-flash storage system in an embodiment of the present application.

[0028] Figure 3 It is a schematic diagram of the physical device structure of the data storage system of the all-flash storage system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more listed items.

[0030] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0031] An application scenario of an embodiment of the present application is described below: In today's era of explosive data growth, all-flash storage systems have become the preferred storage solution for many data-intensive applications with their advantages of high speed, low latency, and high reliability. Taking cloud computing data centers as an example, with the popularization and deepening of cloud services, more and more companies and individuals are migrating their data and applications to the cloud, which has put forward higher requirements for data storage capacity, performance, and reliability. With its excellent performance and flexible expansion capabilities, all-flash storage systems have become the core infrastructure supporting the efficient operation of cloud computing data centers.

[0032] However, in practical applications, all-flash storage systems also face some challenges and problems. Among them, the limited number of writes to flash memory cells is an important constraint. In application scenarios such as cloud computing data centers, massive amounts of user data and frequent read and write accesses will accelerate the wear and aging of flash memory cells and shorten their service life. Once a flash memory cell exceeds its designed upper limit of writes, serious consequences such as data loss and system failure may occur, affecting the availability of cloud services and user experience.

[0033] In order to solve the above technical problems, the present application provides a data storage method of an all-flash storage system, which is used to improve the durability of the all-flash storage system without damaging the flash memory. Figure 1 , a data storage method of an all-flash storage system in an embodiment of the present application is described: See also Figure 1 , which is a flow chart of a data storage method of an all-flash storage system in an embodiment of the present application.

[0034] S101, dividing the initial data in the all-flash storage system into static data and dynamic data; The server divides the initial data in the all-flash storage system into static data and dynamic data. Static data is data that is updated less than a preset number of times, and dynamic data is data that is updated not less than a preset number of times. In this step, the server classifies the initial data in the all-flash storage system and divides it into two categories: static data and dynamic data. The basis for the division is the update frequency of the data, that is, the number of times the data is modified or rewritten within a certain period of time. The server will pre-set an update threshold, for example, 100 times. If a data block is updated less than 100 times within the time period, it is classified as static data; conversely, if the update number is greater than or equal to 100 times, it is classified as dynamic data.

[0035] For example, suppose there are 1,000 data blocks in the all-flash storage system managed by the server, and each data block is 4KB in size. After a period of monitoring, the server finds that 600 of the data blocks are updated less than 100 times, and 400 of the data blocks are updated more than or equal to 100 times. Therefore, the server marks the 600 data blocks with fewer updates as static data, and marks the remaining 400 data blocks with more frequent updates as dynamic data.

[0036] This data classification method based on update frequency can help the server identify the heat characteristics of the data, that is, distinguish between cold data and hot data. Generally speaking, static data can be regarded as cold data, which is data that is not frequently accessed or modified; while dynamic data can be regarded as hot data, which is data that is frequently read and written. Identifying the cold and hot characteristics of data helps the server optimize the storage method of data in the flash memory and improve the efficiency and life of the flash memory. For example, for cold data, the server can consider storing it in the older area of ​​the flash memory or the area that has been erased and written more times, and store hot data in the new area or the area that has been erased and written less frequently. This can balance the wear of the flash memory and extend its service life.

[0037] S102, determining a first unit group in the all-flash storage system; The server determines the first unit group in the all-flash storage system, and all the units in the first unit group are units with a usage count less than a preset threshold. In this step, the server needs to find a specific group of flash memory units in the all-flash storage system, called the first unit group. The characteristic of this group of units is that they are all used less frequently, specifically less than a preset usage count threshold. The server sets this threshold in advance to measure the usage of the unit. For example, if the threshold is set to 1000 times, then units that are used less than 1000 times are considered to be used less frequently and can be included in the first unit group.

[0038] For example, assume that there are 10,000 flash memory cells in an all-flash storage system, and the capacity of each cell is 128MB. The usage threshold set by the server is 500 times. After counting the usage of all cells, the server finds that 2,000 cells have been used less than 500 times, which are cell 0, cell 1, cell 2, ..., cell 1999. Therefore, the server divides these 2,000 cells into the first cell group and records the grouping information for subsequent data storage operations.

[0039] This method of unit grouping based on the number of times used can help the server identify free areas or less used areas in the flash memory. Since the erase and write life of the flash memory is limited, frequent use will accelerate its aging and loss. Therefore, finding out the units that are used less frequently and storing data in these units first can effectively slow down the wear rate of the flash memory and extend its service life. This method, combined with the static data identification in the previous step, can further optimize the storage of static data in the flash memory. The server can select the units in the first unit group to store static data that is not frequently accessed or modified, and use the units that are used more frequently to store dynamic data. This separate storage strategy can maximize the performance and life advantages of the flash memory.

[0040] S103, storing the static data in any one unit in the first unit group; After identifying the static data and the first unit group, the server begins to perform the actual data storage operation. In this step, the server stores the static data in any unit in the first unit group. The "any" here means that the server can flexibly select the target unit in the first unit group according to the specific storage strategy or algorithm. Usually, in order to achieve the purpose of balanced unit usage, the server will give priority to the unit with the least usage to store data.

[0041] For example, continuing with the previous example, the server has divided 2,000 cells that have been used less than 500 times into the first cell group. Now, the server identifies a batch of static data with a total size of 100GB. The server needs to store these static data in the cells of the first cell group. In order to find the best target cell, the server sorts the cells in the first cell group according to the number of times they have been used, and finds that cell 1 has the least number of times, only 100 times. Therefore, the server selects cell 1 as the storage target and writes 100GB of static data to this cell.

[0042] This practice of storing static data in cells that are used less frequently is essentially an optimization method to slow down the wear of flash memory. Since static data is accessed and modified less frequently, storing it in cells that are used less frequently can prevent these cells from reaching their upper limit of erase and write life prematurely. On the contrary, if static data is stored in cells that are used frequently, the wear rate of these cells will increase and their usable life will be reduced. By giving priority to cells that are used the least, the server implements "cold storage" of static data, that is, storing infrequently used data in areas with less wear, and storing frequently accessed data in areas with more wear but better performance. This tiered storage strategy can maximize the service life of flash memory while ensuring its overall performance, thereby improving the reliability and economy of all-flash storage systems.

[0043] S104. When the difference between the number of times the current unit storing static data is used and the average number of times it is used is not greater than a preset difference, the static data is transferred to any unit in the first unit group other than the current unit; in this step, the server introduces a static data transfer mechanism to further optimize the distribution of static data in the first unit group. Specifically, for units that have stored static data, the server will monitor their number of times of use in real time and calculate the difference between the number of times the unit is used and the average number of times all units in the first unit group are used. When this difference is less than or equal to a preset threshold, the server will trigger a data transfer operation, that is, transfer the static data on the unit to other units in the first unit group that have been used less frequently.

[0044] For example, assume that the usage count difference threshold set by the server is 50 times. In the previous step, the server stored 100GB of static data in unit 1, which was initially used 100 times. After a period of time, the server detects that the usage count of unit 1 has increased to 180 times. At the same time, the server statistics show that the average usage count of all units in the first unit group is 150 times. At this time, the difference between the usage count of unit 1 and the average usage count is 180-150=30 times, which is less than the preset threshold of 50 times. Therefore, the server triggers a data transfer operation and finds the unit with the least usage count and sufficient capacity in the first unit group, such as unit 2, which is used 120 times. The server transfers the 100GB of static data stored on unit 1 to unit 2, and updates the usage counts of the two units, with unit 1 becoming 80 times and unit 2 becoming 220 times.

[0045] It should be noted that transferring data is also a write operation, which will increase the number of times a unit is used. Therefore, when setting the transfer threshold, the server needs to comprehensively consider the cost and benefit of data transfer and weigh the balance between transfer frequency and unit balance. Generally speaking, setting the threshold too low will lead to too frequent data transfer, while setting the threshold too high will cause unbalanced unit usage. This requires the server to dynamically adjust the threshold size according to the actual data access pattern and system load to achieve the optimal data storage effect.

[0046] S105, generating a sorted list according to the number of times each unit in the first unit group is used; In this step, the server generates a sorted list for all the cells in the first cell group according to their usage counts. This list is sorted based on the number of times the cells are used, and all cells are arranged from small to large. The cell with the least number of uses is at the front of the list, and the cell with the most number of uses is at the back. By generating and maintaining this ordered list, the server can grasp the usage of the cells within the first cell group in real time, providing an important basis for subsequent data storage decisions.

[0047] For example, suppose the first unit group contains 500 units, which are numbered from 1 to 500. After the server counts the number of times each unit is used, the following partial data is obtained: Unit 1: 100 times Unit 2: 220 times Unit 3: 80 times Unit 4: 180 times … Unit 500: 120 times The server generates a sorted list based on these usage counts. In the list, unit 3 is used the least and is ranked first; followed by unit 1, unit 500, unit 4, unit 2, and so on. Through this list, the server can quickly find the unit with the least usage count to store new static data or transfer existing static data. At the same time, the list also provides a global perspective for the server to evaluate the overall usage and balance of the first unit group.

[0048] This usage-based list generation mechanism is an efficient unit management and decision-making tool. It aggregates scattered unit usage information into an ordered view, helping the server gain real-time insight into the utilization of flash memory resources.

[0049] S106: Write the dynamic data into the unit with the least number of uses in the sorted list, and update the sorted list.

[0050] In this step, the server writes the identified dynamic data to the least used unit in the first unit group, that is, the first unit in the sorted list. After writing, the server will promptly update the sorted list to reflect the change in the number of unit usage. This step reflects the server's optimized storage strategy for dynamic data, that is, "hot data" is preferentially written to the units with the lowest usage intensity, making full use of the high performance and low wear advantages of these units.

[0051] For example, continuing with the previous example, the server's sorted list arranges 500 units in order of usage from small to large. Currently, unit 3 is at the top of the list and has been used 80 times. Now, the server identifies a batch of dynamic data with a total size of 50GB that needs to be written to the flash memory. The server queries the sorted list and finds that the capacity of unit 3 is sufficient to accommodate this batch of dynamic data. So the server writes the 50GB of data to unit 3. After the write is completed, the number of times unit 3 is used increases from 80 times to 81 times. The server updates the sorted list accordingly, moving the position of unit 3 backwards, and at the same time moving the positions of other units in the list forward to ensure the order of the list. After the update, unit 1 becomes the first in the new list and has been used 100 times.

[0052] The above embodiments have the following beneficial effects: The initial data in the all-flash storage system is divided into static data and dynamic data, and the static data is stored in the first unit group whose usage times are less than the preset threshold, and the dynamic data is written to the unit with the least usage times in the sorted list, which can effectively reduce the number of erasures and the degree of wear of the unit. Because the number of updates of static data is less than the preset number, storing it in the unit with less usage times can avoid frequent erasure operations and extend the service life of these units. The number of updates of dynamic data is high, and writing it to the unit with the least usage times can balance the number of erasures of each unit and avoid premature wear and failure of some units. In addition, the method also introduces a transfer mechanism for static data. When the difference between the number of uses of the current unit storing static data and the average number of uses is not greater than the preset difference, the static data is transferred to other units with less usage times, which further optimizes the usage of the unit and slows down the wear rate of the unit. By distinguishing and processing static data and dynamic data, and dynamically adjusting the usage of the unit, the method improves the durability of the all-flash storage system without damaging the flash memory.

[0053] In some embodiments, there may be some invalid data in the storage unit, and the existence of such invalid data may affect the writing and erasing of data. In order to solve this technical problem, the present application also provides a data storage method. Figure 2 , another data storage method of an all-flash storage system in an embodiment of the present application is described: See also Figure 2 , is another flow chart of a data storage method of an all-flash storage system in an embodiment of the present application.

[0054] S201, traversing all data blocks in the all-flash storage system; The server traverses all data blocks in the all-flash storage system, which include free data blocks and non-free data blocks. In this step, the server needs to traverse and scan all data blocks in the all-flash storage system. The all-flash storage system is usually composed of multiple flash memory chips, each of which contains multiple data blocks. The server needs to access each data block in turn to obtain its status information, including the free status of the data block, the amount of valid data, the amount of invalid data, etc. This traversal process can be achieved by reading the metadata of the flash memory chip.

[0055] For example, suppose an all-flash storage system contains 4 flash chips, each containing 1024 data blocks. The server traverses all data blocks in the storage system and accesses data blocks numbered 0 to 4095 in sequence. For each data block, the server reads its metadata to obtain the free state (free or non-free), the amount of valid data, and the amount of invalid data of the data block. This information will be used for space recovery operations in subsequent steps. By traversing the data blocks, the server can fully understand the overall status of the all-flash storage system, providing a basis for optimizing storage space utilization and data access performance.

[0056] S202, marking the data blocks to be erased that contain invalid data in the non-free data blocks; After traversing all data blocks in the all-flash storage system, the server needs to further process non-free data blocks. Non-free data blocks refer to data blocks that have been written, which may contain valid data and invalid data. Invalid data refers to data that has been deleted or updated. These data occupy storage space but have no practical use. The server needs to identify which non-free data blocks contain invalid data and mark them as data blocks to be erased.

[0057] For example, during the traversal process, the server finds a non-free data block A with a capacity of 128KB, which stores 100KB of valid data and 28KB of invalid data. The server marks the data block as a data block to be erased, and records its block number and the amount of invalid data. Similarly, the server continues to scan other non-free data blocks, finds all data blocks containing invalid data, and marks them. The marking operation can be achieved by setting a specific flag bit in the metadata. The purpose of this step is to identify data blocks that can be garbage collected so that data migration and erasure operations can be performed on them in subsequent steps to free up storage space.

[0058] S203, transferring valid data in the data block to be erased to a free data block to obtain an invalid data block; After marking the data blocks to be erased, the server needs to transfer the valid data in these data blocks to other free data blocks so that data will not be lost during the erase operation. Since the flash memory erases data blocks instead of single pages, before erasing a data block, the valid data in it must be copied to other locations.

[0059] Specifically, for each data block to be erased, the server reads the valid data in it and searches for a free data block in the all-flash storage system. Then, the server writes the valid data to the free data block and updates the corresponding mapping table to map the original logical address pointing to the data block to be erased to the new free data block. After the data transfer is completed, the original data block to be erased becomes an invalid data block, which only contains invalid data.

[0060] For example, for the data block A marked to be erased in the previous step, the server reads 100KB of valid data and finds a free data block B in the storage system. The server writes the 100KB of data to data block B and updates the mapping table to remap the logical address originally mapped to data block A to data block B. At this point, data block A becomes an invalid data block and can be erased. Data transfer can be accelerated by copying commands (such as COPYBACK) inside the flash chip without transferring data through the host.

[0061] S204, erasing invalid data in the invalid data block to obtain a free data block; After completing the data transfer, the server can erase the invalid data block. The flash memory erase operation is performed in blocks, and all the data in a data block is set to 1. The erase operation usually takes a long time (several milliseconds), so the server needs to arrange the erase time reasonably to avoid affecting normal data read and write requests.

[0062] Specifically, the server sends an erase command to the flash chip, specifying the data block number to be erased. The flash chip performs the erase operation, setting all bits in the data block to 1, indicating that the data is deleted. After the erase is completed, the data block becomes a free data block and can be used for subsequent write operations. The server updates the metadata, marks the data block as free, and adds it to the free block list for subsequent allocation.

[0063] For example, for the invalid data block A in the previous step, the server sends an erase command to the flash memory chip to delete all the data in data block A. After the erasure is completed, data block A becomes a free data block, and the server marks it as free and adds it to the free block list. The erase operation is usually performed in the background and executed concurrently with the data read and write operations to improve system performance. At the same time, the server also needs to balance the erase frequency and erase granularity to avoid over-erasing certain data blocks and causing their life to decrease.

[0064] S205, determining a space recovery rate of the all-flash storage system within a preset time; The server determines the space recovery rate of the all-flash storage system within a preset time. The space recovery rate is the number of free data blocks after invalid data is erased within the preset time divided by the number of all data blocks. The server needs to regularly monitor the space recovery of the all-flash storage system to evaluate the effectiveness of the garbage collection strategy. The space recovery rate is an important indicator, which indicates the proportion of storage space released by erasing invalid data to the total storage space within a period of time.

[0065] Specifically, the server counts the amount of invalid data erased and the total number of data blocks in the all-flash storage system at each preset time interval (such as 1 hour). Then, the server calculates the space recovery rate, that is, the number of data blocks containing erased invalid data divided by the total number of data blocks. This ratio reflects the utilization efficiency of storage space and the effect of garbage collection. For example, assume that an all-flash storage system contains 1000 data blocks, each with a capacity of 128KB, and a total storage capacity of 128MB. In the past 1 hour, the server erased 100 invalid data blocks, freeing up 12.8MB of storage space. The space recovery rate in this time period is: (100×128KB) / (1000×128KB)=10%. This shows that in the past 1 hour, the server has recovered 10% of the storage space by erasing invalid data blocks. The server can adjust the garbage collection strategy based on this space recovery rate, such as increasing or decreasing the erasure frequency, to achieve a better balance between performance and life.

[0066] S206, determining whether the space recovery rate is greater than a preset recovery rate; The server needs to dynamically adjust the garbage collection strategy according to the size of the space recovery rate. Generally speaking, the server will set a preset recovery rate as a threshold. When the actual space recovery rate is higher than this threshold, it indicates that the current garbage collection strategy is too aggressive, which may lead to over-erasure and performance degradation; when the actual space recovery rate is lower than this threshold, it indicates that the current garbage collection strategy is too conservative, which may lead to a decrease in storage space utilization.

[0067] Specifically, the server compares the current space recovery rate with the preset recovery rate. If the space recovery rate is greater than the preset recovery rate, step S208 is executed to reduce the speed of erasing invalid data; if the space recovery rate is less than or equal to the preset recovery rate, step S207 is executed to increase the speed of erasing invalid data. The preset recovery rate can be set according to the actual application scenario and performance requirements, usually between 5% and 20%.

[0068] For example, suppose the preset recovery rate is 15%, and the current space recovery rate is 20%, which is higher than the preset value. The server determines that the current garbage collection is too frequent, which may affect system performance and flash memory life. Therefore, the server needs to reduce the erasure speed and reduce the space recovery rate. On the contrary, if the current space recovery rate is 8%, which is lower than the preset value, the server determines that the current garbage collection is not timely enough, which may cause a decrease in storage space utilization. Therefore, the server needs to increase the erasure speed and improve the space recovery rate.

[0069] S207, increasing the speed of erasing invalid data; If it is not greater, the server increases the speed of erasing invalid data. When the space recovery rate is lower than the preset value, the server needs to speed up the speed of erasing invalid data to release storage space in time. Increasing the erasure speed can be achieved by increasing the priority of the garbage collection thread, increasing the number of garbage collection threads, shortening the garbage collection cycle, etc.

[0070] For example, the server originally performed garbage collection every 30 minutes, and collected 10 invalid data blocks each time. When it is found that the space recovery rate is lower than the preset value, the server can shorten the garbage collection cycle to 15 minutes and increase the number of invalid data blocks recovered each time to 20. This can speed up the release of storage space and improve the space recovery rate. At the same time, the server can also appropriately increase the priority of the garbage collection thread to ensure that it can obtain CPU resources in time and speed up the execution of the erase operation. By dynamically adjusting the garbage collection parameters, the server can adaptively optimize the utilization efficiency of the storage space according to the real-time status of the system.

[0071] S208. Reduce the speed of erasing invalid data.

[0072] If it is greater, the server reduces the speed of erasing invalid data. When the space recovery rate is higher than the preset value, the server needs to reduce the speed of erasing invalid data to avoid excessive erasure and performance degradation. Reducing the erasure speed can be achieved by reducing the priority of the garbage collection thread, reducing the number of garbage collection threads, and extending the garbage collection cycle.

[0073] For example, the server originally performed garbage collection every 15 minutes, recycling 20 invalid data blocks each time. When it is found that the space recycling rate is higher than the preset value, the server can extend the garbage collection cycle to 30 minutes and reduce the number of invalid data blocks recycled each time to 10. This can reduce the erasure frequency of the flash memory chip and extend its life. At the same time, the server can also appropriately reduce the priority of the garbage collection thread to reduce its impact on normal data reading and writing. By dynamically adjusting the garbage collection parameters, the server can strike a balance between storage space utilization and system performance to achieve the optimal performance of the all-flash storage system.

[0074] The above embodiments have the following beneficial effects: The data blocks to be erased containing invalid data are marked, and the valid data in these data blocks are transferred to the free data blocks, and then the invalid data blocks are erased, thereby realizing the recovery and reuse of space. This garbage collection mechanism can effectively solve the performance degradation problem caused by invalid data occupying too much space after long-term operation. By timely cleaning up invalid data, it can be ensured that there is always enough available space in the system to store new data, avoiding frequent erasure and data migration operations due to insufficient space, and improving the response speed and processing efficiency of the system. In addition, storing valid data in free data blocks can also reduce data fragmentation problems and further optimize space utilization. It effectively improves the space utilization and performance of the all-flash storage system and extends the service life of the system.

[0075] The concept of space recovery rate is introduced, that is, the number of free data blocks after invalid data is erased within a preset time divided by the number of all data blocks, to dynamically adjust the speed of garbage collection. Specifically, if the space recovery rate is greater than the preset recovery rate, it means that the current garbage collection speed is fast, and the speed of erasing invalid data can be appropriately reduced; conversely, if the space recovery rate is not greater than the preset recovery rate, it means that the current garbage collection speed is slow, and the speed of erasing invalid data needs to be increased. Through this dynamic adjustment mechanism, the speed of garbage collection can be flexibly controlled according to the actual operation of the system, avoiding too frequent or too slow garbage collection operations. When the system space utilization rate is high, the speed of garbage collection can be appropriately accelerated to clean up invalid data in time to ensure the available space of the system; when the system space utilization rate is low, the speed of garbage collection can be appropriately slowed down to reduce the impact on system performance. This adaptive garbage collection mechanism can maximize the performance and efficiency of the system while ensuring system reliability and extend the service life of the system.

[0076] Furthermore, after writing the dynamic data into the unit with the least number of uses in the sorted list and updating the sorted list, the method of the present application further includes: Perform read and write tests on all units in the all-flash storage system at preset intervals to obtain a read and write error rate; Determine a cell whose read / write error rate is greater than a preset error rate as a damaged cell; Deactivating the damaged unit to deny data from being written to the damaged unit; When it is determined that valid data exists in the damaged unit, the valid data is transferred to any unit except the damaged unit.

[0077] In the above embodiment, read and write tests are performed on all units at preset time intervals to obtain a read and write error rate, and a unit with a read and write error rate greater than the preset error rate is determined to be a damaged unit. Once a damaged unit is found, the system will immediately deactivate the unit and refuse to write data to it, thereby avoiding the risk of data loss or damage. At the same time, if there is valid data in the damaged unit, the system will automatically transfer the data to other normal units to ensure the integrity and accessibility of the data. This mechanism of regular detection and timely processing of damaged units can effectively improve the reliability and data security of the all-flash storage system. By early detection and isolation of damaged units, the negative impact of damaged units on the system can be avoided, reducing the risk of data loss or damage. Transferring valid data in damaged units to normal units can ensure the continuous availability of data and avoid the problem of data inaccessibility due to unit damage.

[0078] Furthermore, after writing the dynamic data into the unit with the least number of uses in the sorted list and updating the sorted list, the method further includes: Acquire the first update frequency and the second update frequency corresponding to the static data and the dynamic data in real time; When it is determined that the first update frequency is greater than the preset update threshold, the static data corresponding to the first update frequency is changed to dynamic data; when it is determined that the second update frequency is not greater than the preset update threshold, the dynamic data corresponding to the second update frequency is updated to static data.

[0079] In the above embodiment, the update frequencies corresponding to static data and dynamic data are obtained in real time, and the type of data is dynamically adjusted according to the preset update threshold. When the update frequency of static data is greater than the preset update threshold, it means that the update times of these data are already high and are no longer suitable for storage as static data. They need to be changed to dynamic data and the storage strategy needs to be adjusted accordingly. Similarly, when the update frequency of dynamic data is not greater than the preset update threshold, it means that the update times of these data are already low and they can be updated to static data to optimize storage efficiency. Through this dynamic adjustment mechanism of data types, the storage method of data can be timely optimized according to the actual update situation of the data, thereby improving storage efficiency and system performance. Converting frequently updated static data into dynamic data can avoid the problem of aggravated unit wear caused by too many update operations; converting less updated dynamic data into static data can reduce unnecessary data migration and erase operations and extend the service life of the unit.

[0080] Furthermore, after writing the dynamic data into the unit with the least number of uses in the sorted list and updating the sorted list, the method further includes: Determine the number of erasures of each cell, and input the number of erasures of each cell into a standard deviation calculation formula to obtain an erasure standard deviation; When it is determined that the erasure standard deviation is greater than the preset standard deviation, the static data is transferred to any cell in the first cell group whose usage times are less than the preset usage times.

[0081] The formula for calculating standard deviation is: In the formula, σ is the erase standard deviation, N is the number of units, i is the independent variable, and x is the i is the number of erase and write times for each unit, and μ is the average number of erase and write times.

[0082] In the above embodiment, the number of erase and write times of each unit is calculated, and the standard deviation of the number of erase and write times is obtained using the standard deviation calculation formula to measure the unit usage. Balance. When the erase standard deviation is greater than the preset standard deviation, it means that the erase times of each unit are quite different, the usage is not balanced, and optimization is needed. At this time, the system will automatically transfer the static data to the unit with less usage to balance the erase times of each unit and slow down the wear rate of the unit. Through this static data transfer mechanism based on standard deviation, the usage of the unit can be dynamically adjusted to ensure that the erase times of each unit are as close as possible, thereby improving the balance of unit usage. It provides a calculation basis for the erase standard deviation and enhances the reliability of data.

[0083] The following describes the system in the embodiment of the present invention from the perspective of hardware processing. Figure 3, is a schematic diagram of the physical device structure of a data storage system of an all-flash storage system provided in an embodiment of the present application.

[0084] It should be noted that Figure 3 The structure of the system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0085] like Figure 3 As shown, the system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method in the above embodiment. In RAM 303, various programs and data required for system operation are also stored. CPU 301, ROM 302 and RAM 303 are connected to each other through a bus 304. Input / output (I / O) interface 305 is also connected to bus 304.

[0086] The following components are connected to the I / O interface 305: an input section 306 including a camera, an infrared sensor, etc.; an output section 307 including a liquid crystal display (LCD) and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.

[0087] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 309, and / or installed from a removable medium 311. When the computer program is executed by a central processing unit (CPU) 301, various functions defined in the present invention are performed.

[0088] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.

[0089] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Among them, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned 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 boxes represented in succession 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 or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0090] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the system described in the above embodiment; or may exist independently without being assembled into the system. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of a system, the system implements the method provided in the above embodiment.

[0091] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0092] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0093] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0094] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims

1. A data storage method of an all-flash storage system, characterized in that: include: Divide the initial data in the all-flash storage system into static data and dynamic data, wherein the static data is data updated less than a preset number of times, and the dynamic data is data updated not less than the preset number of times; Determine a first cell group in the all-flash storage system, wherein all cells in the first cell group are cells whose usage times are less than a preset threshold; storing the static data in any one unit in the first unit group; When the difference between the usage count of the current unit storing the static data and the average usage count is not greater than a preset difference, transferring the static data to any unit in the first unit group other than the current unit; generating a sorted list according to the number of times each unit in the first unit group is used; The dynamic data is written into the unit with the least number of uses in the sorted list, and the sorted list is updated.

2. The method according to claim 1, characterized in that: After writing the dynamic data into the unit with the least number of uses in the sorted list and updating the sorted list, the method further includes: Traversing all data blocks in the all-flash storage system, wherein all data blocks include free data blocks and non-free data blocks; marking data blocks to be erased that contain invalid data in the non-free data blocks; Transferring valid data in the to-be-erased data block to the free data block to obtain an invalid data block; The invalid data in the invalid data block is erased to obtain a free data block.

3. The method according to claim 2, characterized in that After erasing the invalid data in the invalid data block to obtain a free data block, the method further includes: Determine a space recovery rate of the all-flash storage system within a preset time, where the space recovery rate is obtained by dividing the number of free data blocks after the invalid data is erased within the preset time by the number of all the data blocks; Determining whether the space recovery rate is greater than a preset recovery rate; If not, increasing the speed of erasing the invalid data; If it is greater than, the speed of erasing the invalid data is reduced.

4. The method according to claim 1, characterized in that: After writing the dynamic data into the unit with the least number of uses in the sorted list and updating the sorted list, the method further includes: Performing read and write tests on all units in the all-flash storage system at preset intervals to obtain a read and write error rate; Determine a cell whose read / write error rate is greater than a preset error rate as a damaged cell; disabling the damaged cell to deny data from being written into the damaged cell; When it is determined that the valid data exists in the damaged unit, the valid data is transferred to any unit except the damaged unit.

5. The method according to claim 1, characterized in that After writing the dynamic data into the unit with the least number of uses in the sorted list and updating the sorted list, the method further includes: Acquire the first update frequency and the second update frequency corresponding to the static data and the dynamic data in real time; When it is determined that the first update frequency is greater than a preset update threshold, changing the static data corresponding to the first update frequency to dynamic data; When it is determined that the second update frequency is not greater than the preset update threshold, the dynamic data corresponding to the second update frequency is updated to static data.

6. The method according to claim 1, characterized in that After writing the dynamic data into the unit with the least number of uses in the sorted list and updating the sorted list, the method further includes: Determine the number of erasures of each cell, and input the number of erasures of each cell into a standard deviation calculation formula to obtain an erasure standard deviation; When it is determined that the erasure standard deviation is greater than a preset standard deviation, the static data is transferred to any unit in the first unit group whose usage times are less than a preset usage times.

7. The method according to claim 6, characterized in that The standard deviation calculation formula is: In the formula, σ is the erasure standard deviation, N is the number of cells, i is the independent variable, and x is i is the number of erase and write times of each unit, and μ is the average value of the number of erase and write times.

8. A data storage system of an all-flash storage system, characterized in that: The system comprises: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the system to execute the method as described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a system, the system is caused to execute the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product is run on a system, the system is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Information processing method and system applied to file all-flash storage

    CN120215831A

  • Information processing method and system applied to all-flash file storage

    CN120215831B