WO2021035555A1 - Procédé et appareil de stockage de données pour disque statique à semi-conducteurs et disque statique à semi-conducteurs (ssd) - Google Patents

Procédé et appareil de stockage de données pour disque statique à semi-conducteurs et disque statique à semi-conducteurs (ssd) Download PDF

Info

Publication number
WO2021035555A1
WO2021035555A1 PCT/CN2019/102909 CN2019102909W WO2021035555A1 WO 2021035555 A1 WO2021035555 A1 WO 2021035555A1 CN 2019102909 W CN2019102909 W CN 2019102909W WO 2021035555 A1 WO2021035555 A1 WO 2021035555A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
ssd
storage area
read
stored
Prior art date
Application number
PCT/CN2019/102909
Other languages
English (en)
Chinese (zh)
Inventor
黄恩走
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201980099647.5A priority Critical patent/CN114303123A/zh
Priority to PCT/CN2019/102909 priority patent/WO2021035555A1/fr
Publication of WO2021035555A1 publication Critical patent/WO2021035555A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Definitions

  • This application relates to the storage field, and in particular to a data storage method and device of a solid-state hard disk, and a solid-state hard disk SSD.
  • SSD Solid State Disk
  • the storage unit generally includes multiple flash memory particles such as NAND Flash.
  • Each flash memory particle includes one or more dies, and each die includes multiple physical blocks.
  • the capacity of the block is generally in the hundreds. Between KB and several MB, each block includes multiple pages (pages), and the size of the page is generally a multiple of 4KB (such as 4KB or 16KB).
  • SSD uses Flash Translation Layer (FTL) to evenly distribute data and store data on each NAND Flash. Since the SSD has no mechanical structure and no seek process, the read and write latency of the SSD is as low as microseconds, and the read and write bandwidth is as high as GB/s (Gigabyte/Second).
  • FTL Flash Translation Layer
  • the read and write delay of the storage device has a greater impact on the business performance of a specific application (Application, APP), such as query operations in a relational database management system.
  • Application, APP Application, such as query operations in a relational database management system.
  • Reducing the average read latency of storage devices can greatly improve the business performance of this type of application.
  • the average read latency of SSD is mainly affected by the access latency of the NANDFlash medium itself.
  • a cache module is generally designed inside the SSD to speed up the processing of read commands, thereby reducing the average read latency of the SSD.
  • the SSD device not only includes a control unit and a storage unit, but also includes a cache buffer storage area module.
  • the buffer storage module utilizes the lower latency characteristics of storage media such as Storage Class Memory (SCM) or Dynamic Random Access Memory (DRAM) to reduce the average read latency of the SSD.
  • SCM Storage Class Memory
  • DRAM Dynamic Random Access Memory
  • the SSD using this solution has a high overall cost and high implementation complexity.
  • the effect of the solution in reducing the average read delay is strongly related to the probability of directly obtaining the target data from the buffer memory module.
  • the embodiments of the present application provide a solid-state hard disk storage method and device, and a solid-state hard disk SSD, which can effectively reduce the average read delay of the SSD and improve the service performance of the SSD in delay-sensitive scenarios.
  • an embodiment of the present application provides a data storage method of a solid state drive (SSD).
  • the method may include: receiving data to be stored, and identifying first data in the data to be stored, wherein the aforementioned first data is the same as the target Data matching data, the target data is the data that is read from the SSD with a frequency higher than the preset frequency threshold; from the multiple storage areas of the SSD (this application takes the page unit as an example of the storage area for explanation), select the data with the aforementioned A first storage area matching the read delay of the first data; storing the first data in the aforementioned first storage area.
  • the first data is identified from the received data to be stored (the aforementioned first data may be data that needs to be quickly read from the aforementioned SSD, for example, the frequency of reading from the aforementioned SSD is higher than the preset frequency threshold.
  • the data, the data containing the designated identifier, and the data with higher read frequency in the data set, where the foregoing data set may include data received by the SSD from the Host one or more times) and the foregoing first data is stored To the first storage area matching the read delay, thereby reducing the average read delay in the process of reading the first data, and improving the service processing performance of the device equipped with the SSD.
  • the built-in SSD cache module causes the SSD controller to determine whether the read/write command hits the cache, and requires multiple addressing processes; through the implementation of the embodiments of this application, the production is reduced while meeting certain business requirements.
  • the cost of materials (such as the cost of the SSD cache module), while avoiding secondary addressing and increasing the processing load of the SSD controller; more importantly, based on the characteristics of the SSD storage medium, the data is matched and stored purposefully.
  • the aforementioned target data is data whose frequency is higher than a preset frequency threshold read from the aforementioned SSD within a preset historical time period; the aforementioned identification of the first data in the aforementioned data to be stored includes: Identify part or all of the data that has the same content as the target data in the aforementioned data to be stored as the aforementioned first data.
  • the data to be stored with the same content as the target data in the preset historical time period is filtered (for example, it is judged that the two are the same according to conditions such as consistent reading frequency and consistent data valid bits), so that the first The data is stored in a storage area that matches the expected read delay.
  • the aforementioned target data is data whose frequency is higher than a preset frequency threshold read from the aforementioned SSD within a preset historical time period; the aforementioned identification of the first data in the aforementioned data to be stored includes: Part or all of the data to be stored that is of the same type as the target data is identified as the first data.
  • the data to be stored is screened for data of the same type as the target data in the preset historical time period (for example, the same type may include: some or all of the data in the data to be stored has the same data source as the target data Or similar; or, part or all of the data to be stored and the target data belong to the same link of business processing; or users (including developers) to read some or all of the data in the stored data and the target data Same requirements, etc.), to facilitate subsequent storage of the first data in a storage area matching the expected read delay.
  • the same type may include: some or all of the data in the data to be stored has the same data source as the target data Or similar; or, part or all of the data to be stored and the target data belong to the same link of business processing; or users (including developers) to read some or all of the data in the stored data and the target data Same requirements, etc.
  • the foregoing method further includes: identifying second data in the foregoing data to be stored, where the foregoing second data is data whose frequency of reading from the foregoing SSD is lower than that of the foregoing first data; Among the multiple storage areas, select a second storage area that matches the read delay of the second data, and the read delay of the second storage area is higher than that of the first storage area; store the second data in the second storage area.
  • the second data that meets the characteristics of the specific data and is different from the first data is identified (for example, the reading frequency is lower than the first data), and the foregoing second data is stored in the second data that matches the read delay.
  • the storage area, the classified storage of data effectively stores data based on the characteristics of the storage area, and improves the efficiency of reading the required data.
  • the embodiment of the present application does not specifically limit the second data that meets the specific data characteristics and the aforementioned specific data characteristics.
  • the foregoing method further includes: counting the read frequency of reading data from the foregoing SSD within a preset historical time period; and determining the read frequency of the foregoing SSD that is higher than the foregoing preset frequency threshold.
  • the data is determined as the aforementioned target data.
  • the reading frequency of data in the SSD is counted regularly or irregularly, and the data in the SSD is determined as the target data according to a preset reading frequency threshold.
  • the determined target data is used as one of the identification criteria of the first data in the subsequent data to be stored, wherein the target data and the preset frequency threshold can be adjusted and updated according to actual needs and actual usage.
  • counting the frequency of reading data from the aforementioned SSD within a preset historical time period includes: counting the data stored in each of the multiple storage areas of the aforementioned SSD in the pre-determined period. Set the number of historical readings in the historical time period; according to the number of historical readings, determine the aforementioned reading frequency of the data stored in each of the aforementioned storage areas.
  • by calculating the reading frequency of the data that has been stored in the solid-state hard disk it is beneficial to optimize the storage area configuration of the stored data, and facilitate subsequent adjustments of the data storage area according to the actual data reading situation, and improve the overall performance. The efficiency of data reading is required, thereby improving the business processing performance of the main control device.
  • the aforementioned SSD further includes a buffer storage area; the aforementioned method further includes: buffering the aforementioned first data in the aforementioned buffer storage area.
  • a buffer storage area can be added to store part of the data through the buffer storage area; when the SSD is normally powered on, it is convenient for the main control (such as a processor or Server) can obtain the required data directly from the buffer storage area with probability, and further reduce the average read delay of SSD on the basis of the embodiment of the present application, and is suitable for low cost requirements but high data read efficiency requirements Application scenarios.
  • the aforementioned buffering of the first data in the aforementioned buffer storage area includes: after receiving a write command of the aforementioned first data, storing the aforementioned first data in the aforementioned buffer storage area according to the aforementioned write command.
  • the first data is stored in the buffer storage area according to the received write command, and the data can be accurately stored.
  • the foregoing method further includes: when receiving the read command of the foregoing first data, preferentially reading the foregoing first data from the foregoing buffer storage area.
  • the first data is read from the buffer storage area according to the read command, and the read delay of the first data is further reduced and the processing speed of the device is increased in the case of specific requirements.
  • the aforementioned method further includes: when the data amount of the aforementioned first data is greater than the storage capacity of the aforementioned first storage area, storing part of the aforementioned first data in the aforementioned second storage area; or, When the data amount of the aforementioned second data is greater than the storage capacity of the aforementioned second storage area, storing part of the aforementioned second data in the aforementioned first storage area.
  • data is stored according to the relationship between the amount of data and the storage capacity of the storage area. For example, when the amount of second data is large, part of the data is stored in the first storage area; the data is stored flexibly according to the actual amount of data, and the storage is effectively utilized. The area helps to reduce the average read delay as a whole.
  • an embodiment of the present application provides a data storage method of a solid state hard drive (SSD), and the method may include:
  • the data to be stored is received, and the first data in the data to be stored is identified, where the first data is data containing a designated identifier, and the designated identifier is used to indicate the read delay requirement of the first data; Among the plurality of storage areas, a first storage area matching the read delay of the first data is selected according to the aforementioned designated identifier; the aforementioned first data is stored in the aforementioned first storage area.
  • the first data is identified by a designated identifier (such as a data number, command or field, etc.) from the received data to be stored, and the aforementioned first data is stored in the first storage area matching its read delay, thereby The average read delay generated in the process of reading the foregoing first data is reduced, and the service processing performance of the device equipped with the foregoing SSD is improved.
  • the built-in SSD cache module causes the SSD controller to determine whether the read/write command hits the cache, and requires multiple addressing processes; through the implementation of the embodiments of this application, the production is reduced while meeting certain business requirements.
  • the foregoing method further includes: identifying second data in the foregoing data to be stored, where the foregoing second data is data whose frequency of reading from the foregoing SSD is lower than that of the foregoing first data; Among the multiple storage areas, select a second storage area that matches the read delay of the second data, and the read delay of the second storage area is higher than that of the first storage area; store the second data in the second storage area.
  • the second data that meets the characteristics of the specific data and is different from the first data is identified (for example, the reading frequency is lower than the first data), and the foregoing second data is stored in the second data that matches the read delay.
  • the storage area, the classified storage of data effectively stores data based on the characteristics of the storage area, and improves the efficiency of reading the required data.
  • the aforementioned SSD further includes a buffer storage area; the aforementioned method further includes: buffering the aforementioned first data in the aforementioned buffer storage area.
  • a buffer storage area can be added to store part of the data through the buffer storage area; when the SSD is normally powered on, it is convenient for the main control to be able to probabilistically Obtaining the required data directly from the buffer storage area further reduces the average read delay of the SSD on the basis of the embodiments of the present application, and is suitable for application scenarios that require low cost but high data read efficiency.
  • the aforementioned buffering of the aforementioned first data in the aforementioned buffer storage area includes: after receiving a write command of the aforementioned first data, storing the aforementioned first data in the aforementioned buffer storage area according to the aforementioned write command .
  • the first data is stored in the buffer storage area according to the received write command, and the data can be accurately stored.
  • the foregoing method further includes: when receiving the read command of the foregoing first data, preferentially reading the foregoing first data from the foregoing buffer storage area.
  • the first data is read from the buffer storage area according to the read command, and the average read delay of the first data is further reduced and the processing speed of the device is increased in the case of a specific demand.
  • the aforementioned method further includes: when the data amount of the aforementioned first data is greater than the storage capacity of the aforementioned first storage area, storing part of the aforementioned first data in the aforementioned second storage area; or, When the data amount of the aforementioned second data is greater than the storage capacity of the aforementioned second storage area, storing part of the aforementioned second data in the aforementioned first storage area.
  • data is stored according to the relationship between the amount of data and the storage capacity of the storage area. For example, when the amount of second data is large, part of the data is stored in the first storage area; data is stored flexibly according to the actual amount of data, and the storage is effectively utilized. The area helps to reduce the average read latency of the SSD as a whole.
  • the embodiments of the present application provide a solid state drive SSD.
  • the aforementioned SSD may include a controller and a memory connected to the aforementioned controller; wherein, the aforementioned memory may include a plurality of different types of storage areas, and each type of storage area has The read delay is different; the aforementioned controller is used to: receive the data to be stored, and identify the first data in the aforementioned data to be stored, wherein the aforementioned first data is data that matches the target data, and the aforementioned target data is from the aforementioned SSD Reading data with a frequency higher than a preset frequency threshold; selecting a first storage area matching the read delay of the first data from the plurality of storage areas; storing the first data in the first storage area; The first storage area is used to store the aforementioned first data.
  • the aforementioned controller is specifically configured to: identify part or all of the aforementioned data to be stored that has the same content as the aforementioned target data as the aforementioned first data.
  • the aforementioned controller is specifically configured to: identify part or all of the aforementioned data to be stored that is of the same type as the aforementioned target data as the aforementioned first data.
  • the aforementioned controller is further configured to: identify second data in the aforementioned data to be stored, and the aforementioned second data is data whose frequency of reading from the aforementioned SSD is lower than that of the aforementioned first data; Among the foregoing multiple storage areas, select a second storage area that matches the read delay of the second data, and the read delay of the second storage area is higher than that of the first storage area; store the second data to the second Storage area; the aforementioned second storage area is used to store the aforementioned second data.
  • the aforementioned controller is also used to: count the read frequency of reading data from the aforementioned SSD within a preset historical time period; and set the aforementioned read frequency from the SSD to be higher than the aforementioned preset
  • the frequency threshold data is determined as the aforementioned target data.
  • the aforementioned controller is specifically configured to: count the historical reading times of data stored in each of the aforementioned multiple storage areas within a preset historical time period; according to the aforementioned historical reading times , Determine the aforementioned read frequency of the data stored in each of the aforementioned storage areas.
  • the aforementioned SSD further includes a buffer storage area; the aforementioned buffer storage area is connected to the aforementioned controller; the aforementioned controller is further used for: buffering the aforementioned first data to the aforementioned buffer storage area; the aforementioned buffer storage Area, used to store the aforementioned first data.
  • the aforementioned controller is specifically configured to: after receiving a write command of the aforementioned first data, store the aforementioned first data in the aforementioned buffer storage area according to the aforementioned write command.
  • the aforementioned controller is further configured to: when receiving the aforementioned first data read command, preferentially read the aforementioned first data from the aforementioned buffer storage area.
  • the aforementioned controller is further configured to: when the data amount of the aforementioned first data is greater than the storage capacity of the aforementioned first storage area, store part of the aforementioned first data in the aforementioned second storage area Or, when the data amount of the aforementioned second data is greater than the storage capacity of the aforementioned second storage area, store part of the aforementioned second data in the aforementioned first storage area.
  • an embodiment of the present application provides a solid state drive SSD, which may include a controller and a memory connected to the aforementioned controller; wherein, the aforementioned memory includes a plurality of different types of storage areas, and the read delay of each type of storage area Different; the aforementioned controller is used to: receive the data to be stored, and identify the first data in the aforementioned data to be stored, wherein the aforementioned first data is data containing a designated identifier, and the aforementioned designated identifier is used to indicate the reading of the aforementioned first data Obtain the latency requirement; from the foregoing multiple storage areas, select the first storage area matching the foregoing first data read latency according to the foregoing designated identifier; store the foregoing first data in the foregoing first storage area; the foregoing first storage The area is used to store the aforementioned first data.
  • the aforementioned controller is further configured to: identify second data in the aforementioned data to be stored, and the aforementioned second data is data whose frequency of reading from the aforementioned SSD is lower than that of the aforementioned first data; Among the foregoing multiple storage areas, select a second storage area that matches the read delay of the second data, and the read delay of the second storage area is higher than that of the first storage area; store the second data to the second Storage area; the aforementioned second storage area is used to store the aforementioned second data.
  • the aforementioned SSD further includes a buffer storage area; the aforementioned buffer storage area is connected to the aforementioned controller; the aforementioned controller is further used for: buffering the aforementioned first data to the aforementioned buffer storage area; the aforementioned buffer storage Area, used to store the aforementioned first data.
  • the aforementioned controller is further configured to: when receiving the aforementioned first data read command, preferentially read the aforementioned first data from the aforementioned buffer storage area.
  • an embodiment of the present application provides a data storage device for a solid state drive (SSD).
  • the device may include: a first receiving unit for receiving data to be stored; and a first identifying unit for identifying the aforementioned data to be stored The first data, wherein, the first data is data that matches the target data, and the target data is data that is read from the SSD with a frequency higher than a preset frequency threshold; the first selection unit is used to obtain data from the SSD Among the multiple storage areas, the first storage area matching the read delay of the first data is selected; the first storage unit is used to store the first data in the first storage area.
  • the aforementioned target data is data whose frequency is higher than a preset frequency threshold read from the aforementioned SSD within a preset historical time period; the aforementioned first identification unit is specifically used to: Part or all of the data that has the same content as the aforementioned target data is identified as the aforementioned first data.
  • the aforementioned target data is data whose frequency is higher than a preset frequency threshold read from the aforementioned SSD within a preset historical time period; the aforementioned first identification unit is specifically used to: Part or all of the data with the same type as the aforementioned target data is identified as the aforementioned first data.
  • the aforementioned device further includes a first storage area classification unit for identifying the second data in the aforementioned data to be stored, and the aforementioned second data is read from the aforementioned SSD with a lower frequency than the aforementioned first data.
  • the second data is stored in the aforementioned second storage area.
  • the foregoing device further includes a target data determining unit, configured to: count the read frequency of reading data from the foregoing SSD within a preset historical time period; and set the read frequency of the foregoing SSD to be high
  • the data at the aforementioned preset frequency threshold is determined as the aforementioned target data.
  • the aforementioned target data determining unit is specifically configured to: count the historical reading times of data stored in each of the multiple storage areas of the SSD; and determine the aforementioned historical reading times according to the aforementioned historical reading times. The aforementioned reading frequency of the data stored in each storage area.
  • the aforementioned SSD further includes a buffer storage area; the aforementioned device further includes a first cache unit for: buffering the aforementioned first data in the aforementioned buffer storage area.
  • the foregoing first buffer unit is specifically configured to store the foregoing first data in the foregoing buffer storage area according to the foregoing write command after receiving a write command of the foregoing first data.
  • the aforementioned device further includes a first reading unit, configured to: when receiving the aforementioned first data read command, preferentially read the aforementioned first data from the aforementioned buffer storage area.
  • the aforementioned device further includes a first decision-making unit, configured to store part of the aforementioned first data in the aforementioned first data when the data amount of the aforementioned first data is greater than the storage capacity of the aforementioned first storage area.
  • an embodiment of the present application provides a data storage device for a solid-state hard drive (SSD).
  • the device may include: a second receiving unit for receiving data to be stored; and a second identifying unit for identifying the aforementioned data to be stored
  • the aforementioned first data is data containing a designated identifier, and the aforementioned designated identifier is used to indicate the read delay requirement of the aforementioned first data;
  • the second selection unit is used to obtain data from multiple storage areas of the aforementioned SSD
  • the first storage area that matches the read delay of the first data is selected according to the aforementioned designated identifier; the second storage unit is used to store the aforementioned first data in the aforementioned first storage area.
  • the aforementioned device further includes a second storage area classification unit for identifying the second data in the aforementioned data to be stored, and the aforementioned second data is read from the aforementioned SSD with a lower frequency than the aforementioned first data.
  • the second data is stored in the aforementioned second storage area.
  • the aforementioned SSD further includes a buffer storage area; the aforementioned device further includes a second cache unit for: buffering the aforementioned first data in the aforementioned buffer storage area.
  • the foregoing second buffer unit is specifically configured to store the foregoing first data in the foregoing buffer storage area according to the foregoing write command after receiving the foregoing write command of the first data.
  • the aforementioned device further includes a second reading unit, configured to: when receiving the aforementioned first data read command, preferentially read the aforementioned first data from the aforementioned buffer storage area.
  • the aforementioned device further includes a second decision-making unit, configured to store part of the aforementioned first data in the aforementioned first storage area when the amount of the aforementioned first data is greater than the storage capacity of the aforementioned first storage area.
  • an embodiment of the present application provides a chipset that includes at least one processor for supporting the realization of the functions involved in the first or second aspect, for example, receiving data to be stored and identifying the aforementioned The first data in the data to be stored.
  • the aforementioned chipset further includes at least one first memory and at least one second memory; wherein, the aforementioned at least one first memory and the aforementioned at least one processor are interconnected by wires, and the aforementioned first memory stores Instruction; when the foregoing instruction is executed by the foregoing processor, the foregoing method of any one of the foregoing first aspect or the foregoing second aspect is implemented; the foregoing at least one second memory and the foregoing at least one processor are interconnected by wires, and the foregoing second memory is Store the data to be stored in any one of the foregoing methods in the first aspect or the second aspect.
  • the chipset can be composed of chips, or it can include chips and other discrete devices.
  • an embodiment of the present application provides a computer-readable storage medium in which a computer program is stored.
  • the computer program is executed by a processor, any one of the first aspect or the second aspect is implemented. Possible implementations are described in the method.
  • an embodiment of the present application provides a computer program, the computer program includes instructions, when the computer program is executed by a computer, the computer can execute the data storage of the SSD of any one of the first aspect or the second aspect. The flow of the method.
  • FIG. 1 is a schematic diagram of a data storage architecture of a solid-state hard drive (SSD) provided by an embodiment of the present application;
  • SSD solid-state hard drive
  • FIG. 2 is a schematic diagram of a logical module of an SSD provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of an SSD data exchange channel provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a connection between SSD and Flash Die according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a data storage process of an SSD provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an SSD data storage method provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another SSD data storage process provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another SSD data storage process provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an SSD average read delay analysis provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another SSD data storage method provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of yet another SSD data storage method provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of an SSD data storage device provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of another SSD data storage device provided by an embodiment of the present application.
  • component may be, but is not limited to, a process, an object, an executable file, an execution thread, a program, etc. running on the processor.
  • application running on the computing device and the computing device can be components.
  • One or more components may reside in a process or thread of execution, and the components may be located on one computing device or distributed among two or more computing devices.
  • these components can be executed from various computer readable media having various data structures stored thereon.
  • Solid State Drive is a hard drive made of an array of solid-state electronic storage chips.
  • the SSD is composed of a control unit and a storage unit (Flash chip, DRAM chip). Its chip has a wide operating temperature range and has a wide range of applications.
  • flash memory Flash chip
  • DRAM dynamic random access memory
  • the solid-state drive involved in this application is a flash-based solid-state drive, that is, an SSD that uses a Flash chip as a storage medium. Its appearance can be made into a variety of shapes, such as: notebook hard drives, micro hard drives, memory cards, U disks and other styles.
  • NAND Flash is a non-destructive storage technology. NAND Flash memory cells are divided into cell, die, block, page, cell, etc. A cell is the smallest memory unit. Multiple cells form a page (page); multiple pages form a block (block); multiple blocks form a die.
  • NAND Flash can save data after power off, it also has the following hardware features: After a memory cell is programmed, the data represented can be changed from logic 1 to logic 0, but this unit cannot be written to. Reverting to logic 1 requires erasing (erase) before reverting to logic 1. Generally, the smallest unit of erase in a flash memory is called a block. The operation time of erasing is generally longer than the operation time of reading and writing.
  • SSD flash memory particles are mainly divided into single-level storage cells (Single-Level Cell, SLC), dual-level storage cells (Multi-Level Cell, MLC), three-level storage cells (Trinary-Level Cell, TLC) and Quadruple-Level Cells (Quadruple-Level Cell, QLC), and even multi-layer storage cells may appear; among them, TLC includes 3D-TLC and 2D-TLC; 3D-TLC can be subdivided into 32-layer 3D-TLC, 64-layer 3D-TLC and 96-layer 3D-TLC.
  • the solutions of the various embodiments of the present application are not only applicable to TLC of 2D structure, but also applicable to TLC of 3D structure; the scope of application of the solutions of the present application is not limited.
  • Logical block address (Logical Block Address, LBA) is a general mechanism for describing the location of data on a storage device, and is generally used in auxiliary memory devices such as hard disks.
  • LBA can refer to the address of a certain data block or the data block pointed to by a certain address.
  • LBA is equal to the house address we usually use (for example: No. 26, Zhongshan 4th Road, Guangzhou City, Guangdong province, People's Republic of China).
  • the so-called logical block on a computer is usually 512 or 1024 bits.
  • the standard CD in ISO-9660 format uses 2048 bits as a logical block size.
  • PBA Physical Block Address
  • LBA the latitude and longitude used for GPS positioning.
  • LBA the latitude and longitude used for GPS positioning.
  • LBA the latitude and longitude used for GPS positioning.
  • LBA the latitude and longitude used for GPS positioning.
  • the latitude and longitude of the aforementioned house address are: east longitude: 113°16′40.0621′′, north latitude: 23°07′37.6129′′.
  • LBA Physical Block Address
  • SSD due to the characteristics of NAND flash memory, the relationship between LBA and PBA is no longer fixed. Therefore, SSD needs FTL for address conversion to match the existing file system.
  • the SSD controller uses the mapping table of LBA and PBA to manage the flash memory.
  • the controller When there is data that needs to be updated to be written, the controller will write the new data into the blank flash memory space (in the erased state), and then update the mapping table data to point the LBA to the new PBA.
  • the original PBA becomes invalid data. If the PBA wants to write data again, it needs to be erased first.
  • Flash Translation Layer is a mapping algorithm from LBA to PBA.
  • the unit of reading and writing of flash memory is a page (the size of a page is generally a multiple of 4KB), but the operating system reads and writes data according to the sector size of the HDD (512 bytes (Byte)); in addition, flash erasing is done by block Units and blocks cannot store data correctly without being erased, causing the common file system of the operating system to be unable to manage SSDs.
  • SSD uses software to virtualize the operation of flash memory into independent sector operations of the disk, then FTL must be used.
  • FTL exists between the file system and the physical medium (flash memory).
  • the operating system only needs to operate the LBA, and FTL is responsible for all the conversion from LBA to PBA. Specifically, when the file system sends an instruction to write or update a specific logical page, FTL actually writes the data to a different free physical page and updates the mapping table (the associated data of LBA and PBA), and The "old data" contained on this page is marked as "invalid” (that is, the updated data has been written into the new PBA, and the data at the old address is naturally invalid).
  • Map Table used when reading a user page (Host Page), SSD first finds the physical page (Physical Page) corresponding to the Host Page, and then accesses Flash to read the corresponding Host data .
  • Host Page is the basic unit for Host to access SSD; Host accesses SSD through LBA, and each LBA represents a Sector (usually 512B in size), and the operating system generally accesses SSD in 4K units.
  • Flash Page is the basic unit to access Flash, among which Flash Page is called Physical Page.
  • the SSD master Each time the Host writes a Host Page, the SSD master will find a Physical Page to write the Host data, and such a map is also recorded inside the SSD. With this mapping relationship, the next time the Host needs to read a Host Page, the SSD knows where to read the data from the Flash.
  • the buffer or buffer storage area, is a part of the memory space, that is, a certain storage space is reserved in the memory space for buffering input or output data.
  • the buffer is divided into input buffer and output buffer according to whether it corresponds to an input device or an output device.
  • the function of the buffer zone can include the following 2 points: 1. Data can be directly sent to the buffer zone, and high-speed devices no longer need to wait for low-speed devices, which improves the efficiency of the device. For example: using SSD to store data, part of the data can be directly sent to the buffer of the SSD according to the write command. 2. The number of reads and writes of storage media can be reduced. Frequent small block write operations will greatly aggravate the life loss of the SSD.
  • the buffer or data buffer mentioned in the various embodiments of the present application refers to a buffer storage area.
  • Host interface, or data bus can include SATA, SAS, PCIe, etc.
  • Serial ATA Serial Advanced Technology Attachment, Serial ATA
  • Serial ATA is a computer bus that is responsible for data transmission between the motherboard and mass storage devices (such as hard disks and optical drives), and is mainly used in personal computers;
  • the two cables of serial SCSI Serial Attached SCSI, SAS
  • SAS Serial Attached SCSI
  • SAS Serial Attached SCSI
  • SAS Serial Attached SCSI
  • Serial Attached SCSI is a serial-attached SCSI interface, that is, a serial-attached small computer system interface; the same as SATA hard disks, serial technology is used to obtain higher transmission speeds, and the internal space is improved by shortening the connection line Wait.
  • PCI Express bus (ie PCIe) is a high-speed serial replacement of the older PCI/PCI-X bus; PCI Express is based on a point-to-point topology, with a separate serial link connecting each device to the root system (host). Due to its shared bus topology, the PCI bus in a single direction can be arbitrated (in the case of multiple hosts), and limited to one host at a time; in addition, the PCI Express bus link supports full duplex between any two endpoints There are no inherent restrictions on industrial communications, and concurrent access across multiple endpoints at the same time.
  • Garbage collection mechanism The basic principle of this mechanism is to centrally move the valid data (non-garbage data) in several blocks in the SSD to a new block, and then erase these blocks to make them usable block. Therefore, a new SSD that has just been bought has a very fast writing speed, because it can always find a usable block for writing at the beginning. However, as the use time or number of uses of the SSD increases, its writing speed will slow down. The reason is that after the SSD is full, when new data needs to be written, it is often necessary to do the above-mentioned garbage collection: move the valid data on several blocks to a block, then erase the original block, and then put the Host data Writing, resulting in more time-consuming than the initial search for available blocks to write.
  • WL Wear Leveling
  • WL includes two algorithms: dynamic WL algorithm and static WL algorithm. Whether WL is used or not, and which WL algorithm is used, has a great impact on the lifespan of the SSD. Flash has a certain life span, which is measured by the P/E number (Program/Erase Count). If the SSD concentrates on erasing and writing certain blocks, these blocks will soon run out of life. For example, if some data needs to be updated frequently, then the block where the data is located needs to be frequently erased and written, and the life of these blocks may be exhausted quickly.
  • P/E number Program/Erase Count
  • I/O interface can be the link between the controlled object and the controlled object for information exchange.
  • the host computer exchanges data with external devices through the I/O interface.
  • most of the specific programs involved in the I/O interface are programmable, that is, their working mode can be controlled by the program.
  • FIG. 1 is a schematic diagram of a data storage architecture of a solid state drive SSD provided by an embodiment of the present application.
  • the architecture shown in FIG. 1 mainly takes the solid state drive SSD as the main body and is described from the perspective of data writing.
  • the data storage method of the solid-state hard disk proposed in this application can be applied to the system architecture.
  • the system architecture includes a main control 10 (Host, the figure includes a processor 101 as an example for illustration) and a solid state drive (SSD) 20; among them, Figure 1 takes the controller 201 and the memory 202 integrated inside the solid state drive 20 as
  • the solid-state hard disk 20 may include a controller 201 and a memory 202; optionally, the controller 201 may be a processing device independent of the solid-state hard disk 20, and is connected to the memory 202 in the solid-state hard disk 20 to perform data storage and data storage. Operations such as reading and data modification; and the memory 202 may also be an independent storage device, which will not be repeated here. As shown in FIG.
  • the memory 202 may include multiple Flash storage areas, such as Flash0, Flash1,..., FlashN, etc., where N is an integer greater than zero.
  • the multiple Flash storage areas may include multiple storage areas with different read delays, and the specific read delays of the storage areas are not limited here.
  • the processor 101 when it processes a service, it sends a write command of the target data to the SSD 20, and the write command instructs the SSD 20 to select a target storage area suitable for storing the target data according to preset rules, and store the data to be stored in the target storage area .
  • the operation of matching and storing the target data in the target storage area and storing the target data may be performed simultaneously or in a reasonable order.
  • the write command may include instructing the SSD 20 to store data of a certain length or amount of data in a specific storage area (that is, a target storage area).
  • the processor 101 sends the write command a of the data A to the SSD 20, and the SSD 20 receives the write command a and the data A through the data bus.
  • the controller 201 of the SSD 20 analyzes the write command a, and identifies whether the data A belongs to the type of the first data (that is, it conforms to the characteristic that is frequently read or is identified as the frequently read data). After confirming that the data A is the first data, a storage area with a low read latency is selected from a plurality of storage areas in the memory 202 to store the data A.
  • the controller 201 of the SSD 20 can automatically re-categorize and identify the data according to the reading frequency of the data to be stored during the storage area change process, and store the data of different reading frequency categories to the data reading delay.
  • the matching storage area for example, the higher the historical reading frequency of the data to be stored is, the data to be stored is stored in the storage area with the lower the reading delay.
  • the solid state drive can be configured in different devices and correspond to different main control forms in different devices.
  • the embodiment of the present application does not limit the main control form, such as a server or a personal computer.
  • the solid state drive 20 interacts with the central processing unit CPU of the computer through a data bus.
  • the computer sends writes to the solid state drive (SSD) 20 through the data bus.
  • SSD solid state drive
  • the server When the aforementioned solid state drive is configured in a server (that is, the main controller 10 is a server, the server is the main server of the entire server network, which handles all transactions in the server network), the server is performed through Wi-Fi, mobile network, or wired connection Communicate and process data. For example, the server sends a write command to the solid state drive (SSD) 20 through the data bus to write specific data to the SSD 20.
  • SSD solid state drive
  • Other structures and functions are similar to the aforementioned electronic devices, and the specific data storage scenario after the SSD is configured also applies to the application scenario illustrated in the embodiment of the present application, which will not be repeated here.
  • an embodiment of the present application also provides a diagram of an SSD data storage device involving the interaction between a Host and an SSD, which can be applied to the system architecture shown in FIG.
  • a schematic diagram of the logic module of the SSD provided by the application embodiment; as shown in FIG. 2, the built-in logic module of the SSD in the embodiment of the application may include: Interface module (that is, interface 203, which also includes the aforementioned data bus), controller The module (that is, the SSD controller 201, which is also the aforementioned controller 201) and the NAND Flash Array module (that is, the flash memory array 205, which is also the aforementioned memory 202). among them,
  • the Interface module 203 is used to connect to Host 10 and undertake the functions of reading and writing command reception and data transmission; this embodiment of the application does not limit the Host, the processor contained in the Host, and other content in the Host, so it is not described in detail in Figure 2 Logo.
  • the controller module 201 is the control unit (ie controller) of the SSD; it can be understood that the controller (or controller unit) is the brain of the SSD device, responsible for the processing of SSD read and write commands, data distribution management, and NAND Flash management And so on.
  • a read attribute identification function module 2011 is designed in the controller module, and the function module is used to identify the attributes of the data to be stored (which can be used to determine and identify the first data); for example, It can be judged whether the data is read attribute data rd_attr_data (that is, the first data is identified from the data to be stored), and it can be judged whether the data is common data comm_data (that is, the second data is identified from the data to be stored).
  • LP and UP (the read latency of LP and UP in the embodiment of this application is lower than the read latency of MP) store read attribute data, and MP stores ordinary data; it is understandable that as shown in Figure 2
  • the shown read attribute data and common data are exemplary descriptions.
  • the NAND Flash Array module 202 may include the NAND Flash media particle group of the SSD, which is a physical carrier for the final storage of data.
  • the module may include the illustrated lower memory page (LP) 2021, middle page (MP) 2022, and upper memory page (UP) 2023.
  • the aforementioned page unit may correspond to FIG. 1
  • the specific correspondence between Flash0-FlashN shown in combination with actual considerations is not limited here; the embodiment of the present application does not limit the number of LP2021, MP2022, and UP2023. It is understandable that a typical SSD device may include multiple NAND Flash particles; the FTL and other related modules or units related to the SSD, please refer to the specific description of the related embodiments below.
  • the embodiment of the present application does not limit the connection relationship between the interface, the controller, and the flash memory array shown in the figure. It is understandable that the embodiments of the present application do not limit the Chinese translation names corresponding to LP, MP, and UP respectively, and the things referred to by the English names shall prevail.
  • SSD20 can include SSD controller 201, memory (or Flash storage array) 202, and Host interface (such as SATA interface).
  • SATA interface is not described in detail in Figure 3, please refer to the subsequent implementation.
  • the SSD controller 201 operates multiple Flash particles in parallel through a number of channels.
  • Figure 3 is a schematic diagram of an SSD data exchange channel provided by an embodiment of the present application. The two-way transmission of data or information shown in Figure 3 is described with SSD as the main body. Related illustrations and descriptions will not be introduced in detail; as shown in Figure 3, the SATA interface is connected to the SSD and the Host, and the Flash channel is connected to the SSD controller 201 and the memory 202 (including Flash Die) as an example.
  • the SSD controller 201 and multiple Flash particles There are several channels between each channel, and a flash memory particle is mounted on each channel. Taking 8 channels as an example, the controller connects 8 FlashDie through 8 channels; the Flash channel (including Flash channel 1, Flash channel 2 and Flash channel M) and FlashDie (including FlashDie1, FlashDie2 and FlashDieM) in Figure 3 are examples sexual description.
  • the SSD may also include on-board DRAM, and the on-board DRAM may be connected to the controller 201 for storing a mapping table, so as to save the space of the SSD for storing data.
  • the on-board DRAM may be connected to the controller 201 for storing a mapping table, so as to save the space of the SSD for storing data.
  • the Host writes a Host Page
  • a new mapping relationship is generated, and the new mapping relationship is added (written for the first time) or changed (written over) Map Table.
  • Map Table Map Table
  • the SSD based on Sandforce's main control does not support onboard DRAM. When it works, most of the mapping is stored in Flash, and some of it is stored in on-chip RAM.
  • the Host When the Host needs to read a piece of data, for the SSD with onboard DRAM, it only needs to look up the mapping table in the DRAM, obtain the physical address and then access the Flash to obtain the Host data. During this period, you only need to access Flash once; for Sandforce SSD, it first checks whether the mapping relationship corresponding to the Host Page is in RAM, if the mapping relationship exists in RAM, it reads Flash directly according to the mapping relationship; if the mapping relationship is If it is not in RAM, then it first needs to read the mapping relationship from Flash, and then read the Host data according to this mapping relationship; this means that compared to SSD with DRAM, it needs to read the Flash twice to get the Host The data is read out.
  • mapping relationship Cache hit the mapping relationship is on the on-chip RAM
  • the probability of the mapping relationship Cache hit is very small, so for it, basically every read needs to access the Flash twice, so it is based on the Sandforce master control
  • the SSD random read performance is not ideal.
  • FIG. 4 is a schematic diagram of the connection between an SSD and Flash Die provided by an embodiment of the present application; for the convenience of explanation, FIG. 4 only exemplarily shows a block in each Die, and each small block Represents a page (assuming the size is 4KB).
  • each of the four blocks corresponding to Channel 0-3 has 4KB of data written, and a total of 16KB of data has been written.
  • the blank area means that no data is written.
  • the SSD controller 201 will select other blocks to continue writing in the same way .
  • SSDs generally generate new available blocks through the garbage collection mechanism.
  • the SSD also uses a wear balance mechanism to ensure that the blocks in the SSD memory are used in a balanced manner, extending the service life of the SSD. It is understandable that there will still be reserved space in the SSD, which is not used to store data written to the user (such as the first data, the second data, etc.). This part of the space can not only be used for garbage collection, but also some system data inside the SSD needs to reserve space for storage, such as the aforementioned Map Table, such as SSD firmware, and other SSD system management data.
  • FIG. 5 is a schematic diagram of a data storage process of an SSD provided by an embodiment of the present application; as shown in FIG. 5,
  • the working steps of SSD can include the description of the following steps:
  • the SSD receives the write command issued by the Host.
  • the SSD ready may include powering on the SSD, initializing the SSD, and so on.
  • the SSD receives the write command, analyzes the write command through the controller, and recognizes the attribute of the data to be stored carried (or instructed) by the write command (the write command is generally used to store target data).
  • the predictable data attributes may include: read, frequent update, and rarely update, etc.
  • the embodiment of the present application refers to the aforementioned method The detailed description has already been made in the embodiment part, and will not be repeated here.
  • the SSD stores the data in a matching storage area according to the attributes of the data to be stored obtained by the judgment. Specifically, if it is the data of the read attribute (that is, Y as shown in the figure), try to store the data in the page unit with low read latency; if it is not the data of the read attribute (that is, the N in the figure), try to store the data as much as possible Stored in the page unit with high read latency.
  • the process can be ended or the storage result can be fed back to the SSD control, and further, the storage result can also be fed back to the Host.
  • the read attribute data (that is, the first data) can also be stored in the page unit with a high read delay, and ordinary data other than the first data or Data with low read delay requirements can also be selectively stored in page units with low read delay according to actual conditions.
  • the host subsequently reads the read attribute data from the SSD, the completion time of the read command will be very low.
  • adopting the solutions of the embodiments of this application can effectively reduce the time for APP to query data.
  • FIG. 6 is a schematic diagram of an SSD data storage method provided by an embodiment of the present application.
  • the data storage method of the solid state hard disk is applied to the data storage system of the solid state hard disk (including the above system architecture).
  • the data storage system of the solid-state hard disk may include a main controller (such as a processor of a server or a computer) and a solid-state hard disk SSD, where the SSD may include a controller and a memory.
  • the following will describe from a single side of the controller in the solid state hard disk with reference to FIG. 6.
  • the method may include the following steps S601 to S603.
  • Step S601 Receive data to be stored, and identify the first data in the data to be stored.
  • the controller (or SSD controller) 201 receives the data to be stored from a device (such as a processor) connected to the solid state hard disk 20 through the data bus of the solid state hard disk. Then, according to the data characteristics of the first data, the first data is identified from the data to be stored. Among them, the data characteristics may include a reading frequency higher than a preset frequency threshold, including a designated identifier and a reading frequency ranking higher in the data set, etc. The embodiment of the present application does not limit the specific data characteristics.
  • the aforementioned target data is data whose frequency is higher than a preset frequency threshold read from the aforementioned SSD within a preset historical time period;
  • the aforementioned identification of the first data in the aforementioned data to be stored includes: Identify part or all of the data that has the same content as the target data in the aforementioned data to be stored as the aforementioned first data. For example, the two are judged to be the same based on unique characteristics such as the same reading frequency and the same valid data bits.
  • the aforementioned target data is data whose frequency is higher than a preset frequency threshold read from the aforementioned SSD within a preset historical time period;
  • the aforementioned identification of the first data in the aforementioned data to be stored includes: Part or all of the data to be stored that is of the same type as the target data is identified as the first data.
  • the case of the same type may include: some or all of the data to be stored and the target data have the same or similar data source; or, some or all of the data to be stored and the target data belong to the same link of business processing needs Data; or users (including developers) have the same read requirements for some or all of the data to be stored and the target data, etc.
  • part of the data in the file (such as several GB of file data) can be stored in the SSD first.
  • the SSD controller judges the part of the data (such as hundreds of megabytes) according to certain identification rules (such as comparing the reading frequency of the data with a preset frequency threshold).
  • the data is the first data (that is, the high-frequency read data).
  • the SSD controller not only recognizes the part as the first data, but also predicts that all the data of the file to which the part of the data belongs is likely to be the first data; when the SSD receives a write command for other data in the file According to the aforementioned result of the pre-judgment, the SSD first recognizes the data belonging to the file as the first data, and stores it in the first storage area (that is, the storage area with low read latency).
  • the SSD controller determines the data to be stored
  • the indicated storage area of is consistent with the aforementioned certain storage area, and some or all of the aforementioned data to be stored is identified as the first data.
  • the historical frequency of the target data type For example, data a belongs to type A data, and type A data has historical frequency in the SSD. How to store data a can refer to the frequency of type A data.
  • the data type of data a (which can be understood as data belonging to type A) is often read by the master (in this case, you can analyze the reading situation of data a through the stored history reading records to determine whether data A is often read Take), then the controller will judge the data a as the first data.
  • the matching with the target data fails, resulting in no historical frequency to refer to and subsequent storage operations, then you can store it first and then subsequently change its storage area according to the data frequency. For example, store some or all of the data to be stored that cannot be immediately identified (maybe because it does not match the target data or cannot be identified based on the judgment conditions pre-stored in SSD, etc.) in a non-first storage area; calculate some or all of the data The frequency read from the SSD in the preset historical time period; when the read frequency is higher than the preset frequency threshold, the part or all of the data is identified as the first data. After the first data is identified, it is stored in the first storage area, the data in the original storage area is erased, and the data mapping relationship is re-established in the mapping table.
  • data B can be stored randomly, and then according to the following period of time (this time period can be autonomous Select or automatically select according to certain rules) to calculate the reading frequency of data B; then match the appropriate storage area (such as page unit or page) according to the reading frequency of data B; page or page in the embodiment of this application
  • the unit refers to the same), which reduces the average read delay for subsequent reading of data B in the SSD.
  • the data containing the first data feature can be read attribute data.
  • the so-called read attribute data can refer to data that has a greater impact on business performance by the average delay of reading the data when the processor is running (such as when running an APP).
  • the characteristics of the class data are that it is frequently read, multiple read requests form a business transaction (specifically, the SSD memory needs to be read multiple times to process a business transaction) and so on.
  • the predictable attributes can include: read, frequently updated, rarely updated, and so on. Reading is the operation of reading data from SSD. Reading can include reading of key data and reading of frequent data.
  • the reading of key data generally requires high read latency; for example, in business processing In the process, for the key data involved, it is necessary to quickly obtain these key data, and it is expected that the lower the read delay, the better.
  • Frequent data reading generally refers to frequently reading the required data, and the reading frequency is high, but it may not require a low read delay for a single reading.
  • the update is an operation to write (or store data) to the SSD, and the update can only be written but not read or the number of reads is too small. Frequent updates correspond to infrequent updates, which are distinguished based on the frequency of writing data.
  • the SSD controller 201 receives the data to be stored from the device (such as the processor 101) connected to the solid state hard disk through the interface 203 of the solid state hard disk. Then, through the read attribute recognition function module 2011, the first data is recognized from the data to be stored.
  • the first data may be data whose reading frequency is higher than a preset frequency threshold from the SSD, or the first data may be data including a designated identifier.
  • the first data may specifically be data with a frequency higher than a preset frequency threshold that is read from the SSD within a preset historical time period, where the preset historical time period may include the time period before the data to be stored is received.
  • a fixed frequency threshold is preset according to the actual application scenario; then, in the process of storing data, the preset frequency threshold is used as a standard, and data greater than the preset frequency threshold is identified as the first data.
  • the first data may be data with a higher reading frequency in the received data set (the data set may include data received by the SSD from the Host one or more times) from the SSD (such as the data set in the data set).
  • the data is sorted according to the reading frequency of the data, and the data of the first three types of reading frequency can be selected as the first data).
  • the SSD 20 may include a controller 201 and a memory (that is, a flash memory array 202);
  • the SSD 20 in the example can also include an interface (Interface, the aforementioned data bus, or Interface module) 203, a controller 201 (i.e. SSD controller, or controller module), and a flash memory array 202 (i.e., the aforementioned memory, or NAND Flash).
  • Array module The controller 201 may include a flash memory conversion layer (FTL) 2012 and a read attribute recognition function module 2011.
  • FTL flash memory conversion layer
  • the interface module 203 of the SSD20 can provide an I/O interface (ie interface 203) for receiving data; this module can be independent of the controller and the memory, or can be integrated with either or both of the controller and the memory.
  • the processor 101 of the Host sends a write command to the controller 201 of the SSD 20, which can not only include or indicate the storage location and data volume of the data to be stored, but also mark the data attributes of the data to be stored, such as a mark Part of the data to be stored is the first data (the data to be stored W1 and the data to be stored W2 as shown in FIG. 7).
  • the running APP application software
  • the SSD controller 203 can not only identify the length of the data and determine the area to be stored through the interface, but also identify the read attribute of the data (the data has been marked as read attribute data), and continue the operation of storing the data.
  • the role of each module in the embodiment of this application will not be repeated, please refer to the related description of the aforementioned device embodiment or method embodiment; the embodiment of this application does not limit the function and specific structure of each module.
  • the interface 203 of the SSD provides an I/O interface (ie interface 203) capable of receiving data to the processor 101 of the Host for receiving the data W to be stored, wherein the data W to be stored may be stored in the processor or There is no untagged data sent to the SSD.
  • I/O interface ie interface 203
  • the read attribute identification function module 2011 in the SSD controller 201 identifies the data attribute of the command, such as identifying and distinguishing W1 and W2, identifying W1 as the first data, and identifying W2 as the second data.
  • W1 in FIG. 7 may refer to the read attribute data in FIG. 2
  • W2 may refer to the ordinary data in FIG. 2.
  • the lower page (corresponding to the storage area with low read latency) preferentially stores W1 (the read attribute data to be stored, that is, the first data) as an example for illustration, and part of W1 can also be stored in UP according to the actual situation; If it is not the data of the read attribute, try to store the data in the page unit with high read delay.
  • W1 the read attribute data to be stored, that is, the first data
  • the embodiment of the present application does not limit the matching relationship between the specific data and the read delay of the specific storage area.
  • writing the tag data into the SSD by the APP is an exemplary scenario description.
  • the first data may be data containing a designated identifier, and the designated identifier is used to mark the first data; the designated identifier may be manually set, or smart marking may be performed according to a certain marking rule.
  • the content of the designated identifier may also include the preset reading frequency or read priority of the identified data, and the specific content of the designated identifier is not limited in the embodiment of the present application. For example, if the read priority of the data corresponding to the designated identification mark is high priority, then when the storage area corresponding to the data is selected, the storage area with low read latency is selected to store the data. For another example, if the preset reading frequency of the data corresponding to the designated identification mark is high-frequency reading, when the storage area corresponding to the data is selected, a storage area with a low read delay is selected to store the data.
  • the above application embodiment provides an SSD device that needs to cooperate with the Host to complete data identification and storage; in order to intuitively illustrate the aforementioned first data containing the identifier, this application embodiment provides another different SSD device and implementation solution.
  • the difference from the foregoing application embodiment is that the embodiment of the application involves the addition of a read and write frequency statistics module to the SSD without the need to cooperate with the Host, and can independently complete operations such as data identification and storage.
  • FIG. 8 is a schematic diagram of another SSD data storage process provided by an embodiment of the present application.
  • the SSD 20 in the embodiment of the present application may include a controller 201 and a memory (that is, a flash memory array 202), specifically, it may also include an interface 203 (that is, the aforementioned data bus, or interface module), a controller (controller) 201, and a flash memory array.
  • 202 that is, the aforementioned memory, or NAND Flash Array module
  • the SSD in the embodiment of the present application may also include a read attribute recognition function module 2011 and a read/write frequency statistics (Read/Write frequency statistics) module 2013.
  • the controller 201 may also include a memory translation layer (FTL) 2012.
  • FTL memory translation layer
  • the SSD 20 intelligently recognizes the attributes of the data to be persistently stored (data W as shown in FIG. 8) through the controller 201, and then combines the identified different data (data W1 and data as shown in FIG. 8). W2, the data to be stored after being distinguished by the controller in the data W) is stored in different page units.
  • the read and write frequency statistics module 2013 designed inside the SSD will count the historical read and write times of each storage area and calculate the read and write frequency of each area.
  • the granularity of the storage area can be various, for example, divided by LBA.
  • the reading attribute recognition function module 2011 judges the attribute of the data according to the information of the reading and writing frequency statistics module.
  • the interface module 203 may be independent of the controller and the memory, or may be integrated with either or both of the controller and the memory, which is not limited in the embodiment of the present application.
  • the working steps of the SSD in the embodiment of the present application are described as follows:
  • the processor issues a write command to the SSD 20 through the I/O interface, where the write command is used to instruct the SSD to receive and store part or all of the data to be stored W, where the data to be stored W It can be data that is not marked in the processor.
  • the read attribute recognition function module 2011 in the SSD controller 201 determines the attribute of the data W to be stored according to the read and write frequency statistics module 2013. As shown in FIG. 8, in the controller, part of the data in the data W may be identified as the first data (for example, the data to be stored W1) or part of the data may be identified as the second data (for example, the data to be stored W2); However, the judgment of the first data and the second data can be re-judgmented and identified according to specific rules and the reading and writing of the data. For example, the data whose reading frequency is higher than the preset reading frequency threshold is identified as the first data. A piece of data, or one or more pieces of data with a higher reading frequency in a data set are identified as the first data; this embodiment of the present application does not limit this.
  • the data to be written (including the data to be stored W1 and the data to be stored W2) are distributed and stored on the NAND Flash medium through the FTL module 2012; among them, if it is the data of the read attribute, Try to store this data in the page unit with low read latency.
  • Lower Page (corresponding to the storage area with low read latency) is used to store W1 (the read attribute data to be stored, that is, the first data), and MP is stored to be stored.
  • the data W2 is taken as an example for description; if it is not the data of the read attribute, try to store the data in the page unit with high read delay.
  • the data issued by the Host is generally evenly stored in the three page units of NAND Flash; the average read delay of the SSD is the average delay of the three pages and the controller itself The sum of data transmission delays.
  • the read attribute data frequently read by APP is stored in LP and UP.
  • APP When reading data, it is obtained from LP and UP.
  • the average read delay is 59us (indicated by avg3 in Figure 9), and the average delay of SSD controller data transmission is also 20us (indicated by avg4 in the figure)
  • the embodiment of the present application does not limit the amount of data to be stored, and does not limit the application scenario.
  • the APP writing unmarked data to the SSD is an exemplary scenario description. It should be noted that, for the functions of the SSD described in the embodiments of the present application, reference may be made to related descriptions in the method embodiments described in FIG. 6, FIG. 10, and FIG. 11, which will not be repeated here.
  • the aforementioned first data classification may have a situation where the classification overlaps, for example, the initial identifier for data A is the first data (that is, the designated identifier is included), but In the actual writing, updating, and reading process, the calculation found that the read frequency of data A is low, or the priority is lower than other types of data, or low read latency is not required, etc.; then data A can be returned
  • the class is non-first data.
  • data B has a low read frequency in a certain business processing stage, but data B needs to be read at a high frequency in another business processing stage.
  • the attributes of data B can be re-judged, or data B can be added with timeliness The designated logo, etc.
  • the embodiment of the present application does not specifically limit the classification and recognition mode of the first data.
  • the controller recognizes the first data in the data to be stored while receiving the data to be stored.
  • the data volume of the data to be stored received by the controller at one time is determined by the size of the built-in storage module of the controller.
  • the controller receives a write command, where the write command is used to instruct the control
  • the device stores a certain length or amount of data to be stored in a designated area.
  • Step S602 From the multiple storage areas of the SSD, select a first storage area that matches the first data read delay.
  • the controller selects the first storage area in the memory that matches the expected read delay of the first data according to the first data, for example, according to the data characteristics of the first data (for example, the read delay is required due to frequent reading). Lower), the read delay of the matched first storage area is relatively low or the lowest among the read delays of the multiple storage areas of the SSD.
  • the embodiment of the present application does not limit the specific content involved in the expected read delay of the data.
  • the first storage area may be one or several storage areas among Flash0-FlashN in FIG. 1.
  • the SSD controller 203 selects the storage area 2021 (LP) and the storage area 2023 (UP) in the flash memory array 205 that match the read delay expected by the read attribute data according to the read attribute data.
  • the first data can also be classified into first data with different priorities according to the importance and reading frequency of the specific data.
  • the first data with the highest priority should generally be stored in the first storage area first.
  • the storage area with the lowest read delay, and the first data with a slightly lower priority can wait for the first data with the highest priority to be stored, and then store it to the storage with the same or slightly higher read delay than the lowest read delay.
  • the embodiment of the application does not specifically limit the specific storage method that does not affect the core of the application.
  • the multiple storage areas of the SSD may be classified into a storage area with low read latency, a storage area with medium read latency, and a storage area with high read latency.
  • TLC-type media For example, most SSD products in the industry currently use TLC-type media.
  • One cell of TLC NAND Flash can store 3 bits of information. In terms of logical division, each bit in a cell belongs to a different page, so TLC NAND Flash can include three types of page units, specifically Lower Page, Middle Page, and Upper Page; the names of these three page (page) units and their There is no inevitable connection to the lengthening of the reading time.
  • the storage characteristics of each page unit are different, especially the delay of the read operation (or read command), which is not specifically limited in the embodiment of the present application.
  • the read latency of the Lower Page of Toshiba BiCS4TLC is about 60us, while that of the Middle Page is about 80us, and that of the Upper Page is about 58us. It is understandable that the read latency of Middle Page is nearly 20% higher than that of the other two pages.
  • This difference in read latency also exists on QLC NAND Flash media; it is understandable that, as far as the current prior art is concerned, the embodiments of this application are more suitable for TLC and QLC, but the embodiments of this application are more effective in this application.
  • the media applied in the various embodiments involved are not limited.
  • different types of storage media generally include pages of different categories.
  • Each bit in the cell belongs to a different page; a cell of MLC stores 2 bits of information, so the cell has 4 states (11, 10, 01, 00), and Flash uses 4 kinds of charge to represent the aforementioned 4 kinds of cells status. Flash uses different read voltages to determine the data stored in the current cell. For example, for Lower Page, only one read voltage can be used to determine whether the data of the page is 0 or 1, but for Upper Page, it may be necessary to read the cell multiple times with three read voltages to determine whether the page is 0 or 1.
  • NAND Flash media can be classified into four types: SLC, MLC, TLC, and QLC according to the amount of data stored in the cell. The embodiment of the present application is more suitable for both TLC and QLC NAND Flash media.
  • Step S603 Store the first data in the first storage area.
  • the controller may directly store the first data in the first storage area in the memory through the received write command.
  • the controller receives the write command and analyzes the write command to obtain the tasks that the controller should perform.
  • the controller directly stores the data obtained by the SSD through the data bus from the data bus to the corresponding storage area according to the write command without passing through the controller.
  • the SSD controller 203 stores the read attribute data in the storage area 2021 (LP) and the storage area 2023 (UP) according to the write command.
  • the first data is identified from the received data to be stored (the first data may be data that needs to be read quickly from the SSD, for example, the reading frequency from the SSD is higher than a preset One or more of frequency threshold data, data containing a designated identifier, and data with a higher read frequency in the data set, where the data set may include data received by the SSD from the Host one or more times), and
  • the first data is stored in the first storage area matching the read delay, thereby reducing the average read delay generated in the process of reading the first data, and improving the service processing performance of the device equipped with the SSD.
  • the built-in cache module of the SSD causes the SSD controller to determine whether the read/write command hits the cache, and multiple addressing processes are required; in the embodiment of the present application, the internal cache module (or called Data caching module) to reduce the cost of production materials while meeting certain business requirements, and at the same time avoid the data caching module’s secondary addressing and increase the processing load of the SSD controller; more importantly, the SSD storage medium-based The feature stores data in a purposeful and reasonable manner, reduces the complexity of the solution implementation, and reduces the average read delay of the SSD. The effect is obvious.
  • FIG. 10 is a schematic diagram of another SSD data storage method provided by an embodiment of the present application.
  • the data storage method of the solid state disk is applied to the data storage system of the solid state disk (including the above system architecture).
  • the data storage system of the solid-state hard disk may include a main controller (such as a processor of a server or a computer) and a solid-state hard disk SSD, where the SSD may include a controller and a memory.
  • the following will describe from a single side of the controller in the solid state hard disk with reference to the accompanying drawings.
  • the method may include the following steps S1001-step S1010, and optional steps may also include step S1004-step S1010.
  • Step S1001 Receive data to be stored, and identify the first data in the data to be stored.
  • step S601 Please refer to the specific description of the foregoing step S601, which will not be repeated here.
  • the aforementioned target data is data whose frequency is higher than a preset frequency threshold read from the aforementioned SSD within a preset historical time period;
  • the aforementioned identification of the first data in the aforementioned data to be stored includes: Identify part or all of the data that has the same content as the target data in the aforementioned data to be stored as the aforementioned first data. For example, it can be judged whether the two are the same according to conditions such as whether the reading frequency is consistent and whether the data valid bit is consistent.
  • the aforementioned target data is data whose frequency is higher than a preset frequency threshold read from the aforementioned SSD within a preset historical time period;
  • the aforementioned identification of the first data in the aforementioned data to be stored includes: Identify part or all of the data to be stored that has the same type as the target data as the first data. For example, judging whether some or all of the data in the data to be stored is the same or similar to the data source of the target data; or whether they belong to the data required by the same link of business processing; or users (including developers) treat part of the stored data Or whether the reading requirements of all data and target data are the same, and so on.
  • the embodiments of the present application do not limit specific identification conditions.
  • the foregoing method further includes: counting the read frequency of reading data from the foregoing SSD within a preset historical time period; and determining the read frequency of the foregoing SSD that is higher than the foregoing preset frequency threshold.
  • the data is determined as the aforementioned target data.
  • the controller 201 determines the frequency at which data is read from the SSD within a preset historical time period, and identifies data with a frequency higher than a preset frequency threshold as the target data.
  • the target data may be data whose read frequency is higher than a preset frequency threshold from the SSD.
  • the user information is data to be stored, and content such as chat history and name is each data in the data to be stored.
  • the controller can calculate the historical reading frequency of these data according to the data types and data objects frequently called by the processor during the running of the APP. For example, if the reading frequency corresponding to the chat history and the transaction history is higher than the preset frequency threshold, then these two types of data are data that are frequently read from the SSD, and can be identified (or judged) as the first data.
  • the controller may perform a reading frequency calculation for each data in the received and stored data.
  • the reading frequency of the historical calculation can be retained, and then the reading frequency of the historical calculation can be used for the data belonging to the chat history.
  • the data is identified, and it is judged whether it is the first data.
  • the reading frequency of each type or category of data may be updated in combination with the reading frequency calculated subsequently.
  • Step S1002 From the multiple storage areas of the SSD, select a first storage area matching the first data read delay.
  • step S602 please refer to the specific description of the foregoing step S602, which will not be repeated here.
  • Step S1003 Store the first data in the first storage area.
  • step S603 please refer to the specific description of the foregoing step S603, which will not be repeated here.
  • Step S1004 Identify the second data in the data to be stored.
  • the second data may include data whose frequency of reading from the SSD is lower than that of the first data.
  • the second data may include data whose frequency of reading from the SSD is lower than that of the first data.
  • Step S1005 Select a second storage area matching the second data read delay from the multiple storage areas of the SSD.
  • the read delay of the second storage area is higher than that of the first storage area.
  • the specific process of selecting the second storage area reference may be made to the specific description of the foregoing step S602, which will not be repeated here.
  • Step S1006 Store the second data in the second storage area.
  • Step S1007 When the data amount of the first data is greater than the storage capacity of the first storage area, store part of the first data in the second storage area.
  • the controller 201 Part of the first data (for example, the first data that is read less frequently among the first data) is stored in the second storage area, so as to achieve flexible storage of the data.
  • the partial data may include a part of the first data that exceeds the storage capacity of the first storage area. For example, the part of the first data that has already filled the first storage area, and the part of the first data that exceeds the storage capacity of the first storage area.
  • a data is stored in the second storage area.
  • the data in the first storage area can be filtered and sorted according to the read frequency, and the read frequency is sorted.
  • the top ones are stored in the first storage area, and the remaining data can be optionally stored in the second storage area.
  • the part of the data may also include first data in other storage conditions.
  • first data in other storage conditions.
  • the data in it can be sorted and sorted according to the read frequency first, the read frequency sorted first is stored in the first storage area, and the remaining data can be optionally stored in the second storage area.
  • the solution provided in the embodiments of this application is a solution to reduce the average read latency of SSDs, but when it comes to actual specific data storage, it will be based on data conditions (such as data type, data volume, and data length, etc.) It is flexible to match the storage area for the data to be stored, which not only realizes the storage of all data to prevent loss, but also reduces the read delay to a certain extent. Therefore, the embodiments of the present application are not contradictory to the various embodiments of the present application. There is no limitation on the flexible storage method of actual specific data.
  • Step S1008 When the data amount of the second data is greater than the storage capacity of the second storage area, store part of the second data in the first storage area.
  • the controller 201 Part of the second data is stored in the first storage area to achieve flexible storage of the data; further, it can be used when the proportion of the second data is high and the first storage area satisfies the first data storage Using the first storage area to store the second data can not only satisfy the fast reading of the first data, but also improve the reading efficiency of the second data, and effectively reduce the read delay of the SSD.
  • the solution provided by the embodiments of this application is a solution to reduce the average read latency of SSD, but when it comes to actual specific data storage, it should be understood that it will be based on the data situation (such as data type, data volume, and data length, etc.) It is flexible to match the storage area for the data to be stored, which not only realizes the storage of all data to prevent loss, but also reduces the read delay to a certain extent. Therefore, the embodiments of the present application are not contradictory to the various embodiments of the present application. There is no limitation on the flexible storage method of actual specific data.
  • Step S1009 Buffer the first data in the buffer storage area.
  • the subsequent controller 201 generally has the following two processing results for the received read command: (1) Obtain data directly from the buffer memory module, and read under this operation The delay is relatively low; (2) The data is obtained from the NAND Flash chip and stored in the buffer memory module synchronously. In this way, the delay of the read command (that is, the read delay) may be higher than the aforementioned result (1); therefore, the The effect of the acceleration scheme in reducing the read delay is strongly related to the probability of obtaining data directly from the buffer memory module.
  • the embodiments of the present application are described on the premise of the second situation.
  • the controller 201 of the SSD stores part of the first data in the buffer storage area according to the write command; when the controller 201 receives the read command, it can query and read the first data from the buffer storage area and the memory 202 at the same time, or The first data is queried and read from the buffer storage area first, and when the target first data fails to be searched in the buffer storage area, the memory 202 of the SSD is queried and read the target first data immediately.
  • the SSD may also include a buffer storage area; wherein the buffer storage area is used to store the first data; a data cache (buffer storage area) module may only be used to cache commands sent by the Host (which may include The data involved in the read command and write command can also be cached in the metadata of the SSD.
  • the controller 201 stores the first data in the buffer storage area according to the identification carried in the first data.
  • the embodiment of the application can not only use the reading frequency of the internal statistics data of the SSD to identify the first data (or other reasonable ways to identify the first data, which will not be repeated here), but also identify the first data and match the corresponding storage area.
  • the first data in the buffer storage area of the SSD is combined to cache part.
  • the identified first data part is stored in the buffer storage area, and at the same time, the same complete data is backed up and stored in the storage area matched by the memory 202 (that is, the NAND Flash medium).
  • the data can be read from the buffer storage area first.
  • the probability hits the required data, then there is no need for secondary addressing.
  • the data can be read directly from the buffer storage area; even in the case of sudden power failure, the backup data can be obtained from the memory when it is powered on the next time. It not only reduces the average read delay but also guarantees the normal storage of data.
  • Step S1010 When receiving the read command of the first data, preferentially read the first data from the buffer storage area.
  • the SSD controller 201 preferentially reads part or all of the storage from the buffer storage area according to the command of the first data (which may include the specific identification of the first data or the storage area of the first data or the data amount of the first data).
  • the first data in the buffer storage area it can be understood that the priority of reading from the buffer storage area does not necessarily mean that the required data can be obtained from the buffer storage area in the first time, because the required data may be due to storage capacity, etc.
  • the problem is not stored in the buffer storage area.
  • the SSD controller 201 recognizes the read command from the received command, processes the recognized read command preferentially, and reads the data matching the read command; further, it can be implemented in conjunction with this application For example, thereby effectively reducing the average read latency of SSD. Specifically, the SSD controller judges whether the command received or generated by the SSD controller is a read command; if it is a read command, the SSD preferentially processes the aforementioned read command and related operations.
  • the embodiment of the present application does not specifically describe and limit the processing method of the read command (including the processing method of the optimized read command).
  • the first data is identified from the received data to be stored (the first data may be data that needs to be read quickly from the SSD, for example, the reading frequency from the SSD is higher than a preset One or more of frequency threshold data, data containing a designated identifier, and data with a higher read frequency in the data set, where the data set may include data received by the SSD from the Host one or more times), and
  • the first data is stored in the first storage area matching the read delay, thereby reducing the average read delay generated in the process of reading the first data, and improving the service processing performance of the device equipped with the SSD.
  • the built-in cache module of the SSD causes the SSD controller to determine whether the read/write command hits the cache, and multiple addressing processes are required; in the embodiment of the present application, the internal cache module (or called Data caching module) to reduce the cost of production materials while meeting certain business requirements, and at the same time avoid the data caching module’s secondary addressing and increase the processing load of the SSD controller; more importantly, the SSD storage medium-based The feature stores data in a purposeful and reasonable manner, reduces the complexity of the solution implementation, and reduces the average read delay of the SSD. The effect is obvious.
  • the data characteristics may include reading frequency higher than a preset frequency threshold, including a designated identifier, and reading frequency higher in the data set, etc.
  • the specific data characteristics are not limited in the embodiment of the present application.
  • by calculating the reading frequency of the data that has been stored in the solid state drive it is helpful to optimize the storage area of the stored data, and the data storage location can be adjusted according to the actual data reading situation, and the data reading efficiency can be improved. In turn, the service processing performance of the main control device is improved.
  • the data is classified and stored , Effectively store data based on the characteristics of the storage area, and improve the efficiency of data reading.
  • the embodiment of the present application does not limit the second data that meets the specific data feature and the specific data feature.
  • store data according to the relationship between the amount of data and the storage capacity of the storage area, such as storing part of the data in the first storage area when the amount of second data is large; store data flexibly according to the actual amount of data, and effectively use the storage area, It helps to reduce the read delay as a whole.
  • the buffer storage area module can be added again; part of the data is stored through the buffer storage area; when the SSD is normally powered on, it is convenient for the main control (such as a processor or server) to be directly from the buffer storage area with probability Obtaining the required data further reduces the average read delay of the SSD on the basis of the embodiments of the present application, and is suitable for application scenarios that require low cost but high data read efficiency. Compared with the SSD built-in buffer storage area in the prior art, the average read latency of the SSD can be reduced when the first addressing fails and the second addressing is required.
  • FIG. 11 is a schematic diagram of another SSD data storage method provided by an embodiment of the present application.
  • the data storage method of the solid state hard disk is applied to the data storage system of the solid state hard disk (including the above-mentioned system architecture).
  • the data storage system of the solid-state hard disk may include a main controller (such as a processor of a server or a computer) and a solid-state hard disk SSD, where the SSD may include a controller and a memory.
  • the following will describe from a single side of the controller in the solid state hard disk with reference to FIG. 11.
  • the method may include the following steps S1101-step S1106, and optional steps may also include step S1104-step S1106.
  • Step S1101 Receive the data to be stored, and identify the first data in the data to be stored.
  • the first data is data including a designated identifier, and the designated identifier is used to indicate the reading of the first data.
  • the delay requirement For example, after the master has identified the data, the data has the identification of the first data.
  • the data A itself carries an identifier specifying the first data; the controller directly recognizes the data as the first data from the received data according to the write command through the identifier of the first data.
  • Step S1102 From the multiple storage areas of the SSD, select a first storage area matching the first data read delay according to the designated identifier.
  • the designated identifier is used to indicate the read delay requirement of the first data; according to the content of the designated identifier (for example, the designated identifier marks the specific read frequency or read priority of the first data, the foregoing content It can be considered that it reflects the demand of read delay), and the first data is stored in the first storage area that matches the expected read delay. For example, if it is determined from the identifier that the reading frequency of the first data is the highest, then the first data can be stored in the storage area of the SSD with the smallest reading delay.
  • the data including the designated identifier in the to-be-stored data is identified as the first data.
  • the controller 201 recognizes the data carrying the designated identifier as the first data, where the data may include a fixed character in a certain position in the data field, or the data and the identifier are bound together, but the identifier does not occupy Data fields.
  • the designated identifier may be the ID or number corresponding to the data. Taking the number 1 as the first data as an example, when it is recognized that the data number in the received command is 1, then the corresponding data is stored in the first storage area.
  • the embodiments of this application do not limit the specific form of the designated identifier and how the data contains the designated identifier.
  • Step S1103 Store the first data in the first storage area.
  • step S603 corresponding to FIG. 6, which will not be repeated here.
  • the method further includes: when the data amount of the first data is greater than the storage capacity of the first storage area, storing part of the data in the first data in the second Storage area; or, when the data amount of the second data is greater than the storage capacity of the second storage area, store part of the second data in the first storage area.
  • the SSD further includes a buffer storage area; the method further includes: buffering the first data in the buffer storage area.
  • the buffering the first data in the buffer storage area includes: after receiving a write command of the first data, storing the first data in the buffer according to the write command Storage area.
  • the method further includes: when receiving a read command of the first data, preferentially reading the first data from the buffer storage area.
  • Step S1104 Identify the second data in the data to be stored.
  • the second data is data whose frequency of reading from the SSD is lower than that of the first data.
  • the designated identification of the first data marks that the first data is high-frequency read data, and the reading frequency of the second data should be lower than the reading frequency of the first data within a certain range, which is not the same as other data in this application.
  • the designated identification of the first data marks that the first data is low-frequency read data, and the reading frequency of the second data should also be lower than that of the first data within a certain range. The frequency can even be similar to the reading frequency of the first data.
  • the data that does not contain an identifier in the data to be stored is identified as the second data, and the second data is stored in a storage area with a high read delay such as a non-first storage area (such as the first storage area). Two storage area).
  • the data identifier received by the SSD may also be used to mark the data as the first data or to mark the data as the second data.
  • the main controller marks data C as high-frequency read data, and adds field c when issuing a write command; when the SSD controller receives commands and data through the interface, it directly determines that the data is the first data according to field c ( That is, high-frequency read data), and then store it in the first storage area with low read latency.
  • the main controller marks data C as low-frequency read data, and adds field d when issuing a write command; when the SSD controller receives commands and data through the interface, it directly determines that the data is the second data according to field d (ie Low-frequency read data), and then store it in the second storage area with high read latency.
  • the storage area can be changed according to the subsequent changes in the reading frequency of the data; for example, the data originally marked as high-frequency reading will have a low reading frequency in the subsequent period of time, and the data can be changed according to certain rules.
  • the data originally marked as low-frequency read will have a high read frequency in the subsequent period of time, and it can be changed according to certain rules. It is stored in the first storage area, which is beneficial to improve the data processing efficiency of the SSD and reduce the average read delay of the SSD.
  • Step S1105 Select a second storage area matching the second data read delay from the multiple storage areas of the SSD.
  • step S1005 corresponding to FIG. 10, which will not be repeated here; wherein, the read delay of the second storage area is higher than that of the first storage area.
  • Step S1106 Store the second data in the second storage area.
  • step S1006 corresponding to FIG. 10, which will not be repeated here.
  • FIG. 12 is a schematic structural diagram of an SSD data storage device provided by an embodiment of the present application.
  • the data storage device 12 of the solid state hard disk SSD includes a first receiving unit 1201, a first identifying unit 1202, and a first The selection unit 1203, the first storage unit 1204, the first storage area classification unit 1205, the first decision unit 1206, the first cache unit 1207, the first reading unit 1208, and the target data determination unit 1209.
  • the optional units may include the first A storage area classification unit 1205, a first decision-making unit 1206, a first caching unit 1207, a first reading unit 1208, and a target data determining unit 1209. among them,
  • the first receiving unit 1201 is configured to receive data to be stored
  • the first identification unit 1202 is configured to identify the first data in the aforementioned data to be stored, wherein the aforementioned first data is data that matches the target data, and the aforementioned target data is that the reading frequency from the aforementioned SSD is higher than a preset frequency threshold The data;
  • the first selection unit 1203 is configured to select a first storage area matching the first data read delay from a plurality of storage areas of the SSD;
  • the first storage unit 1204 is configured to store the first data in the first storage area.
  • the aforementioned target data is data whose frequency is higher than a preset frequency threshold read from the aforementioned SSD within a preset historical time period; the aforementioned first identification unit 1202 is specifically configured to: Part or all of the data in the stored data that has the same content as the aforementioned target data is identified as the aforementioned first data.
  • the aforementioned target data is data whose frequency is higher than a preset frequency threshold read from the aforementioned SSD within a preset historical time period; the aforementioned first identification unit 1202 is specifically configured to: Some or all data of the same type as the aforementioned target data in the stored data is identified as the aforementioned first data.
  • the device 12 further includes a first storage area classification unit 1205, configured to:
  • the second data in the data to be stored where the second data is data that is read from the SSD with a lower frequency than the first data; it is understandable that the identification of the second data is also It can be processed by the aforementioned first identification unit 1202.
  • the main function of the first storage area classification unit 1205 is to select a suitable storage area according to the stored data; for example, the storage unit corresponding to the NAND Flash medium in the memory is classified and managed according to characteristics such as read delay, for example, all Lower Pages with low read latency in Flash particles are classified as a type of storage area.
  • the first storage area classification unit 1205 can accept the call of the first storage unit 1204, that is, after the storage area selection is completed, the first storage unit 1204 can be used for storage.
  • the identification, selection (or matching) and storage functions of the first storage area classification unit 1205 mentioned in the embodiments of this application are all exemplary descriptions; the storage classification unit may be combined with some other units, or not Relying on other units to achieve corresponding functions, therefore, the embodiment of the present application does not limit the specific functions of the storage area classification unit.
  • the foregoing device further includes a target data determining unit 1209, configured to: count the read frequency of reading data from the foregoing SSD within a preset historical time period; and compare the read frequency from the foregoing SSD Data higher than the aforementioned preset frequency threshold is determined as the aforementioned target data.
  • a target data determining unit 1209 configured to: count the read frequency of reading data from the foregoing SSD within a preset historical time period; and compare the read frequency from the foregoing SSD Data higher than the aforementioned preset frequency threshold is determined as the aforementioned target data.
  • the target data determining unit 1209 is specifically configured to:
  • the SSD further includes a buffer storage area; the device 12 further includes a first caching unit 1207 configured to cache the first data in the buffer storage area.
  • the first caching unit 1207 is specifically configured to:
  • the first data After receiving the write command of the first data, the first data is stored in the buffer storage area according to the write command.
  • the device 12 further includes a first reading unit 1208, configured to: when receiving a read command of the first data, preferentially read the first data from the buffer storage area. data.
  • a first reading unit 1208 configured to: when receiving a read command of the first data, preferentially read the first data from the buffer storage area. data.
  • the required data can also be read from the NANDFlash.
  • the device 12 further includes a first decision-making unit 1206, configured to:
  • the data to be stored is received through the receiving unit, and the first data is identified therefrom, and then a suitable first storage area is selected according to the selection unit, and the first data is stored to the first data matching its read delay based on the storage unit.
  • a storage area thereby reducing the average read delay generated in the process of reading the first data, and improving the service processing performance of the device equipped with the SSD.
  • the first data may be data that needs to be read quickly from the SSD, such as data whose reading frequency is higher than a preset frequency threshold from the SSD, data containing a designated identifier, and a data set with a relatively high reading frequency.
  • the data set may include data received by the SSD from the Host one or more times.
  • the built-in cache module of the SSD causes the SSD controller to determine whether the read/write command hits the cache, and multiple addressing processes are required; in the embodiment of the present application, the internal cache module (or called Data caching module) to reduce the cost of production materials while meeting certain business requirements, and at the same time avoid the data caching module’s secondary addressing and increase the processing load of the SSD controller; more importantly, the SSD storage medium-based The feature stores data in a purposeful and reasonable manner, reduces the complexity of the solution implementation, and reduces the average read delay of the SSD. The effect is obvious.
  • the identification unit in the receiving unit According to the data characteristics of the first data, the first data is identified from the data to be stored, which facilitates subsequent data classification and storage, and efficiently stores the first data to be read. Storage area for delay matching.
  • the data characteristics may include reading frequency higher than a preset frequency threshold, including a designated identifier, and reading frequency higher in the data set, etc.
  • the specific data characteristics are not limited in the embodiment of the present application.
  • the reading frequency of the data already stored in the solid state drive is calculated by the identification unit, which is beneficial to optimize the storage area of the stored data, and can adjust the data storage location according to the actual data reading situation, and improve the data reading Efficiency, thereby improving the business processing performance of the main control device.
  • the storage area classification unit identifies the second data that meets the specific data characteristics (data characteristics that are different from the first data), and stores the second data in a second storage area that matches the read delay.
  • the classified storage of data effectively stores data based on the characteristics of the storage area and improves the efficiency of data reading.
  • the embodiment of the present application does not limit the second data that meets the specific data feature and the specific data feature.
  • the decision unit stores data according to the relationship between the amount of data and the storage capacity of the storage area, such as storing part of the data in the first storage area when the amount of the second data is large; stores the data flexibly according to the actual amount of data, and makes effective use of The storage area helps to reduce the overall read delay.
  • part of the data can be stored through the increased buffer storage area; when the SSD is normally powered on, it is convenient for the main control (such as a processor or server) to obtain the required data directly from the buffer storage area with probability ,
  • the average read delay of the SSD is further reduced, and it is suitable for application scenarios that require low cost but high data read efficiency.
  • the first addressing fails and the second addressing is required the average read delay of the SSD can be reduced.
  • the data storage device of the solid state drive SSD described in the embodiment of the present application refer to the related description of the data storage method of the solid state drive SSD in the method embodiments described in FIG. 6, FIG. 10, and FIG. 11. , I won’t repeat it here.
  • the functions of the various units involved in the data storage device of the solid state drive SSD described in the embodiments of the present application are part of the functions of the SSD controller, but do not include all the functions of the SSD controller; for example, the implementation of this application
  • the data storage device mentioned in the example does not include the process of reading data and the description of related functions in general; however, in actual application scenarios, the device generally reads or writes data and performs related operations, which are only implemented in this application. Do not give too much description in the example.
  • FIG. 13 is a schematic structural diagram of another SSD data storage device provided by an embodiment of the present application.
  • the data storage device 13 of the solid state hard disk SSD may include a second receiving unit 1301 and a second identifying unit 1302. , The second selection unit 1303, the second storage unit 1304, the second storage area classification unit 1305, the second decision unit 1306, the second cache unit 1307, and the second reading unit 1308.
  • the optional units may include the second storage area The classification unit 1305, the second decision unit 1306, the second cache unit 1307, and the second reading unit 1308. among them,
  • the second receiving unit 1301 is configured to receive data to be stored
  • the second identification unit 1302 is configured to identify the first data in the aforementioned data to be stored, wherein the aforementioned first data is data including a designated identifier, and the aforementioned designated identifier is used to indicate the read delay requirement of the aforementioned first data;
  • the second selection unit 1303 is configured to select the first storage area matching the first data read delay from the multiple storage areas of the aforementioned SSD according to the aforementioned designated identifier;
  • the second storage unit 1304 is configured to store the aforementioned first data in the aforementioned first storage area.
  • the foregoing device further includes a second storage area classification unit 1305, configured to: identify the second data in the foregoing data to be stored, and the foregoing second data is read from the foregoing SSD with a lower frequency than the foregoing Data of the first data; from the plurality of storage areas of the aforementioned SSD, select a second storage area that matches the read delay of the aforementioned second data, and the read delay of the aforementioned second storage area is higher than the aforementioned first storage area; The aforementioned second data is stored in the aforementioned second storage area.
  • a second storage area classification unit 1305 configured to: identify the second data in the foregoing data to be stored, and the foregoing second data is read from the foregoing SSD with a lower frequency than the foregoing Data of the first data; from the plurality of storage areas of the aforementioned SSD, select a second storage area that matches the read delay of the aforementioned second data, and the read delay of the aforementioned second storage area is higher than the aforementioned first storage area; The
  • the aforementioned SSD further includes a buffer storage area; the aforementioned device further includes a second cache unit 1307 configured to cache the aforementioned first data in the aforementioned buffer storage area.
  • the aforementioned second buffer unit 1307 is specifically configured to: after receiving the aforementioned write command of the first data, store the aforementioned first data in the aforementioned buffer storage area according to the aforementioned write command.
  • the aforementioned apparatus further includes a second reading unit 1308, configured to: when receiving the aforementioned first data read command, preferentially read the aforementioned first data from the aforementioned buffer storage area.
  • the aforementioned device further includes a second decision-making unit 1306, configured to store part of the aforementioned first data in the aforementioned first data storage area when the amount of the aforementioned first data is greater than the storage capacity of the aforementioned first storage area.
  • the aforementioned second storage area or, when the data amount of the aforementioned second data is greater than the storage capacity of the aforementioned second storage area, storing part of the aforementioned second data in the aforementioned first storage area.
  • the data storage device of the solid state drive SSD described in the embodiment of the present application refer to the related description of the data storage method of the solid state drive SSD in the method embodiments described in FIG. 6, FIG. 10, and FIG. 11. , I won’t repeat it here.
  • the functions of the various units involved in the data storage device of the solid-state hard disk SSD described in the embodiments of the present application are part of the functions of the SSD controller, but do not include all the functions of the SSD controller; for example, the implementation of this application
  • the data storage device mentioned in the example does not include the process of reading data and the description of related functions in general; however, in actual application scenarios, the device generally reads or writes data and performs related operations, which are only implemented in this application. Do not give too much description in the example.
  • An embodiment of the present application further provides a computer storage medium, wherein the computer storage medium can store a program, and the program can execute any part of the method described in the method embodiments corresponding to FIG. 6, FIG. 10, and FIG. 11. Or all steps.
  • the embodiment of the present application also provides a computer program, the computer program includes instructions, when the computer program is executed by the computer, the computer can execute any of the method embodiments described in the above-mentioned FIG. 6, FIG. 10, and FIG. 11 Some or all of the steps.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are only illustrative, for example, the division of the above-mentioned units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
  • the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc., specifically a processor in a computer device) execute all or part of the steps of the foregoing methods of the various embodiments of the present application.
  • the aforementioned storage media may include: U disk, mobile hard disk, magnetic disk, optical disk, read-only memory (Read-Only Memory, abbreviation: ROM) or Random Access Memory (Random Access Memory, abbreviation: RAM), etc.
  • U disk mobile hard disk
  • magnetic disk magnetic disk
  • optical disk read-only memory
  • Read-Only Memory abbreviation: ROM
  • Random Access Memory Random Access Memory

