Data migration method and device, storage medium and electronic equipment

By obtaining the input and output information of the solid-state hard disk and dynamically adjusting the data migration strategy, the IO performance fluctuation caused by the inappropriate selection of SSD data migration timing is solved, and stable operation and efficient data migration under different load conditions are achieved.

CN120255818AActive Publication Date: 2025-07-04SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD

Patent Information

Application Number
CN202510667819.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-07-04
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

In the prior art, the improper selection of solid-state drives (SSDs) at the data migration timing leads to fluctuations and degradation of IO performance, and the inability to balance data migration and IO processing processes, especially after the SLC cache is exhausted, IO performance has a cliff-like decline.

Method used

By obtaining the input and output information of the solid-state hard disk, the data migration strategy is dynamically adjusted, which is divided into the first migration operation and the second migration operation. The first migration operation migrates data at a high rate in the idle state, and the second migration operation adjusts the migration speed according to the cache margin to balance IO processing and cache data migration.

Benefits of technology

Optimize the timing and method of data migration, avoid IO performance fluctuations, maintain the stable operation of SSD under different load conditions, and improve efficiency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120255818A_ABST
    Figure CN120255818A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data migration method and device, a storage medium and electronic equipment, and relates to the technical field of computers.The method comprises the steps that first information of a solid state disk is obtained, and the first information is used for reflecting the input and output conditions of the solid state disk; if it is determined that the solid state disk meets a first condition according to the first information, executing a first migration operation; if the solid state disk does not meet the first condition, executing a second migration operation; wherein the first migration operation comprises the step of executing migration operation of cached data; the second migration operation comprises the step of executing the migration operation of the cached data according to the cache margin. Thus, by obtaining the first information of the solid state disk and executing the decision of the migration operation according to the input and output conditions of the solid state disk, intelligent data migration is achieved, and the opportunity and mode of data migration are optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and particularly to a data migration method, apparatus, storage medium, and electronic device. Background Art

[0002] As the main storage device in today's era, solid state drives (SSDs, Solid State Disk) are deeply favored by users for their advantages such as low power consumption, small size, and high shock resistance. With the evolution of the manufacturing process of NAND (a non-volatile flash memory technology), flash memory particles have developed from the initial single-bit storage cells (SLC, Single-Level Cell, i.e., 1 bit / cell), multi-bit storage cells (MLC, Multi-Level Cell, i.e., 2 bit / cell) to today's three-bit storage cells (TLC, Trinary-Level Cell, i.e., 3 bit / cell), four-bit storage cells (QLC, Quad-Level Cell, i.e., 4 bit / cell), and even five-bit storage cells (PLC, Penta-level cell, i.e., 5 Bit / cell). Investigations show that storage devices based on high-density flash memory particles have occupied a relatively significant market share. Currently, some manufacturers have completed the productization of solid state storage based on QLC particles, leading a new trend in the development of SSDs.

[0003] Limited by physical characteristics, the higher the storage density of flash memory particles, the more obvious the programming influence between storage cells (cells). To solve this problem, the two-step programming method (TSP, Two-Step Program) has been proposed in related technologies, that is, after the rough programming of the lower-level word line (WL, Word Line), the fine programming of the upper-level WL is performed. Therefore, the TSP method requires the SSD to retain the data of at least one layer (layer) of WL. To save costs, most manufacturers adopt the strategy of SLC cache to reduce the use of dynamic random access memory (DRAM, Dynamic Random Access Memory) and balance the input / output (IO, Input-Output) performance. This strategy requires the host data to be written into the SLC cache first, and then the data in the SLC cache is migrated to the QLC. The migration timing is usually during the IO execution process or after the SLC cache is exhausted. This strategy has two problems: 1. From the perspective of migration timing, if data is migrated during IO processing, it will occupy the normal IO bandwidth and reduce the SSD performance; if the migration is performed after the SLC cache is exhausted, there will be a phenomenon of a cliff-like drop in IO performance; 2. From the perspective of the processing scenario, if the host continuously initiates write commands, it is impossible to balance the two processes of data migration and IO processing, or data migration can only be started after the SLC cache is exhausted. Summary of the Invention

[0004] The present disclosure provides a data migration method, apparatus, storage medium, and electronic device to at least solve the above technical problems existing in the prior art.

[0005] The technical solution of the embodiments of the present disclosure is implemented as follows: In a first aspect, an embodiment of the present disclosure provides a data migration method, the method including: Obtain first information of the solid-state drive, where the first information is used to reflect the input / output situation of the solid-state drive; If it is determined according to the first information that the solid-state drive meets a first condition, perform a first migration operation; if the solid-state drive does not meet the first condition, perform a second migration operation; Wherein, the first migration operation includes: performing a migration operation on cached data; the second migration operation includes: performing a migration operation on cached data according to the cache margin.

[0006] In the above solution, the obtaining of the first information of the solid-state drive includes: Obtain the total input / output amount in each statistical period; Determine the first information according to the total input / output amount in each statistical period.

[0007] In the above solution, the solid-state drive meeting the first condition includes: The input / output of the solid-state drive is in an idle state in a first statistical period; the first statistical period is the previous period of a second statistical period for which cached data migration is to be performed.

[0008] In the above solution, the performing of the first migration operation includes: Determine a first migration speed, and migrate the cached data of the flash memory to the storage unit of the flash memory according to the first migration speed.

[0009] In the above solution, the determining of the first migration speed includes: Obtain third information of the solid-state drive, and determine a first migration duration according to the third information, where the first migration duration is the time required to complete the migration of the cached data of N parallel pages; N is greater than or equal to 1; Determine the first migration speed according to the first migration duration; ​Among them, the third information includes: the first read duration, the first programming duration, the second programming duration, the number of parallel logical unit numbers (LUNs), and the size of the page (Page).

[0010] In the above solution, the execution of the second migration operation includes: Obtain second information, where the second information is used to reflect the cache margin of the solid-state drive; Determine a second migration speed according to the cache margin; Migrate the cache data of the flash memory to the storage unit of the flash memory according to the second migration speed.

[0011] In the above solution, before determining the second migration speed according to the cache margin, the method further includes: Compare the cache margin with a first threshold. If the cache margin is less than or equal to the first threshold, determine the second migration speed; If the cache margin is greater than the first threshold, determine not to perform data migration.