Abstract

L'invention concerne un procédé et un appareil de stockage de données pour un disque statique à semi-conducteurs et un disque statique à semi-conducteurs (SSD). Selon la présente invention, le retard de temps de lecture moyen d'un SSD peut être efficacement réduit, et les performances de service du SSD dans une scène sensible au retard de temps peuvent être améliorées sur la base du fait que des coûts de matériau supplémentaires ne sont pas augmentés. Le procédé de stockage de données pour un disque statique à semi-conducteurs peut consister à : recevoir des données à stocker, et identifier des premières données, dans les données à stocker, mettre en correspondance des données cibles ou des premières données comprenant un identifiant désigné, les données cibles étant des données, lues à partir d'un SSD, ayant une fréquence supérieure à un seuil de fréquence prédéfini ; sélectionner, parmi une pluralité de régions de stockage du SSD, une première région de stockage correspondant à un retard de temps de lecture des premières données ; et stocker les premières données susmentionnées dans la première région de stockage susmentionnée. Grâce à la mise en œuvre des modes de réalisation de la présente invention, le retard de temps de lecture moyen d'un SSD peut être efficacement réduit.
PCT/CN2019/102909 2019-08-27 2019-08-27 Procédé et appareil de stockage de données pour disque statique à semi-conducteurs et disque statique à semi-conducteurs (ssd) WO2021035555A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980099647.5A CN114303123A (zh) 2019-08-27 2019-08-27 一种固态硬盘的数据存储方法、装置及固态硬盘ssd
PCT/CN2019/102909 WO2021035555A1 (fr) 2019-08-27 2019-08-27 Procédé et appareil de stockage de données pour disque statique à semi-conducteurs et disque statique à semi-conducteurs (ssd)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/102909 WO2021035555A1 (fr) 2019-08-27 2019-08-27 Procédé et appareil de stockage de données pour disque statique à semi-conducteurs et disque statique à semi-conducteurs (ssd)