[0012] In the above solution, the determination of the second migration speed includes: Obtain the maximum migration speed of the solid-state drive, where the maximum migration speed corresponds to the recycling speed; Determine the second migration speed according to the maximum migration speed, the cache margin, the first threshold, and the second threshold.

[0013] In the above solution, the obtaining of the maximum migration speed of the solid-state drive includes: Determine the maximum migration speed according to the first write duration, the first recycling duration, and the first migration speed.

[0014] In the above solution, the method is applied to a solid-state drive, and the solid-state drive includes: a flash memory chip; the flash memory chip includes: a cache part and a storage unit part; The execution of the migration operation of the cache data includes: migrating the data in the cache part to the storage unit part; The execution of the migration operation of the cache data according to the cache margin includes: migrating the data in the cache part to the storage unit part according to the cache margin of the cache part.

[0015] In the above solution, the cache part includes an SLC cache; the storage unit part includes at least one of the following: TLC, QLC, PLC.

[0016] In a second aspect, an embodiment of the present disclosure provides a data migration device, and the device includes: A processing module, configured to obtain first information of a solid-state drive, where the first information is used to reflect the input / output condition of the solid-state drive; A migration module, configured to perform a first migration operation if it is determined according to the first information that the solid-state drive meets a first condition; and perform a second migration operation if the solid-state drive does not meet the first condition; Wherein, the first migration operation includes: performing a migration operation on cached data; and the second migration operation includes: performing a migration operation on cached data according to the cache margin.

[0017] In the above solution, the processing module is configured to obtain the total input / output amount in each statistical period; Determine the first information according to the total input / output amount in each statistical period.

[0018] In the above solution, the fact that the solid-state drive meets the first condition includes: The input / output of the solid-state drive is in an idle state in a first statistical period; and the first statistical period is the previous period of a second statistical period for which cached data migration is to be performed.

[0019] In the above solution, the migration module is configured to determine a first migration speed, and migrate the cached data of the flash memory to the storage unit of the flash memory according to the first migration speed.

[0020] In the above solution, the migration module is configured to obtain third information of the solid-state drive, and determine a first migration duration according to the third information, where the first migration duration is the time required to complete the migration of cached data of N parallel pages; N is greater than or equal to 1; Determine the first migration speed according to the first migration duration; Wherein, the third information includes: a first read duration, a first programming duration, a second programming duration, the number of parallel logical unit numbers (LUNs), and the size of a page.

[0021] In the above solution, the migration module is configured to obtain second information, where the second information is used to reflect the cache margin of the solid-state drive; Determine a second migration speed according to the cache margin; Migrate the cached data of the flash memory to the storage unit of the flash memory according to the second migration speed.

[0022] In the above solution, before determining the second migration speed according to the cache margin, the migration module is configured to compare the cache margin with a first threshold, and if the cache margin is less than or equal to the first threshold, determine the second migration speed; If the cache margin is greater than the first threshold, determine not to perform data migration.

[0023] In the above solution, the migration module is used to obtain the maximum migration speed of the solid-state drive, and the maximum migration speed corresponds to the recycling speed; Determine the second migration speed according to the maximum migration speed, cache margin, first threshold, and second threshold.

[0024] In the above solution, the migration module is used to determine the maximum migration speed according to the first write duration, first recycling duration, and first migration speed.

[0025] In the above solution, the device is applied to a solid-state drive, and the solid-state drive includes: a flash memory chip; the flash memory chip includes: a cache part and a storage unit part; Performing the migration operation of the cache data includes: migrating the data in the cache part to the storage unit part; Performing the migration operation of the cache data according to the cache margin includes: migrating the data in the cache part to the storage unit part according to the cache margin of the cache part.

[0026] In the above solution, the cache part includes an SLC cache; the storage unit part includes at least one of the following: TLC, QLC, PLC.

[0027] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the data migration methods.

[0028] In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, and the computer instructions are used to cause a computer to execute the data migration method according to any one of the above.

[0029] The embodiments of the present disclosure have the following beneficial effects: Apply the data migration method, device, storage medium, and electronic device provided by the embodiments of the present disclosure to obtain the first information of the solid-state drive, where the first information is used to reflect the input / output situation of the solid-state drive; if it is determined according to the first information that the solid-state drive meets the first condition, perform the first migration operation; if the solid-state drive does not meet the first condition, perform the second migration operation; where the first migration operation includes: performing the migration operation of the cached data; the second migration operation includes: performing the migration operation of the cached data according to the cache margin. In this way, by obtaining the first information of the solid-state drive and making a decision on the migration operation according to its input / output situation, intelligent data migration is achieved, and the timing and method of data migration are optimized.

[0030] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a flowchart of a data migration method provided by an embodiment of the present disclosure; Figure 2 It is a schematic diagram of the change of the second cache rate provided by an embodiment of the present disclosure; Figure 3 It is a schematic diagram of a cache migration process provided by an embodiment of the present disclosure; Figure 4 It is a flowchart of a data migration method provided by an application embodiment of the present disclosure; Figure 5 It is a schematic diagram of the structure of a solid-state drive provided by an embodiment of the present disclosure; Figure 6 It is a schematic diagram of the structure of a data migration device provided by an embodiment of the present disclosure; Figure 7 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0032] To make the objectives, features, and advantages of the present disclosure more obvious and understandable, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present disclosure.

[0033] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it is understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.

[0034] If a similar description such as "first / second" appears in the application documents, the following explanation shall be added. In the following description, the terms "first\second\third" are only used to distinguish similar objects and do not represent a specific order for the objects. It is understood that "first\second\third" can be interchanged with a specific order or sequence when permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0036] Before further elaborating on the embodiments of the present disclosure, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are subject to the following explanations.

[0037] A solid-state drive (SSD) is a hard drive based on flash memory storage technology that uses flash memory cells instead of the rotating disks of a traditional hard disk drive (HDD). The advantages of an SSD include faster read and write speeds, lower power consumption, and higher shock resistance. The core storage unit of an SSD is typically NAND flash memory, and NAND flash memory has different types, such as SLC (single-level cell), MLC (multi-level cell), TLC (triple-level cell), and QLC (quadruple-level cell).

[0038] SLC (Single-Level Cell) is the most basic storage type, and each cell stores one bit of data (0 or 1). SLC flash memory has high durability and faster write speeds and is suitable for applications with high performance requirements.

[0039] QLC (Quad-Level Cell) is a type of flash memory with the highest storage density, and each cell stores 4 bits of data. Compared with SLC, QLC has a higher storage density but slower write speeds.

[0040] The Two-Step Program (TSP) is a technique proposed for high-density flash memory to avoid interference between cells of word lines (WLs) in different layers. The meaning of "two-step" is to write to the same WL twice. There are generally two ways to use TSP. One is to use DRAM to implement TSP, but this method is costly. Therefore, another method is proposed, that is, data is first written into the SLC cache, and then the data in the SLC cache is migrated to the QLC. This migration process usually occurs in the following two situations: During the execution of IO: When the SSD has idle time, the background writes the cached data into the QLC; After the SLC cache is exhausted: When the SLC cache is full, new data will be directly written into the QLC, and at the same time, the data in the cache will be migrated to the QLC.

[0041] The SLC cache serves as a temporary storage area for storing frequently written data. It enables the SSD to provide high performance in a short time because the write speed of SLC is much higher than that of QLC. When the cache is full, the data in the cache must be migrated to the QLC, which may cause performance fluctuations.

[0042] Therefore, the choice of the data migration timing is crucial. In most cases, the migration operation is asynchronous, which means that the process of writing data will not be interrupted due to the migration process. If there is too much cached data, the migration operation will slow down the new writing process. However, in related technologies, the migration generally occurs during the execution of IO or after the SLC cache is exhausted, which will inevitably affect the IO performance and even cause a cliff-like drop in IO performance. Therefore, it is necessary to solve the problem of reasonably scheduling and managing data migration and IO processing to reduce performance fluctuations caused by migration.

[0043] Based on this, the embodiments of the present disclosure provide a data migration method, device, storage medium, and electronic device. The first information of the solid-state drive is obtained, and the first information is used to reflect the input and output conditions of the solid-state drive. If it is determined according to the first information that the solid-state drive meets the first condition, a first migration operation is executed. If the solid-state drive does not meet the first condition, a second migration operation is executed. Among them, the first migration operation includes: executing the migration operation of cached data; the second migration operation includes: executing the migration operation of cached data according to the cache margin. In this way, by obtaining the first information of the solid-state drive and making a decision on the migration operation according to its input and output conditions, intelligent data migration is realized, and the timing and method of data migration are optimized.

[0044] Figure 1 is a schematic flowchart of a data migration method provided by an embodiment of the present disclosure, as Figure 1As shown, the data migration method includes: Step 101, obtain the first information of the solid state drive (SSD); the first information is used to reflect the input-output (IO, Input-Output) situation of the solid state drive; Step 102, if it is determined according to the first information that the solid state drive meets the first condition, perform the first migration operation; if the solid state drive does not meet the first condition, perform the second migration operation; Wherein, the first migration operation includes: performing the migration operation of cached data; the second migration operation includes: performing the migration operation of cached data according to the cache margin.

[0045] Here, the first migration operation is a migration operation that starts quickly, and data migration is performed at the first migration speed; the second migration operation is to perform data migration at the second migration speed.

[0046] The second migration speed and the first migration speed characterize the migration speed of the data in the cache. The second migration speed is lower than the first migration speed, and during the process of the second migration operation, the second migration speed can change with the size of the cache margin, that is, the data migration is performed at a variable migration speed (i.e., the second migration speed) during the second migration operation.

[0047] In this way, when the solid state drive meets the first condition, data migration is performed at the first rate, and when it does not meet the first condition, the migration operation of cached data is performed according to the cache margin (the migration speed can be adjusted), taking into account both cache migration and IO processing, balancing the two processes of IO processing and cached data migration, and avoiding a cliff-like decline in IO performance.

[0048] Specifically, determining to perform the first migration operation or the second migration operation according to the input-output situation of the solid state drive helps to avoid over-occupying the IO bandwidth, thereby reducing the interference to normal IO operations and maintaining the high performance of the SSD. And when performing the second migration operation, the data migration speed can be flexibly adjusted according to the cache margin situation to prevent the phenomenon of a cliff-like decline in IO performance.

[0049] In some embodiments, the obtaining of the first information of the solid state drive includes: Obtain the total amount of input-output within the first statistical period; Determine the first information according to the total amount of input-output within the first statistical period.

[0050] Here, the total amount of input-output represents the data input and / or output by the solid state drive within the first statistical period. Whether the IO is in an idle state can be determined according to the first information.

[0051] Here, the input and / or output data may include read data and / or write data.

[0052] The first statistical period may be a predetermined time window, which can be from dozens to hundreds of milliseconds or other suitable time periods. During this time period, the SSD will count the amount of all input / output data it processes.

[0053] Here, by calculating the total input / output volume of the SSD within the first statistical period, the operating condition of the SSD can be obtained, that is, whether it is in this idle state. For example, if the total input / output volume is high, it can be considered that the SSD is in a relatively busy state; if the total input / output volume is low, it can be considered that the SSD is in a low-load state; if the total input / output volume is 0 or close to 0, it can be considered that the SSD is in an idle state.

[0054] The first information can specifically characterize the input / output situation as an idle state or a non-idle state; it can also be a busy state, an idle or low-load state, etc.

[0055] Here, by obtaining the first information of the solid-state drive and evaluating the load situation of the SSD based on the total input / output volume within the first statistical period, the system can effectively monitor the real-time performance and resource utilization of the SSD. The total input / output volume reflects the amount of data processed by the SSD during this period, which can intuitively reflect the current IO load, and then determine whether the SSD is in an idle state. Based on these data, the system can dynamically adjust the IO processing and cache data migration strategies to optimize performance under different load conditions.

[0056] Specifically, if it is detected that the IO is in an idle state, the migration rate of the cache data can be appropriately increased to improve the cache recycling efficiency and avoid performance waste caused by resource idleness; while in a high-load situation, the system will limit the data migration speed, reduce the occupancy of the IO bandwidth, and prevent a sharp drop in IO performance or excessive consumption of the bandwidth.

[0057] In this way, the dynamic adjustment based on the IO situation can not only avoid performance fluctuations caused by frequent migrations in traditional methods, but also ensure the stable operation of the SSD in different usage scenarios. By optimizing resource allocation, avoiding excessive occupancy of the IO bandwidth and performance fluctuations, the efficiency and reliability of the SSD are improved.