Publications (1)

Publication Number Publication Date
WO2021035555A1 true WO2021035555A1 (fr) 2021-03-04

Family

ID=74684898

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/102909 WO2021035555A1 (fr) 2019-08-27 2019-08-27 Procédé et appareil de stockage de données pour disque statique à semi-conducteurs et disque statique à semi-conducteurs (ssd)

Country Status (2)

Country Link
CN (1) CN114303123A (fr)
WO (1) WO2021035555A1 (fr)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114489484A (zh) * 2021-12-27 2022-05-13 得一微电子股份有限公司 Ssd的数据存储方法、ssd、终端设备以及存储介质
CN116994628A (zh) * 2023-06-30 2023-11-03 珠海妙存科技有限公司 基于偏移读电压的闪存颗粒分级方法、控制器及介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816571B (zh) * 2022-04-15 2023-06-16 西安广和通无线通信有限公司 外挂闪存的方法、装置、设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127004A (zh) * 2007-09-24 2008-02-20 中兴通讯股份有限公司 一种在闪存上存取数据的系统及方法
US20090172256A1 (en) * 2007-12-31 2009-07-02 Phison Electronics Corp. Data writing method for flash memory, and flash memory controller and storage device thereof
CN103608782A (zh) * 2011-05-15 2014-02-26 苹果公司 Lsb页面和msb页面中的选择性数据存储
CN104813270A (zh) * 2012-12-04 2015-07-29 苹果公司 从主机至存储设备的对所删除的数据的提示
CN105242871A (zh) * 2014-06-06 2016-01-13 华为技术有限公司 一种数据写入方法及装置
CN106873912A (zh) * 2017-02-16 2017-06-20 郑州云海信息技术有限公司 Tlc芯片固态硬盘的动态分区存储方法及装置、系统
CN107562378A (zh) * 2017-08-28 2018-01-09 记忆科技(深圳)有限公司 一种提升固态存储设备寿命的方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127004A (zh) * 2007-09-24 2008-02-20 中兴通讯股份有限公司 一种在闪存上存取数据的系统及方法
US20090172256A1 (en) * 2007-12-31 2009-07-02 Phison Electronics Corp. Data writing method for flash memory, and flash memory controller and storage device thereof
CN103608782A (zh) * 2011-05-15 2014-02-26 苹果公司 Lsb页面和msb页面中的选择性数据存储
CN104813270A (zh) * 2012-12-04 2015-07-29 苹果公司 从主机至存储设备的对所删除的数据的提示
CN105242871A (zh) * 2014-06-06 2016-01-13 华为技术有限公司 一种数据写入方法及装置
CN106873912A (zh) * 2017-02-16 2017-06-20 郑州云海信息技术有限公司 Tlc芯片固态硬盘的动态分区存储方法及装置、系统
CN107562378A (zh) * 2017-08-28 2018-01-09 记忆科技(深圳)有限公司 一种提升固态存储设备寿命的方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114489484A (zh) * 2021-12-27 2022-05-13 得一微电子股份有限公司 Ssd的数据存储方法、ssd、终端设备以及存储介质
CN116994628A (zh) * 2023-06-30 2023-11-03 珠海妙存科技有限公司 基于偏移读电压的闪存颗粒分级方法、控制器及介质
CN116994628B (zh) * 2023-06-30 2024-04-12 珠海妙存科技有限公司 基于偏移读电压的闪存颗粒分级方法、控制器及介质