[0058] In some embodiments, the solid-state drive satisfies the first condition, including: The input / output of the solid-state drive is in an idle state within the first statistical period; the first statistical period is the previous period of the second statistical period for which cache data migration is to be performed.

[0059] Here, by utilizing the principle of temporal locality, it is considered that if the I / O was in an idle state in the previous time period (equivalent to the first statistical period), it can be reasonably assumed that there is a high probability that the I / O will be idle at the next moment (equivalent to the second statistical period). Therefore, it is possible to determine whether to initiate the background migration of cached data (i.e., the first migration operation) based on the state of the previous time period.

[0060] It should be noted that the next moment can refer to the start moment of the second statistical period. The first statistical period and the second statistical period are equivalent to two time windows that slide with the passage of time. Therefore, for the current moment, if the I / O has been in an idle state during the first statistical period between them, it is equivalent to the current moment being a time point at which data migration can be performed, and these time points continuously form the second statistical period. Therefore, it is not difficult to understand that, temporally, the second statistical period represents a period of time after the first statistical period, and the time length of the second statistical period can be the same as or different from that of the first statistical period. For example, if I / O processing suddenly occurs after the cached data migration is executed, the time length of the second statistical period can be less than that of the first statistical period.

[0061] In this way, the regularity brought by temporal locality is utilized, effectively improving the resource scheduling efficiency of the system. Specifically, if the input / output during the first statistical period is in an idle state, it means that the load on the SSD is relatively low during this time period, and there is a high possibility that the system will continue to maintain a low I / O load in the subsequent second statistical period. At this time, by initiating the background data migration operation, this idle time can be effectively utilized to complete the migration task of the cached data in advance without affecting the current I / O performance. The cache migration method predicted based on the state of the previous cycle can not only avoid the delay caused by waiting for the I / O idle state, but also reasonably process data when the SSD load is low, improving the overall performance of the system; by avoiding initiating the migration operation during high load, it is possible to reduce the occupancy of the SSD bandwidth and avoid the generation of performance bottlenecks.

[0062] In some embodiments, the execution of the first migration operation includes: Determine the first migration speed; Migrate the cached data of the flash memory to the storage unit of the flash memory according to the first migration speed.

[0063] Here, the cached data of the flash memory refers to the data in the SLC cache of the solid-state drive; the cache refers to the SLC cache, which is simply referred to as the cache here; The storage unit of the flash memory includes at least one of the following: TLC, QLC, PLC; Migrating the cached data of the flash memory to the storage unit of the flash memory means migrating the data in the SLC cache to the storage unit (such as QLC) of the flash memory.

[0064] When starting a normal migration (i.e., the first migration operation), the amount of migration data processed by the SSD per unit time (i.e., the migration speed) needs to match the current statistical period (denoted as dt), so as to ensure a rapid response to burst I / O in the next statistical period.

[0065] In some embodiments, the determining of the first migration speed includes: Obtaining third information of the solid-state drive, and determining a first migration duration according to the third information, where the first migration duration is the time required to complete the cache data migration of N parallel pages; N is greater than or equal to 1; Determining the first migration speed according to the first migration duration; Wherein, the third information includes: a first read duration, a first programming duration, a second programming duration, the number of parallel logical unit numbers (LUNs, Logical Unit Number), and the size of a page.

[0066] Here, the first read duration is the time required to read a SLC (Single-Level Cell) Page.

[0067] The first programming duration is the duration of roughly writing data into a QLC (quad-level cell) page (i.e., the duration of roughly programming a QLC page).

[0068] The second programming duration is the time for finely writing data into a QLC page (i.e., the duration of finely programming a QLC page); wherein, rough programming refers to the write operation of the flash memory, which means a fast write but not fully optimized process, while fine programming usually means that more precise optimization is performed on the data during the write process to improve storage stability and long-term service life. Therefore, the second programming duration is generally greater than the first programming duration.

[0069] A LUN is a logical unit number used to represent a storage unit in a flash memory chip. In a flash memory, multiple LUNs can usually operate in parallel to improve the performance of the system. Therefore, the number of parallel LUNs (denoted as N, N is greater than or equal to 1) represents the number of storage units supported by the flash memory chip for parallel processing. Generally, the larger N is, the stronger the parallel read / write ability of the flash memory.

[0070] A page refers to the page of the flash memory, usually a fixed storage block size (such as 4KB, 8KB, etc.). The page of the flash memory is the basic unit for read / write operations.

[0071] The N parallel pages refer to the N SLC pages corresponding to N parallel LUNs. It should be noted that since these N parallel pages are on N different LUNs, and a LUN is the smallest unit for parallel read and write. Therefore, the time to migrate one page on one LUN is close to the time to simultaneously migrate the N parallel pages corresponding to N LUNs.

[0072] The first migration speed characterizes the amount of migration data processed by the solid-state drive per unit time.

[0073] It should be noted that the first read duration, the first programming duration, the second programming duration, the number of parallel logical unit numbers, and the page size in the above-mentioned third information are determined based on the attributes or parameters of the solid-state drive itself. Different solid-state drives may have different third information. The following description of the third information is only an example for understanding the determination method of the first migration speed.

[0074] For example, assume that the time to read one SLC page (i.e., the first read duration) is , the time to roughly program one QLC page (i.e., the first programming duration) is , the time to finely program one QLC page (i.e., the second programming duration) is , the number of parallel LUNs of the flash chip (i.e., the number of parallel logical unit numbers) is , the size of each page (i.e., the page size) is , then it is determined that the time required to complete the cache data migration of parallel pages is approximately ; Then, according to the time required to complete the cache data migration of pages, the first migration speed (i.e., the amount of migration data processed per unit time) is determined to be . That is indicates that when in the idle state, the solid-state drive only performs data migration operations to migrate the data in the cache part to the storage unit part (such as SLC cache to QLC), and when operating at full load, the maximum rate of data migration (or SLC recycling).

[0075] Here, within the statistical period, combined with the first migration speed it can be known that the maximum amount of data that the solid-state drive can migrate at most is , where dt represents the duration of the statistical period; Therefore, when the IO is in the idle state, within the statistical period, the solid-state drive can at most continuously process amount of cache data to ensure the response time of burst IO in the next statistical period.

[0076] Here is an application embodiment. Suppose , , , , , , then the first migration speed is approximately , then the amount of data migrated within dt = 100 ms is at most approximately 48 MiB.

[0077] In some embodiments, the execution of the second migration operation includes: Obtain second information, where the second information is used to reflect the cache remaining capacity of the solid - state drive; Determine the second migration speed according to the cache remaining capacity; Migrate the cache data of the flash memory to the storage unit of the flash memory according to the second migration speed.

[0078] Here, the cache refers to the SLC cache, and the cache remaining capacity refers to: the remaining space of the SLC cache of the solid - state drive; The cache data of the flash memory refers to: the data in the SLC cache of the solid - state drive; The cache unit of the flash memory may include at least one of the following: TLC, QLC, PLC; Migrate the cache data of the flash memory to the storage unit of the flash memory means: migrate the data in the SLC cache to the storage unit (such as QLC) of the flash memory.

[0079] In actual design, a detection unit can be designed in the solid - state drive. This detection unit is used to detect the cache remaining capacity of the solid - state drive. According to the detected cache remaining capacity, the size of the cache (i.e., SLC cache) in the solid - state drive that is in the released state and has no written data can be judged.

[0080] In this way, by monitoring the cache remaining capacity and performing targeted cache data migration, it helps to avoid the cache space being filled up, ensure the smooth migration of cache data, and avoid a cliff - like decline in SSD performance. This method can balance the process of data migration and normal IO processing by dynamically adjusting the data migration strategy, avoid suddenly starting data migration when the cache is exhausted, and reduce the risk of system instability and performance fluctuations.

[0081] In some embodiments, before determining the second migration speed according to the cache remaining capacity, the method further includes: Compare the cache remaining capacity with a first threshold. If the cache remaining capacity is less than or equal to the first threshold, determine the second migration speed; If the cache remaining capacity is greater than the first threshold, determine not to perform data migration.

[0082] In some embodiments, the determining of the second migration speed includes: Obtaining the maximum migration speed of the solid state drive; the maximum migration speed corresponds to the recycling speed; Determining the second migration speed according to the maximum migration speed, the cache margin, the first threshold, and the second threshold.

[0083] Wherein, the obtaining of the maximum migration speed of the solid state drive includes: Determining the maximum migration speed according to the first write duration, the first recycling duration, and the first migration speed.

[0084] Here, the second migration speed represents the amount of migration data processed by the solid state drive per unit time. Since the cache margin changes during the migration and / or recycling process, it is not difficult to understand that the second migration speed is a variable value.

[0085] The first write duration represents the time required to write data to an SLC page; The first recycling duration represents the time required to recycle (i.e., complete data migration) the data of N parallel pages. Here, the N parallel pages refer to the N SLC pages corresponding to N parallel LUNs. The time required to recycle the data of one page on one LUN is very close to the time required to simultaneously recycle the data of the N corresponding parallel pages on N LUNs, which is equivalent; To implement the second migration operation, it is necessary to determine the ratio of the amount of data migrated in the cache to the amount of IO data. For example, assume that the time (i.e., the first write duration) required to write data to an SLC page is , and the time (the first recycling duration) required to recycle the data of N parallel SLC pages is ; Determine that the maximum migration speed in the second migration operation is .

[0086] Specifically, when the cache margin reaches the second threshold (i.e., close to ), the SSD needs to ensure that the recycling rate of the cache is basically the same as the consumption rate, so as to stabilize the cache margin for subsequent IO to proceed smoothly. Therefore, within the time period of the statistical period (dt), of the time should be allocated to cache data migration, and the remaining time should be allocated to normal IO; here, determine that the maximum value of the amount of cache data migrated within the dt time period is . Therefore, according to , the maximum migration speed can be determined to be .

[0087] When the cache margin just reaches the first threshold (i.e., greater than , and close to ), the SLC data migration has just started, and the amount of SLC data migrated within the dt time period is almost zero; according to the two nodes of ( , 0) and ( , ), the functional relationship between the cache margin and the amount of cached data T migrated within the dt time can be established, and the following relationship can be obtained: ; According to this relationship, the second migration speed

[0088] is further determined. Among them, T represents the amount of migrated data within the dt time, represents the maximum value of the amount of migrated data within the dt time, r represents the cache margin, and dt represents the duration of the statistical period.

[0089] By the above method, when starting the hybrid processing (i.e., the migration of cached data and the IO processing are carried out simultaneously), the amount of cached data migrated and the amount of IO data processed within the statistical period (dt) are reasonably allocated. On the one hand, the cliff-like decline of IO performance is avoided, ensuring stability; on the other hand, the consumption of the cache is delayed, ensuring that subsequent IO can proceed normally.

[0090] Through the two designed thresholds and , when the cache margin is just less than the first threshold , the SSD starts to migrate the cached data during the IO process, and at this time the IO performance slightly decreases; when the cache margin approaches (here approaching means that the difference between the cache margin and the second threshold is close to 0) the second threshold , the SSD needs to ensure that the cache recycling rate is basically the same as the consumption rate, so as to stabilize the cache margin and smoothly perform subsequent IO.

[0091] From the first threshold to the second threshold , the bandwidth occupancy ratio caused by the cache migration gradually increases, and the IO bandwidth occupancy ratio gradually decreases, effectively avoiding the cliff-like decline of IO performance. In addition, during the second migration operation, the system may have a situation where the IO is idle, and at this time the migration method can be directly switched to the first migration operation, thus accelerating the cache recycling speed.

[0092] Figure 2 is a schematic diagram of the change of the second cache rate provided by the embodiment of the present disclosure; as Figure 2 shown, the second migration speed changes with the change of the cache margin r. When the cache margin r is greater than the threshold When the cache data migration is not necessary, when the cache margin r is just less than the threshold value When the SSD starts to perform cache data migration during the IO process, the IO performance will decrease slightly at this time; as the cache margin r changes from the threshold value to the threshold value its migration speed also increases from 0 to the maximum This is used to ensure that the cache recovery rate is basically the same as the consumption rate, so as to stabilize the cache margin and smoothly perform subsequent IOs.