Also Published As

Publication number Publication date
CN114303123A (zh) 2022-04-08

Similar Documents

Publication Publication Date Title
CN107844431B (zh) 映射表更新方法、存储器控制电路单元与存储器存储装置
US8166233B2 (en) Garbage collection for solid state disks
US8626987B2 (en) Flash memory system and defragmentation method
TWI385518B (zh) 用於快閃記憶體的資料儲存方法及儲存系統
WO2017000658A1 (fr) Système de stockage, dispositif de gestion de stockage, dispositif de stockage, dispositif de stockage hybride et procédé de gestion de stockage
US9582416B2 (en) Data erasing method, memory control circuit unit and memory storage apparatus
US20110264884A1 (en) Data storage device and method of operating the same
US20180089074A1 (en) Techniques to Manage Key-Value Storage at a Memory or Storage Device
EP3752905B1 (fr) Flux à ajout uniquement permettant de mémoriser des données sur un dispositif à semi-conducteurs
KR20150118778A (ko) 스토리지 컨트롤러, 스토리지 장치, 스토리지 시스템 및 상기 스토리지 컨트롤러의 동작 방법
CN107665091B (zh) 数据读取方法、数据写入方法及其存储控制器
WO2021035555A1 (fr) Procédé et appareil de stockage de données pour disque statique à semi-conducteurs et disque statique à semi-conducteurs (ssd)
TW201807580A (zh) 資料傳輸方法及使用所述方法的儲存控制器與清單管理電路
JP2021533467A (ja) 論理対物理テーブルフラグメント
WO2017022082A1 (fr) Boîtier de mémoire flash et système de stockage comprenant un boîtier de mémoire flash
CN107943710B (zh) 存储器管理方法及使用所述方法的存储控制器
CN110312986B (zh) 用于在固态设备上存储数据的流的机会性使用
US20180232154A1 (en) Append Only Streams For Storing Data On A Solid State Device
US20230273878A1 (en) Storage device for classifying data based on stream class number, storage system, and operating method thereof
CN112860193A (zh) 整理指令处理方法、存储器控制电路单元与存储装置
EP4307129A1 (fr) Procédé d'écriture de données dans un disque dur à semi-conducteurs
KR20200032404A (ko) 데이터 저장 장치 및 동작 방법, 이를 포함하는 스토리지 시스템
CN112799601A (zh) 有效数据合并方法、存储器存储装置及控制电路单元
TWI795680B (zh) 主機效能加速模式的資料讀取方法及裝置
US11941246B2 (en) Memory system, data processing system including the same, and operating method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19943436

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19943436

Country of ref document: EP

Kind code of ref document: A1