[0093] Figure 3 is a schematic diagram of a cache migration process provided by an embodiment of the present disclosure; Figure 3 In the figure, IO indicates the existence of an IO operation and a non-idle state, and idle indicates an idle state without an IO operation. Reaching the first threshold means that when there is an IO operation and a non-idle state, the cache margin exceeds the first threshold. As Figure 3 shown, at the beginning, the cache margin space is sufficient, and cache data migration will not occur when the system accepts IO operations; when the firmware captures the idle state, cache data migration is performed at the migration speed when idle (the speed is ) until the next IO operation occurs and then stops; after continuing the IO operation for a period of time, the cache margin is insufficient and has reached the first threshold ( ), then the second migration operation is started, and the system gradually increases the cache data migration speed, with a maximum of v mix ; when the idle state is detected again, the system continues to perform data migration quickly (at this time the migration speed is ).

[0094] In some embodiments, the method is applied to a solid-state drive, and the solid-state drive includes: a flash memory chip; the flash memory chip includes: a cache part and a storage unit part; Performing the migration operation of the cache data includes: migrating the data in the cache part to the storage unit part; Performing the migration operation of the cache data according to the cache margin includes: migrating the data in the cache part to the storage unit part according to the cache margin of the cache part.

[0095] Here, the cache part includes an SLC cache; the storage unit part includes at least one of the following: TLC, QLC, PLC.

[0096] Among them, QLC (Quad-Level Cell): Each storage unit (NAND flash memory unit) can store 4 bits of data.

[0097] TLC (Triple-Level Cell): Each storage cell can store 3 bits of data. Compared with QLC, TLC has slightly higher durability, but each cell stores more data, which means its storage density is relatively high and its performance is relatively balanced.

[0098] PLC (Penta-Level Cell): Each storage cell can store 5 bits of data. Compared with QLC, PLC stores more data in each cell, thus further improving the storage density.

[0099] In the embodiments of the present disclosure, the SLC cache with higher read and write speeds is utilized, significantly improving the short-term random read and write performance of the SSD. After writing data into the SLC cache, the data is migrated to storage cell parts such as TLC, QLC, or PLC according to the cache margin. This not only optimizes the utilization of storage space but also reduces the write latency.

[0100] In addition, this dynamic management can also maintain the stability of the SSD performance, avoiding performance fluctuations caused by cache fullness. Through dynamic management (i.e., based on whether the first condition is met and combined with the cache margin) of cache data migration, the SSD can optimize the storage space while improving performance, enhancing the cost performance and user experience of the device.

[0101] Figure 4 It is a schematic flowchart of a data migration method provided for an application embodiment of the present disclosure; as Figure 4 shown, the method is applied to a solid-state drive, such as the solid-state drive shown below Figure 5 shown, the method includes: Step 401, regularly detect the IO status; Here, monitor the total input / output (IO) of the solid-state drive according to the statistical period, and determine whether the IO status within the statistical period is an idle state based on the total input / output.

[0102] Step 402, determine whether the IO is in an idle state; if the IO is in an idle state, perform the first migration operation; if the IO is not in an idle state, go to step 403; Here, using the principle of temporal locality, it is considered that if the IO in the previous statistical period (equivalent to the first statistical period) is in an idle state, it can be reasonably considered that the IO in the next moment (equivalent to the second statistical period) has a high probability of being idle, and based on this, the IO status in the next statistical period is speculated.

[0103] Step 403, detect the cache margin; Here, the cache refers to the SLC cache of the solid-state drive. Correspondingly, the cache margin refers to the remaining space of the SLC cache of the solid-state drive; Step 404: Determine whether there is a cache margin warning; if there is a cache margin warning, perform a second migration operation; if there is no cache margin warning, perform normal I / O.

[0104] Here, two thresholds are provided, denoted as and , greater than ; Denote the cache margin as r. Determining whether there is a cache margin warning includes: comparing the cache margin r with the threshold and the threshold . If , perform a second migration operation; if , perform normal I / O processing.

[0105] Here, performing the second migration operation requires balancing I / O performance and cache migration. When the cache margin r is just less than the threshold , the SSD starts to migrate the cached data during the I / O process, and at this time, the I / O performance decreases slightly; when the cache margin slowly approaches the threshold , the SSD needs to ensure that the cache recycling rate is basically the same as the consumption rate, so as to stabilize the cache margin to smoothly perform subsequent I / O.

[0106] A method for determining the second migration speed is proposed. According to the two nodes ( , 0) and ( , ), calculate according to the following formula: ; where T represents the amount of migrated data within dt time, represents the maximum amount of migrated data within dt time, r represents the cache margin, and dt represents the duration of the statistical period. Specifically, refer to the description in the method shown in Figure 1 , which will not be elaborated here.

[0107] The method provided by this embodiment of the present disclosure dynamically adjusts the data migration operation according to the input and output conditions of the solid-state drive (SSD) to optimize the SSD performance and balance the cache data migration and I / O processing. Specifically, when the SSD meets specific conditions (i.e., the idle state), a relatively high rate is used for data migration to ensure that the SSD performance is fully utilized under low load; while when the load is high (i.e., the non-idle state), the migration speed is adjusted according to the cache margin to avoid over-occupying resources, thereby reducing the impact on I / O performance.

[0108] In this way, it is possible to effectively avoid the cliff-like decline in IO performance and ensure relatively stable performance under various load conditions. At the same time, this dynamic adjustment method enables the coordination between cache data migration and IO processing, avoiding the performance fluctuations caused by frequent migrations in traditional methods.

[0109] In addition, performing the migration operation according to the cache margin can also reduce the frequent writes to the hard disk and lower the write pressure. Since the cache migration speed can be flexibly adjusted, this method can better adapt to different load conditions and ensure that the SSD can still maintain high stability and response speed during use.

[0110] Figure 5 Schematic diagram of the structure of a solid-state drive provided by an embodiment of the present disclosure; as Figure 5 shown, the solid-state drive includes: an IO interface, a cache migration module, and a flash memory. Among them, the IO interface is used for data transmission with external devices (such as a host).

[0111] The cache migration module is responsible for migrating data between the SLC cache and the QLC particles, and it can manage the cache space and ensure data migration as needed.

[0112] The flash memory is the storage medium of the solid-state drive, where data is actually stored.

[0113] Specifically, the cache migration module may include: a timer, an IO statistics unit, a cache margin detection unit, and a cache migration processing unit. The timer is used to notify the IO statistics unit to periodically count the IO situation; for example, it can be set to count once every dozens or hundreds of milliseconds.

[0114] The cache margin monitoring unit is used to monitor the margin of the SLC cache (i.e., the above-mentioned cache margin) in real time. The IO statistics unit and the cache margin monitoring unit respectively output two parameters, the IO situation and the cache margin, in the previous statistical period to the cache migration processing unit. The cache migration processing unit is used to determine the amount of cache migration data per cycle, configure cache migration information, etc., so as to notify the flash memory side to complete the data migration from the cache to the QLC particles. That is, the cache migration processing unit decides how much data should be migrated per cycle, that is, determines the migration speed, and configures relevant cache migration information according to the statistical data (IO situation and cache margin) provided by the previous two. Here, for the specific operations performed by the cache migration processing unit, reference can be made to Figure 1 the method shown, which will not be elaborated here.

[0115] Figure 6 Schematic diagram of the structure of a data migration device provided by an embodiment of the present disclosure; asFigure 6 As shown, the device includes: A processing module, configured to obtain first information of a solid-state drive, where the first information is used to reflect the input / output condition of the solid-state drive; A migration module, configured to perform a first migration operation if it is determined according to the first information that the solid-state drive meets a first condition; and perform a second migration operation if the solid-state drive does not meet the first condition; Wherein, the first migration operation includes: performing a migration operation of cache data; and the second migration operation includes: performing a migration operation of cache data according to the cache margin.

[0116] In some embodiments, the processing module is configured to obtain the total amount of input / output within each statistical period; Determine the first information according to the total amount of input / output within each statistical period.

[0117] In some embodiments, that the solid-state drive meets the first condition includes: The input / output of the solid-state drive is in an idle state within a first statistical period; and the first statistical period is the previous period of a second statistical period for which cache data migration is to be performed.

[0118] In some embodiments, the migration module is configured to determine a first migration speed, and migrate the cache data of the flash memory to the storage unit of the flash memory according to the first migration speed.

[0119] In some embodiments, the migration module is configured to obtain third information of the solid-state drive, and determine a first migration duration according to the third information, where the first migration duration is the time required to complete the migration of cache data of N parallel pages; N is greater than or equal to 1; Determine the first migration speed according to the first migration duration; Wherein, the third information includes: a first read duration, a first programming duration, a second programming duration, the number of parallel logical unit numbers (LUNs), and the size of a page.

[0120] In some embodiments, the migration module is configured to obtain second information, where the second information is used to reflect the cache margin of the solid-state drive; Determine a second migration speed according to the cache margin; Migrate the cache data of the flash memory to the storage unit of the flash memory according to the second migration speed.

[0121] In some embodiments, the migration module is configured to compare the cache margin with a first threshold before determining the second migration speed according to the cache margin, and determine the second migration speed if the cache margin is less than or equal to the first threshold. If the cache remaining amount is greater than the first threshold, it is determined not to perform data migration.

[0122] In some embodiments, the migration module is configured to obtain the maximum migration speed of the solid-state drive, and the maximum migration speed corresponds to the recycling speed; Determine the second migration speed according to the maximum migration speed, the cache remaining amount, the first threshold, and the second threshold.

[0123] In some embodiments, the migration module is configured to determine the maximum migration speed according to the first write duration, the first recycling duration, and the first migration speed.

[0124] In some embodiments, the device is applied to a solid-state drive, and the solid-state drive includes: a flash memory chip; the flash memory chip includes: a cache part and a storage unit part; Performing the migration operation of the cache data includes: migrating the data in the cache part to the storage unit part; Performing the migration operation of the cache data according to the cache remaining amount includes: migrating the data in the cache part to the storage unit part according to the cache remaining amount of the cache part.

[0125] In some embodiments, the cache part includes an SLC cache; the storage unit part includes at least one of the following: TLC, QLC, PLC.

[0126] It can be understood that when the data migration device provided in the above embodiments implements the corresponding data migration method, the above processing can be allocated to different program modules as needed to complete all or part of the above-described processing. In addition, the device provided in the above embodiments and the embodiments of the corresponding method belong to the same concept, and the specific implementation process can be seen in the method embodiments, which will not be elaborated here.

[0127] An embodiment of the present application provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data migration method.

[0128] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, where the executable instructions are stored, and when the executable instructions are executed by a processor, the processor will be caused to execute the data migration method provided in the embodiments of the present application.

[0129] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; or may be various devices including one or any combination of the above memories.

[0130] In some embodiments, the executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as an independent program or being deployed as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0131] As an example, the executable instructions may or may not correspond to a file in the file system, may be stored as part of a file that stores other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, stored in a single file dedicated to the program being discussed, or stored in multiple cooperating files (for example, files that store one or more modules, subroutines, or code portions).

[0132] As an example, the executable instructions may be deployed to execute on one computing device, or on multiple computing devices located at one location, or on multiple computing devices distributed at multiple locations and interconnected by a communication network.

[0133] Figure 7 Schematic structural diagram of an electronic device provided for an embodiment of the present disclosure; as Figure 7 shown, the electronic device 70 includes: a processor 701, and a memory 702 communicatively connected to the processor 701; the memory 702 stores instructions executable by the processor 701. The instructions are executed by the processor 701 to enable the processor 701 to perform: Obtain first information of the solid-state drive, where the first information is used to reflect the input / output situation of the solid-state drive; if it is determined according to the first information that the solid-state drive meets a first condition, perform a first migration operation; if the solid-state drive does not meet the first condition, perform a second migration operation; where the first migration operation includes: performing a migration operation of cached data; the second migration operation includes: performing a migration operation of cached data according to the cache margin.

[0134] The electronic device provided in the above embodiment and the embodiment of the corresponding data migration method belong to the same concept, and the specific implementation process is detailed in the method embodiment and will not be repeated here.

[0135] In actual application, the electronic device 70 may further include: at least one network interface 703. Each component in the electronic device 70 is coupled together through a bus system 704. It can be understood that the bus system 704 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 704 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 7 all kinds of buses are labeled as the bus system 704. Among them, the number of the processors 701 can be at least one, and the number of the memories 702 can be at least one. The network interface 703 is used for the communication between the electronic device 70 and other devices in a wired or wireless manner.

[0136] The memory 702 in the embodiments of the present disclosure is used to store various types of data to support the operation of the electronic device 70.

[0137] The method disclosed in the above embodiments of the present disclosure can be applied to the processor 701 or implemented by the processor 701. The processor 701 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor 701 or the instructions in the form of software. The above-mentioned processor 701 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 701 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present disclosure. The general-purpose processor may be a microprocessor or any conventional processor, etc. Combining the steps of the method disclosed in the embodiments of the present disclosure, it can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. The software module may be located in a storage medium, and this storage medium is located in the memory 702. The processor 701 reads the information in the memory 702 and combines its hardware to complete the steps of the foregoing data migration method.

[0138] In some embodiments, the electronic device 70 may be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontroller units (MCUs), microprocessors, or other electronic components for performing the foregoing method.

[0139] It should be understood that the various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. There is no limitation herein.

[0140] In the above description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.

[0141] Unless otherwise defined, all technical and scientific terms used in this disclosure have the same meaning as commonly understood by those of ordinary skill in the technical field to which this disclosure belongs. The terms used in this disclosure are only for the purpose of describing the embodiments of this disclosure and are not intended to limit this disclosure.

[0142] It should be understood that in the various embodiments of this disclosure, the magnitude of the serial number of each implementation process does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this disclosure.

[0143] In addition, the terms "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In the description of this disclosure, "a plurality" means two or more, unless otherwise specifically defined.

[0144] As described above, it is only the specific implementation manner of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present disclosure can easily think of changes or substitutions, which should all be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claimed rights.

Claims

1. A data migration method, characterized in that, The method includes: Obtaining first information of the solid-state drive, where the first information is used to reflect the input / output situation of the solid-state drive; If it is determined according to the first information that the solid-state drive meets the first condition, performing a first migration operation; if the solid-state drive does not meet the first condition, performing a second migration operation; Wherein, the first migration operation includes: performing a migration operation of cache data; the second migration operation includes: performing a migration operation of cache data according to the cache margin.

2. The method according to claim 1, wherein The obtaining the first information of the solid-state drive includes: Obtaining the total input / output amount in each statistical period; Determining the first information according to the total input / output amount in each statistical period.

3. The method according to claim 2, characterized in that, The solid-state drive meeting the first condition includes: The input / output of the solid-state drive is in an idle state in the first statistical period; the first statistical period is the previous period of the second statistical period for which cache data migration is to be performed.

4. The method according to claim 1, wherein The performing the first migration operation includes: Determining a first migration speed, and migrating the cache data of the flash memory to the storage unit of the flash memory according to the first migration speed.

5. The method according to claim 4, characterized in that, The determining the first migration speed includes: Obtain the third information of the solid-state drive, and determine the first migration duration according to the third information. The first migration duration is the time required to complete the cache data migration of N parallel pages; N is greater than or equal to 1; Determining the first migration speed according to the first migration duration; Wherein, the third information includes: the first read duration, the first programming duration, the second programming duration, the number of parallel logical unit numbers LUN, and the size of the page.

6. The method according to claim 1, characterized in that, The performing the second migration operation includes: Obtaining second information, where the second information is used to reflect the cache margin of the solid-state drive; Determining a second migration speed according to the cache margin; Migrating the cache data of the flash memory to the storage unit of the flash memory according to the second migration speed.

7. The method according to claim 6, wherein Before the determining the second migration speed according to the cache margin, the method further includes: Comparing the cache margin with a first threshold, if the cache margin is less than or equal to the first threshold, determining the second migration speed; If the cache margin is greater than the first threshold, determining not to perform data migration.

8. The method according to claim 6, characterized in that The determining the second migration speed includes: Obtaining the maximum migration speed of the solid-state drive, where the maximum migration speed corresponds to the recycling speed; Determining the second migration speed according to the maximum migration speed, the cache margin, the first threshold, and the second threshold.

9. The method according to claim 8, wherein The obtaining the maximum migration speed of the solid-state drive includes: Determining the maximum migration speed according to the first write duration, the first recycling duration, and the first migration speed.

10. The method according to claim 1, characterized in that, The method is applied to a solid-state drive, and the solid-state drive includes: a flash memory chip; the flash memory chip includes: a cache part and a storage unit part; The performing the migration operation of cache data includes: migrating the data in the cache part to the storage unit part; The performing the migration operation of cache data according to the cache margin includes: migrating the data in the cache part to the storage unit part according to the cache margin of the cache part.

11. The method according to claim 10, wherein The cache part includes a single-bit storage cell SLC cache; the storage unit part includes at least one of the following: a three-bit storage cell TLC, a four-bit storage cell QLC, and a five-bit storage cell PLC.

12. A data migration device, characterized in that, The device includes: A processing module for obtaining first information of a solid-state drive, where the first information is used to reflect the input / output situation of the solid-state drive; A migration module for performing a first migration operation if it is determined according to the first information that the solid-state drive meets a first condition; and performing a second migration operation if the solid-state drive does not meet the first condition; Wherein, the first migration operation includes: performing a migration operation of cache data; and the second migration operation includes: performing a migration operation of cache data according to the cache margin.

13. The device according to claim 12, characterized in that, The apparatus is applied to a solid-state drive, and the solid-state drive includes: flash memory chips; and the flash memory chips include: a cache part and a storage unit part; Performing the migration operation of cache data includes: migrating the data in the cache part to the storage unit part; Performing the migration operation of cache data according to the cache margin includes: migrating the data in the cache part to the storage unit part according to the cache margin of the cache part; The cache part includes an SLC cache; and the storage unit part includes at least one of the following: TLC, QLC, PLC.

14. An electronic device, characterized in that, Comprising: At least one processor; And a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 11.

15. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • A flow control method and device for data migration bandwidth of a solid state hard disk

    CN109032503A

  • Cold data migration method and device, storage medium and electronic equipment

    CN116301586A

  • Data migration method and device, solid state disk and computer readable storage medium

    CN118349184A

  • Page migration in a 3D stacked hybrid memory

    US20150199126A1

  • Method and device for redundant arrays of independent disks to share write cache

    WO2017059716A1

Cited By

  • SSD hard disk data transmission system and data transmission method

    CN121187503A