CN117032557A - Solid state disk data storage method and device, storage medium and electronic equipment - Google Patents
Solid state disk data storage method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN117032557A CN117032557A CN202310587500.9A CN202310587500A CN117032557A CN 117032557 A CN117032557 A CN 117032557A CN 202310587500 A CN202310587500 A CN 202310587500A CN 117032557 A CN117032557 A CN 117032557A
- Authority
- CN
- China
- Prior art keywords
- storage unit
- data
- solid state
- state disk
- storage
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 239000007787 solid Substances 0.000 title claims abstract description 249
- 238000000034 method Methods 0.000 title claims abstract description 95
- 238000013500 data storage Methods 0.000 title claims abstract description 45
- 238000012545 processing Methods 0.000 claims abstract description 70
- 238000004891 communication Methods 0.000 claims abstract description 33
- 230000008901 benefit Effects 0.000 claims description 25
- 230000004044 response Effects 0.000 claims description 22
- 238000004590 computer program Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 11
- 238000007726 management method Methods 0.000 description 10
- 230000001133 acceleration Effects 0.000 description 8
- 238000013507 mapping Methods 0.000 description 8
- 238000013519 translation Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 238000006243 chemical reaction Methods 0.000 description 6
- 238000005299 abrasion Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 2
- 230000001965 increasing effect Effects 0.000 description 2
- 230000007334 memory performance Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012384 transportation and delivery Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
- G06F3/0611—Improving I/O performance in relation to response time
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The disclosure provides a solid state disk data storage method, a solid state disk data storage device, a storage medium and electronic equipment, and relates to the technical field of cloud computing. The method is applied to a host end, and the host end is in communication connection with the solid state disk; the solid state disk includes: a first storage unit and a second storage unit, the storage rate of the first storage unit being greater than the storage rate of the second storage unit, the amount of data stored per unit space of the second storage unit being greater than the amount of data stored per unit space of the first storage unit, the method comprising: receiving a data request, wherein the data request is used for writing data into the first storage unit or the second storage unit; determining a processing priority of the data request; and sending the data requested to be stored by the data request to a first storage unit or a second storage unit of the solid state disk according to the processing priority of the data request, so that the solid state disk writes the data into the first storage unit or the second storage unit.
Description
Technical Field
The disclosure relates to the technical field of cloud computing, and in particular relates to a solid state disk data storage method, a solid state disk data storage device, a storage medium and electronic equipment.
Background
With the increasing demand of the industry for large-capacity storage, the NAND flash memory has the advantages of larger capacity, high reading and writing speed, lower power consumption and the like, is suitable for a storage scene of a large amount of data, and is widely applied to the HPC (High Performance Computing) high-performance computing field.
At present, most of Solid-State Drive (Solid-State Drive) storage units of commercial SSD use TLC (three-layer Cell) and 3D stacking technologies, although the storage density of the flash memory can be effectively improved, the storage structure is relatively complex, and storage 'large blocks' can appear due to more data stored in each storage unit, so that the error probability in the data processing process is greatly increased, and therefore, the flash memory file system has to perform error correction, thereby leading to higher delay overhead and obviously reducing the flash memory performance.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure provides a solid state disk data storage method, a solid state disk data storage device, a storage medium and electronic equipment, which at least overcome the problem of reduced flash memory performance caused by high delay overhead in the related art to a certain extent.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to one aspect of the present disclosure, a solid state disk data storage method is provided and applied to a host end, where the host end is in communication connection with the solid state disk; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the method comprising:
receiving a data request, wherein the data request is used for writing data into the first storage unit or the second storage unit;
determining a processing priority of the data request;
and sending the data requested to be stored by the data request to a first storage unit or a second storage unit of the solid state disk according to the processing priority of the data request, so that the solid state disk writes the data into the first storage unit or the second storage unit.
In some embodiments, further comprising: under the condition that the data requested to be stored by the data request is determined to be sent to a first storage unit of the solid state disk, acquiring the number of data requests written into the solid state disk in a target time period;
determining the proportion of the solid state disk for storing data by adopting the first storage unit according to the data request number written into the solid state disk in the target time period, the residual capacity of the solid state disk and the residual capacity of the first storage unit;
and according to the proportion of the solid state disk for storing data by adopting the first storage unit, sending the data requested to be stored by the data request to the first storage unit, so that the solid state disk writes the data into the first storage unit.
In some embodiments, further comprising:
determining a minimum threshold of the write data amount of the first storage unit according to the residual erase count of the first storage unit and the residual erase count of the second storage unit;
and controlling the data volume of the data written into the first storage unit according to the minimum threshold value of the written data volume of the first storage unit.
In some embodiments, determining the processing priority of the data request comprises:
Acquiring heat information of the data request; the heat information is the access quantity of the data request in unit time;
dividing the data request into a plurality of data types, and giving corresponding response priority to the plurality of data types obtained by dividing;
and determining the processing priority of the data request according to the heat information of the data request and the corresponding response priority.
In some embodiments, under the condition that it is determined that the data requested to be stored by the data request is sent to the first storage unit of the solid state disk, obtaining the number of data requests written into the solid state disk in the target time period includes:
determining a benefit value obtained by writing data corresponding to the data request into the first storage unit according to the processing priority of the data request;
determining a profit threshold according to the residual capacity of the solid state disk and the residual capacity of the first storage unit;
judging whether the data requested to be stored by the data request is sent to the first storage unit or the second storage unit according to the benefit value and the benefit threshold;
and under the condition that the data requested to be stored by the data request is determined to be sent to the first storage unit of the solid state disk, acquiring the data request number written into the solid state disk in a target time period.
In some embodiments, determining, according to the processing priority of the data request, a benefit value corresponding to writing data by the data request to the first storage unit includes:
and adding the product of the response priority weight and the response priority of the data request with the heat information, and determining a benefit value obtained by writing the data corresponding to the data request into the first storage unit.
In some embodiments, determining, according to the number of data requests written into the solid state disk in the target period of time, the remaining capacity of the solid state disk and the remaining capacity of the first storage unit, a proportion of the solid state disk to store data by using the first storage unit includes:
determining the average total number of requests, the average number of read requests and the maximum depth of an input-output queue according to the number of data requests written into the solid state disk in the target time period;
and determining the proportion of the solid state disk for storing data by adopting the first storage unit according to the average total number of requests, the average number of reading requests, the maximum depth of the input and output queues, the residual capacity of the solid state disk and the residual capacity of the first storage unit.
In some embodiments, determining the proportion of the solid state disk that uses the first storage unit to store data according to the average total number of requests, the average number of read requests, the maximum depth of the input/output queue, the remaining capacity of the solid state disk, and the remaining capacity of the first storage unit includes:
Multiplying a sum of a ratio of the average read request number to the average request total number and a ratio of the average request total number to the maximum depth of the input-output queue by a scale factor to determine a first coefficient; the scale factor is the ratio of the residual capacity of the first storage unit to the residual capacity of the solid state disk;
and determining the minimum value between the first coefficient and a preset constant as the proportion of the solid state disk for storing data by adopting a first storage unit.
In some embodiments, according to the proportion of the solid state disk that uses the first storage unit to store data, sending the data requested to be stored by the data request to the first storage unit includes:
according to the proportion of the solid state disk for storing data by adopting the first storage unit, the duty ratio of the first storage unit in the solid state disk is adjusted, and the adjusted first storage unit is determined;
and sending the data requested to be stored by the data request to the adjusted first storage unit.
In some embodiments, determining the minimum threshold for the amount of data written to the first memory cell based on the remaining erase count of the first memory cell and the remaining erase count of the second memory cell comprises:
Determining a writing quantity limiting condition according to the residual erasure count of the first storage unit and the residual erasure count of the second storage unit;
determining the writing budget of the current writing window according to the writing quantity limiting condition;
and determining a minimum threshold value of the written data quantity of the first storage unit according to the writing budget of the current writing window.
In some embodiments, determining the write quantity limitation condition based on the remaining erase count of the first memory cell and the remaining erase count of the second memory cell includes:
acquiring all data written into the solid state disk, the data size of a flash memory block of a first storage unit and the data size of a flash memory block of a second storage unit;
and determining a writing quantity limiting condition according to all data written into the solid state disk, the data quantity of the flash memory block of the first storage unit and the data quantity of the flash memory block of the second storage unit and the erasing operation loss of the first storage unit.
In some embodiments, the first memory cell employs a single-level cell SLC storage mode and the second memory cell employs a triple-level cell TLC storage mode.
According to another aspect of the disclosure, there is further provided a solid state disk data storage method applied to a solid state disk, where the solid state disk is connected with a host in a communication manner; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the method comprising:
Receiving data which is sent by the host end and is requested to be stored, and writing the data into the first storage unit or the second storage unit; the data which is requested to be stored is determined by the host according to the processing priority of the data request; the data request is received by the host side; the data request is for writing data to the first storage unit or the second storage unit.
According to another aspect of the present disclosure, there is further provided a solid state disk data storage device, which is applied to a host end, where the host end is connected with the solid state disk in a communication manner; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the apparatus comprising:
a data request receiving module, configured to receive a data request, where the data request is used to write data to the first storage unit or the second storage unit;
a processing priority determining module, configured to determine a processing priority of the data request;
And the data sending and writing module is used for sending the data requested to be stored by the data request to the first storage unit or the second storage unit of the solid state disk according to the processing priority of the data request so as to enable the solid state disk to write the data into the first storage unit or the second storage unit.
According to another aspect of the present disclosure, there is further provided a solid state disk data storage device, applied to a solid state disk, where the solid state disk is connected to a host in a communication manner; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the apparatus comprising:
the data receiving and writing module is used for receiving data which is sent by the host end and is requested to be stored, and writing the data into the first storage unit or the second storage unit; the data which is requested to be stored is determined by the host according to the processing priority of the data request; the data request is received by the host side; the data request is for writing data to the first storage unit or the second storage unit.
According to another aspect of the present disclosure, there is also provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; the processor is configured to execute any one of the above solid state disk data storage methods by executing the executable instructions.
According to another aspect of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a solid state disk data storage method of any one of the above.
According to another aspect of the present disclosure, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements a solid state disk data storage method of any one of the above.
The solid state disk data storage method provided by the embodiment of the disclosure is applied to a host end, and the host end is in communication connection with the solid state disk; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the method comprising: receiving a data request, wherein the data request is used for writing data into the first storage unit or the second storage unit; determining a processing priority of the data request; and sending the data requested to be stored by the data request to a first storage unit or a second storage unit of the solid state disk according to the processing priority of the data request, so that the solid state disk writes the data into the first storage unit or the second storage unit. According to the method and the device, the software semantic information is used for guiding the placement and management of the data, the characteristic that the storage rate of the first storage unit is larger than that of the second storage unit is fully utilized, the data request to be accelerated and written is screened out according to the processing priority and is sent to the first storage unit for writing, the efficiency of data storage is improved, the data which is not required to be accelerated and written is sent to the second storage unit with larger storage data quantity in unit space for writing, the storage performance is improved on the premise that the total capacity of the solid state disk is not lost, the dynamic switching storage of the data request between the first storage unit and the second storage unit is realized, the writing response time of the solid state disk is effectively reduced, and the storage performance of the solid state disk is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
Fig. 1 is a schematic diagram illustrating an exemplary application system structure of a solid state disk data storage method in an embodiment of the disclosure.
Fig. 2 is a schematic diagram illustrating a method for storing data in a solid state disk according to an embodiment of the disclosure.
Fig. 3 is a diagram illustrating a comparison of architecture of a solid state disk data storage method according to an embodiment of the disclosure.
Fig. 4 is a schematic diagram illustrating a dynamic adjustment process of a proportion of data stored in a first storage unit of a solid state disk data storage method according to an embodiment of the disclosure.
Fig. 5 is a schematic diagram illustrating a data volume control process of a solid state disk data storage method in an embodiment of the disclosure.
Fig. 6 is a schematic diagram illustrating a process of determining a processing priority of a data request in a solid state disk data storage method according to an embodiment of the disclosure.
Fig. 7 is a schematic diagram illustrating another embodiment of a method for storing data in a solid state disk according to an embodiment of the disclosure.
Fig. 8 illustrates a schematic diagram of a solid state disk data storage device in an embodiment of the disclosure.
Fig. 9 is a block diagram illustrating a configuration of a computer device according to a solid state disk data storage method in an embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
The following detailed description of embodiments of the present disclosure refers to the accompanying drawings.
Fig. 1 illustrates an exemplary application system architecture to which a solid state disk data storage method according to an embodiment of the present disclosure may be applied. As shown in fig. 1, the system architecture may include a terminal device 101, a network 102, and a server 103.
The medium used by the network 102 to provide a communication link between the terminal device 101 and the server 103 may be a wired network or a wireless network.
Alternatively, the wireless network or wired network described above uses standard communication techniques and/or protocols. The network is typically the Internet, but may be any network including, but not limited to, a local area network (Local Area Network, LAN), metropolitan area network (Metropolitan Area Network, MAN), wide area network (Wide Area Network, WAN), mobile, wired or wireless network, private network, or any combination of virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including HyperText Mark-up Language (HTML), extensible markup Language (Extensible MarkupLanguage, XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as secure sockets layer (Secure Socket Layer, SSL), transport layer security (Transport Layer Security, TLS), virtual private network (Virtual Private Network, VPN), internet protocol security (Internet ProtocolSecurity, IPsec), etc. In other embodiments, custom and/or dedicated data communication techniques may also be used in place of or in addition to the data communication techniques described above.
The terminal device 101 may be a variety of electronic devices including, but not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, wearable devices, augmented reality devices, virtual reality devices, and the like.
Alternatively, the clients of the applications installed in different terminal devices 101 are the same or clients of the same type of application based on different operating systems. The specific form of the application client may also be different based on the different terminal platforms, for example, the application client may be a mobile phone client, a PC client, etc.
The server 103 may be a server providing various services, such as a background management server providing support for devices operated by the user with the terminal apparatus 101. The background management server can analyze and process the received data such as the request and the like, and feed back the processing result to the terminal equipment.
Optionally, the server may be an independent physical server, may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network ), and basic cloud computing services such as big data and an artificial intelligence platform, where the server may use a mechanical Hard Disk (HDD) or a Solid-State Drive (SSD), where the Solid-State Drive stores data through flash memory. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
Those skilled in the art will appreciate that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative, and that any number of terminal devices, networks, and servers may be provided as desired. The embodiments of the present disclosure are not limited in this regard.
Under the system architecture, the embodiment of the disclosure provides a solid state disk data storage method, which can be executed by any electronic device with computing processing capability.
In some embodiments, the solid state disk data storage method provided in the embodiments of the present disclosure may be executed by a terminal device of the above system architecture; in other embodiments, the solid state disk data storage method provided in the embodiments of the present disclosure may be executed by a server in the system architecture described above; in other embodiments, the method for storing solid state disk data provided in the embodiments of the present disclosure may be implemented by a terminal device and a server in the system architecture in an interactive manner.
As a file system designed for storing data on the flash memory of the solid state disk, the performance of the flash memory file system directly affects the data processing capability of the whole flash memory device, so how to provide the capability of rapidly and efficiently processing different types of data so as to improve the performance of the whole flash memory file system becomes a key for balancing the performance and efficiency of the whole flash memory system.
In order to improve performance of a solid state disk, an embodiment of the present disclosure provides a solid state disk data storage method. Fig. 2 is a schematic diagram of a solid state disk data storage method in an embodiment of the disclosure, where, as shown in fig. 2, the solid state disk data storage method provided in the embodiment of the disclosure is applied to a host end, and the host end is connected with the solid state disk in a communication manner; the solid state disk includes: a first storage unit and a second storage unit, wherein the storage rate of the first storage unit is greater than the storage rate of the second storage unit, and the unit space storage data volume of the second storage unit is greater than the unit space storage data volume of the first storage unit, the method comprises the following steps:
s202: receiving a data request, wherein the data request is used for writing data into the first storage unit or the second storage unit;
s204: determining a processing priority of the data request;
s206: and sending the data requested to be stored by the data request to a first storage unit or a second storage unit of the solid state disk according to the processing priority of the data request, so that the solid state disk writes the data into the first storage unit or the second storage unit.
In the embodiment of the disclosure, the first memory Cell may adopt a Single-Level Cell (SLC) memory mode, in which 1 memory Cell (Cell) stores 1 data, and the advantages are that the memory rate is fast, the power consumption is low, and the lifetime of the memory Cell is longer; the second memory Cell may adopt a triple-Level Cell (TLC) mode in which 3 data are stored in 1 memory Cell (Cell), and the corresponding storage rate may be slower than that of the SLC mode, but at a lower cost.
In a solid state disk SSD, a NAND flash memory is a data storage portion, and has a nonvolatile memory block that can still store data after power failure. When the first storage unit adopts an SLC storage mode and the second storage unit adopts a TLC mode, firstly receiving a data request; the data request may be sent by an application or by a user layer; then, judging the priority of the data request, and determining the processing priority of the data request; the processing priority is high priority and low priority; the data requested to be stored by the data request with high priority is sent to the first storage unit and stored in the SLC mode, the data request can be rapidly processed based on the SLC mode, the data requested to be stored is sent to the second storage unit for the data request with low priority, the data request with larger unit space is stored based on the TCL mode, the storage performance is improved on the premise that the total capacity of the solid state disk is not lost, and the dynamic switching storage of the data request between the first storage unit and the second storage unit is realized.
In a conventional solid state disk, there is a semantic gap between an I/O (Input/Output) interface of a storage block and a flash translation layer (FTL, flash Translation Layer), and a file system cannot fully utilize performance of an underlying flash memory. To address the above, as shown in fig. 3, embodiments of the present disclosure are implemented on an open channel SSD (Open Channel SSD) basis.
On the usage architecture of the conventional SSD, mainly includes: the users N1, the FS file system N2, the FTL flash translation layer N3 and the SSD N4.SSD N4 is in communication connection with flash translation layer FTL N3, FTL flash translation layer N3 is in communication connection with file system FS (File System) N2, FS file system N2 is in communication connection with application N1, wherein application N1 belongs to a user layer, and application is in communication connection with FS file system through POSIX (Portable Operating System Interface of UNIX, portable operating system interface); in the FS file system N2, it includes: two functions of data scheduling N21 and file security N22; the FS file system N2 obtains the information of the FTL flash memory conversion layer N3 in a sector reading mode, and the FS file system N2 sends the information to the FTL flash memory conversion layer N3 in a sector writing mode. In FTL flash translation layer N3, it includes: address mapping N31, garbage collection N32 and bad block management N33; FTL flash translation layer N3 and FS file system N2 belong to the kernel layer, in this disclosure one implementation at the host side; other embodiments may also be employed at the host end of the disclosure, all within the scope of the disclosure. The FTL flash memory conversion layer N3 is in communication connection with the SSD N4 in a mode of reading a page, erasing a block and writing the page; SSD N4 belongs to the hardware layer. In an SSD there are multiple memory blocks, which are used to store data.
As shown in fig. 4, when the method for storing solid state disk data provided by the embodiment of the present disclosure is implemented, in one embodiment, the method further includes:
s402: under the condition that the data requested to be stored by the data request is determined to be sent to a first storage unit of the solid state disk, acquiring the number of data requests written into the solid state disk in a target time period;
s404: determining the proportion of the solid state disk for storing data by adopting the first storage unit according to the data request number written into the solid state disk in the target time period, the residual capacity of the solid state disk and the residual capacity of the first storage unit;
s406: and according to the proportion of the solid state disk for storing data by adopting the first storage unit, sending the data requested to be stored by the data request to the first storage unit, so that the solid state disk writes the data into the first storage unit.
In an embodiment, on an open channel SSD usage architecture, the method mainly includes: the system comprises a user M1, a file system M2 based on an open channel SSD, an FTL M3 based on the open channel SSD, a LightNVM subsystem M4 and an open channel SSD M5. The open channel SSD M5 is in communication connection with the FTL M3 based on the open channel SSD through the LightNVM subsystem, the FTL M3 based on the open channel SSD is in communication connection with the file system M2 based on the open channel SSD, and the file system M2 of the open channel SSD is in communication connection with the application. The application M1 belongs to a user layer, and is in communication connection with a file system M2 based on an open channel SSD through POSIX; in the open channel SSD-based file system M2, there is included: three functions of data packet M21, address classification M22 and garbage collection M23; the file system M2 based on the open channel SSD is in communication connection with the FTL M3 based on the open channel SSD in a cooperative manner; FTL M3 based on the open channel SSD includes: two functions, device management M31 and address mapping M32; the file system M2 of the open channel SSD and FTL M3 based on the open channel SSD belong to a kernel layer, in this disclosure belong to an embodiment of the host side; other embodiments may also be employed at the host end of the disclosure, all within the scope of the disclosure. In an open channel SSD, the LightNVM subsystem M4 is integrated within the hardware layer, that is, the hardware layer includes: an open channel SSD M5 and a LightNVM subsystem M4, wherein the hardware layer is in communication connection with the kernel layer through a LightNVM interface; inside the hardware layer, a communication connection is performed between the LightNVM subsystem M4 and the open channel SSD M5 through a read/write/erase operation.
As shown in position P in fig. 3, compared with the conventional solid state disk, the Open Channel (Open Channel) SSD exposes the physical address and the operation interface inside the solid state disk to the host side, moves the key FTL (Flash Translation Layer ) functions (such as address mapping and I/O scheduling) to the kernel system (kernel system, including file system and FTL) at the host side, only part of necessary functions (such as error processing) remain in the device, and cooperates with the data packet function and the device management function to eliminate the semantic gap between the file system and FTL, and the FTL cooperates with the Open Channel SSD at the management bottom layer to map the upper layer request address directly to the corresponding physical address through the address mapping, so that the file system can directly manage the placement of data and remove the redundancy mapping; further, the FTL is responsible for managing information related to devices, such as states and working modes of the storage unit, and transmits the information to the file system through the I/O interface, so that the file system can make full use of device characteristics such as dual-mode switching of the SSD, after receiving an upper-layer erase command, the FTL only directly erases a corresponding sacrificial block, and other garbage collection operations are completed by the file system, so that performance and efficiency of the whole file system can be improved to a great extent.
Firstly, whether the data request is sent to a first storage unit or a second storage unit needs to be judged, and under the condition that the data requested to be stored by the data request is determined to be sent to the first storage unit of the solid state disk, the number of the data requests written into the solid state disk in a target time period is obtained; the target time period can be one day or a plurality of time periods such as a week, a month, a quarter, a year and the like, and the data request number written into the solid state disk in the target time period can be obtained through the statistical period by taking the target time period as the statistical period; then, determining the proportion of the solid state disk for storing data by adopting the first storage unit according to the data request number written into the solid state disk in the target time period, the residual capacity of the solid state disk and the residual capacity of the first storage unit; the residual capacity of the solid state disk and the residual capacity of the first storage unit can be obtained by monitoring the solid state disk in real time through a file system of a host side; and next, according to the proportion of the solid state disk for storing data by adopting the first storage unit, sending the data requested to be stored by the data request to the first storage unit so that the solid state disk writes the data into the first storage unit.
The embodiment of the disclosure eliminates the semantic gap between the file system and the FTL based on the SSD characteristic of the open channel, and removes the redundant mapping, so that the file system can fully utilize the SSD dual-mode switching device characteristic.
As shown in fig. 5, when the method for storing solid state disk data provided by the embodiment of the present disclosure is implemented, in one embodiment, the method further includes:
s502: determining a minimum threshold of the write data amount of the first storage unit according to the residual erase count of the first storage unit and the residual erase count of the second storage unit;
s504: and controlling the data volume of the data written into the first storage unit according to the minimum threshold value of the written data volume of the first storage unit.
In the embodiment, the SLC mode has higher writing performance, but the number of effective pages in the SLC mode is only one third of that in the TLC mode, and more erasing operations will be triggered under the same data size, so that the data size written into the SLC area needs to be limited to avoid excessive wear, and the minimum threshold of the writing data size of the first memory cell needs to be determined according to the remaining erasing count of the first memory cell adopting the SLC mode and the remaining erasing count of the second memory cell adopting the TLC mode, and then the minimum threshold of the writing data size of the first memory cell is used for controlling the data size of the data written into the first memory cell.
The embodiment of the disclosure adopts a novel flash memory block life cycle management mode, reasonably controls the data quantity written into an SLC mode area, and limits excessive wear caused by more SLC mode flash memory block erasing operation so as to ensure the balance between durability and performance.
And the high-efficiency switching of SLC and TLC modes is realized, and the overall performance of the flash memory file system is improved under the condition of not losing the total equipment capacity.
As shown in fig. 6, in the embodiment, the step S204 may include:
s602: acquiring heat information of the data request; the heat information is the access quantity of the data request in unit time;
s604: dividing the data request into a plurality of data types, and giving corresponding response priority to the plurality of data types obtained by dividing;
s606: and determining the processing priority of the data request according to the heat information of the data request and the corresponding response priority.
The heat information refers to heat information of initial group data, which can be divided into three groups of heat, warm and cold, and corresponding heat values can be set as 2, 1 and 0; when the heat information is hot, the data request has higher access quantity in unit time and needs to be subjected to acceleration processing, and when the heat information is cold, the data request has lower access quantity in unit time and does not need to be subjected to acceleration processing; when the heat information is warm, the access quantity of the data request in unit time is in a moderate state, and whether the data request is subjected to acceleration processing can be determined according to the state of the solid state disk; for example, when the storage task of the solid state disk exceeds a set threshold, the acceleration processing is not performed on the data request, and when the storage task of the solid state disk does not exceed the set threshold, the acceleration processing is performed on the data request. Further, dividing the data request into a plurality of data types, and giving corresponding response priority to the plurality of data types obtained by dividing; in one example, the file system semantics of the host side are utilized to divide the data request into five data types, and different response priorities are respectively given from high to low: checkpoint related data, foreground garbage collection related data, fsync system call related data, node data, and general write data; wherein the response priority is determined based on the extent to which the current request blocks subsequent requests. And next, determining the heat information and the corresponding response priority of the data request as the processing priority of the data request.
When the method for storing the solid state disk data provided by the embodiment of the present disclosure is implemented, in one embodiment, under the condition that it is determined that data requested to be stored by the data request is sent to the first storage unit of the solid state disk, obtaining the number of data requests written into the solid state disk in a target time period includes:
determining a benefit value obtained by writing data corresponding to the data request into the first storage unit according to the processing priority of the data request;
determining a profit threshold according to the residual capacity of the solid state disk and the residual capacity of the first storage unit;
judging whether the data requested to be stored by the data request is sent to the first storage unit or the second storage unit according to the benefit value and the benefit threshold;
and under the condition that the data requested to be stored by the data request is determined to be sent to the first storage unit of the solid state disk, acquiring the data request number written into the solid state disk in a target time period.
In an embodiment, it is first required to determine whether data of a data request is sent to a first storage unit or a second storage unit, and according to a processing priority of the data request, determining a benefit value obtained by writing the data of the data request into the first storage unit; determining a profit threshold according to the residual capacity of the solid state disk and the residual capacity of the first storage unit; since the remaining capacity of the first storage unit is dynamically changing, the benefit threshold is also dynamically changing; then, according to the benefit value and the benefit threshold value, judging whether the data requested to be stored by the data request is sent to the first storage unit or the second storage unit; if the profit value is greater than or equal to the profit threshold, indicating that the data request needs to be subjected to acceleration processing, determining that the data requested to be stored by the data request is sent to a first storage unit of the solid state disk; if the benefit value is smaller than the benefit threshold value, the fact that the data request does not need to be subjected to acceleration processing is indicated, the fact that the data requested to be stored by the data request is sent to a second storage unit of the solid state disk is determined, and the data request is written into a corresponding group to be written into the second storage unit according to an initial group. And finally, under the condition that the data requested to be stored by the data request is determined to be sent to the first storage unit of the solid state disk, acquiring the data request number written into the solid state disk in a target time period.
When the method for storing the solid state disk data provided by the embodiment of the present disclosure is implemented, in one embodiment, determining, according to a processing priority of the data request, a benefit value obtained by writing data corresponding to the data request to the first storage unit includes:
and adding the product of the response priority weight and the response priority of the data request with the heat information, and determining a benefit value obtained by writing the data corresponding to the data request into the first storage unit.
In an embodiment, the profit value obtained by writing the data to the first storage unit by the data request is determined as follows:
Z=Y+u×P (1)
z is a profit value obtained by writing data corresponding to the data request into the first storage unit; y is a heat value corresponding to the heat information; u is the weight of the response priority; p is the response priority.
When the method for storing the data of the solid state disk provided by the embodiment of the present disclosure is implemented, in one embodiment, determining, according to the number of data requests written into the solid state disk in the target period of time, the remaining capacity of the solid state disk and the remaining capacity of the first storage unit, a proportion of the solid state disk to store the data by using the first storage unit includes:
Determining the average total number of requests, the average number of read requests and the maximum depth of an input-output queue according to the number of data requests written into the solid state disk in the target time period;
and determining the proportion of the solid state disk for storing data by adopting the first storage unit according to the average total number of requests, the average number of reading requests, the maximum depth of the input and output queues, the residual capacity of the solid state disk and the residual capacity of the first storage unit.
In the embodiment, the high writing performance of the SLC mode can help to shorten the operation processing time and reduce the waiting time of subsequent requests, meanwhile, the SLC mode space is reasonably allocated according to the SLC mode area and the residual available capacity monitored by the file system in real time, performance fluctuation caused by rapid exhaustion of the SLC mode area is avoided, and the average total number of requests, the average number of reading requests and the maximum depth of the input and output queues are determined according to the obtained data request number written into the solid state disk in the target time period; the more the average request total number is, the more the current solid state disk is busy, the more the storage and writing tasks are, and the more the data requests are required to be processed in an acceleration way; furthermore, the residual capacity of the solid state disk and the residual capacity of the first storage unit need to be detected and obtained in real time through a file system of the host end, and then the proportion of the solid state disk for storing data by the first storage unit is determined by combining the average total number of requests, the average number of reading requests and the maximum depth of the input and output queues.
When the method for storing the data of the solid state disk provided by the embodiment of the present disclosure is implemented, in one embodiment, determining, according to an average request total number, an average read request number, a maximum depth of an input/output queue, a remaining capacity of the solid state disk, and a remaining capacity of the first storage unit, a proportion of the solid state disk to store the data by using the first storage unit includes:
multiplying a sum of a ratio of the average read request number to the average request total number and a ratio of the average request total number to the maximum depth of the input-output queue by a scale factor to determine a first coefficient; the scale factor is the ratio of the residual capacity of the first storage unit to the residual capacity of the solid state disk;
and determining the minimum value between the first coefficient and a preset constant as the proportion of the solid state disk for storing data by adopting a first storage unit.
In an embodiment, the first coefficient is determined as follows:
wherein γ is a first coefficient; q (Q) all Is the average total number of requests; q (Q) read Is the average number of read requests; l (L) queue Maximum depth for the input-output queue;is a scale factor; f (F) SLC A remaining capacity for the first storage unit; f (F) ALL The residual capacity of the solid state disk.
In an embodiment, the above scale factor may ensure that the first memory cell in SLC mode is not rapidly depleted.
In an embodiment, a proportion of the solid state disk to store data by using the first storage unit is determined according to the following manner:
λ=min(1,γ) (3)
wherein λ is SLC mode write ratio; gamma is a ratio coefficient; the min () function is used to return the minimum value in a given parameter table.
In an embodiment, the larger the proportion of the solid state disk that uses the first storage unit to store data, the larger the corresponding value of λ will be, and the more likely a subsequent new data request will be written into the first storage unit that uses SLC mode; the value range of the gamma is [0,2], in order to ensure that the ratio of writing into the first memory cell adopting the SLC mode is not more than 1, the minimum value of the gamma and the 1 is taken as the final writing ratio, and corresponding data is written into the first memory cell adopting the SLC mode according to the ratio.
The process of determining the proportion of the solid state disk stored data by adopting the first storage unit through the calculation can be equivalent to performing secondary filtering by utilizing the depth perception I/O intensity of the I/O queue.
When the method for storing the data of the solid state disk provided by the embodiment of the present disclosure is implemented, in one embodiment, according to a proportion of the solid state disk to store the data by using the first storage unit, sending the data requested to be stored by the data request to the first storage unit includes:
According to the proportion of the solid state disk for storing data by adopting the first storage unit, the duty ratio of the first storage unit in the solid state disk is adjusted, and the adjusted first storage unit is determined;
and sending the data requested to be stored by the data request to the adjusted first storage unit.
After the proportion of the solid state disk for storing data by adopting the first storage unit is obtained, the duty ratio of the first storage unit in the solid state disk is required to be adjusted, and the adjusted first storage unit is determined; specifically, the second storage unit in the TLC mode may be converted into the first storage unit in the SLC mode, where the conversion is implemented by using the device attribute of the open channel SSD. And after the adjustment of the duty ratio of the first storage unit is completed, sending the data requested to be stored by the data request to the adjusted first storage unit, so that the solid state disk writes the data into the first storage unit.
When the method for storing the solid state disk data provided by the embodiment of the present disclosure is implemented, in one embodiment, determining, according to the remaining erase count of the first storage unit and the remaining erase count of the second storage unit, a minimum threshold of a write data amount of the first storage unit includes:
Determining a writing quantity limiting condition according to the residual erasure count of the first storage unit and the residual erasure count of the second storage unit;
determining the writing budget of the current writing window according to the writing quantity limiting condition;
and determining a minimum threshold value of the written data quantity of the first storage unit according to the writing budget of the current writing window.
In the embodiment, the residual total erase count of the solid state disk is obtained through real-time monitoring of a host end; according to the residual total erase count of the solid state disk, the residual erase count of the first storage unit and the residual erase count of the second storage unit can be obtained; next, a writing quantity limiting condition is determined according to the remaining erase count of the first memory cell and the remaining erase count of the second memory cell.
When the method for storing the solid state disk data provided by the embodiment of the present disclosure is implemented, in one embodiment, determining a writing quantity limiting condition according to the remaining erase count of the first storage unit and the remaining erase count of the second storage unit includes:
acquiring all data written into the solid state disk, the data size of a flash memory block of a first storage unit and the data size of a flash memory block of a second storage unit;
And determining a writing quantity limiting condition according to all data written into the solid state disk, the data quantity of the flash memory block of the first storage unit and the data quantity of the flash memory block of the second storage unit and the erasing operation loss of the first storage unit.
In the embodiment, if the obtained remaining total erase count of the solid state disk is denoted as X, x= Σ i x i ,x i Remaining erase counts for flash block i; wherein the first memory cell and the second memory cell are formed by flash memory blocks.
Firstly, all data W written in the solid state disk can be obtained through the host side written The data size T of the flash memory block of the first memory cell and the data size S of the flash memory block of the second memory cell are based on the underlying principles of SLC mode and TLC mode, then s=0.33T;
then, to control the write amount to the SLC area, the remaining erase count used by the TLC mode is denoted by βX, and (1- βX) represents the remaining erase count used by the SLC modeThe wear of the SLC mode erase operation is α, the actual erase count that can be used by the SLC mode region is ((1- β) ×x)/α, and the data W of all the writing devices is obtained based on the open channel SSD statistics written The remaining data amount is found to be w=w min -W written The method comprises the steps of carrying out a first treatment on the surface of the Wherein W is min And the writing quantity is the minimum writing quantity of the solid state disk.
The minimum write quantity required to be ensured by SSD is W min Calculating a write budget for the first memory cells in SLC mode at the beginning of each write window, ensuring that the write amount for the first memory cells in SLC mode within one window does not exceed the write budget, and when the SSD lifetime is reached, the total write amount of the SSD should be no less than W min 。
Next, determining a writing quantity limiting condition according to all data written into the solid state disk, the data quantity of the flash memory block of the first storage unit and the data quantity of the flash memory block of the second storage unit and combining the erasing operation loss of the first storage unit; in particular to ensure a minimum write quantity W min The writing quantity limitation condition at the remaining total erase count X must be ensured.
In an embodiment, the writing amount limitation condition is determined as follows:
wherein X is the total erase count of the remainder of the open channel solid state disk; beta X is the remaining erase count used in TLC mode; beta is the duty ratio coefficient; t is TLC mode block; (1-beta) X is the remaining erase count for SLC mode use; s is an SLC mode block; w is the residual data quantity; alpha is the loss of SLC mode erase operation.
The writing amount limitation conditions described above can be modified to obtain:
the meaning of the characters in the above-described modification is the same as the meaning of the characters of the above-described writing amount limitation condition.
In an embodiment, determining a write budget for a current write window according to a write quantity constraint includes: and determining a first storage unit writing budget and a second storage unit writing budget of the current writing window according to the writing quantity limiting condition.
Determining a first storage unit write budget and a second storage unit write budget for a current write window as follows:
wherein W is TLC Writing a budget for a second storage unit of the current write window; w (W) SLC Writing a budget for a first storage unit of a current write window; psi is the current write window; beta is the duty ratio coefficient; t is the data size of the flash memory block of the second storage unit; s is the data size of the flash memory block of the first storage unit; alpha is the loss of SLC mode erase operation.
The final write budget is calculated by the above formula, the maximum number of SLC mode blocks is set to no more than 45% of the total number of flash blocks at the beginning, at least 8% of the total flash blocks are SLC mode regions, ensuring that there is always SLC mode pages to speed up the device, in which case the total capacity loss of the file system is only 3%.
The device can dynamically adjust the maximum number value of the SLC mode blocks according to the actual condition of the available space, and effectively ensures the balance between durability and performance.
The embodiment of the disclosure provides a scheme for improving the performance of a flash memory file system based on the characteristics of an open channel and a dual mode, a data management algorithm is designed through the semantics of an upper file system, hot data and high-priority data are put into an SLC mode area, the I/O strength is perceived by utilizing the depth of an I/O queue, the flash memory pages of the SLC mode are reasonably distributed, and the capacity of the SLC mode area can be dynamically adjusted according to the effective data of the file system, so that the performance of the flash memory is improved under the condition of not losing the capacity of the total equipment; and meanwhile, a novel life cycle management mode of the flash memory block is adopted, the data volume written into an SLC mode area is reasonably controlled, excessive wear caused by more erase operations of the flash memory block in the SLC mode is limited, and the balance between durability and performance is ensured.
Aiming at the technical characteristics that the mainstream commercial SSD storage units support multiple storage unit modes at present, the structure and advantages of an open channel SSD are used for reference, the function of an FTL (flash memory conversion layer) originally built in the SSD is moved to a host kernel system, the semantic gap between a file system and the FTL is effectively eliminated, redundant mapping is removed, the efficiency of garbage collection operation is improved, the file system of a solid state disk can be efficiently switched between SLC and TLC modes, and the performance and efficiency of the whole file system are improved. Aiming at the characteristics of high writing performance of SLC mode, small number of effective pages and large erasing times, two rules of SLC mode admission and SLC mode writing are provided for managing and controlling writing of SLC mode areas, queuing is carried out according to the heat degree, response priority and writing income value of writing data, the writing data quantity is controlled, the size of the SLC mode areas is dynamically adjusted, excessive abrasion is avoided, and good balance is achieved between performance and service life.
Based on the characteristic that the current mainstream solid state disk supports multiple storage unit modes, the characteristics of the open channel solid state disk are used for reference, the semantic gap between a file system and a flash memory conversion layer is eliminated, redundant mapping is removed, and the reading response time under different reading/writing ratios is effectively reduced; the heat and response priority are ordered according to the write-in data request, so that the high-priority data enter the SLC area to obtain priority high-speed processing, and the average performance can be improved by about 15%; the size of the SLC area is dynamically adjusted, excessive abrasion is avoided on the basis of improving the overall performance, the durability of equipment is accurately managed, and the availability and reliability of the whole file system are improved.
The method and the device can improve the performance and efficiency of the flash memory file system in the operator, realize the efficient life cycle management of storage resources, and promote the development, testing and landing of customized/self-grinding SSD parts
Based on the same inventive concept, another embodiment of a solid state disk data storage method is also provided in the embodiments of the present disclosure, as shown in fig. 7, applied to a solid state disk, where the solid state disk is in communication connection with a host end; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the method comprising:
Step S702: receiving data which is sent by the host end and is requested to be stored, and writing the data into the first storage unit or the second storage unit; the data which is requested to be stored is determined by the host according to the processing priority of the data request; the data request is received by the host side; the data request is for writing data to the first storage unit or the second storage unit.
In this embodiment, the host receives the data request, determines a processing priority of the data request, and sends the data to the first storage unit or the second storage unit according to the processing priority of the data request; and the solid state disk receives data sent by the host end and writes the data into the first storage unit or the second storage unit.
In this embodiment, the principle of solving the problem in this embodiment is similar to that in the embodiment applied to the host side, and therefore, the implementation of this embodiment may refer to the implementation of the embodiment of the method, and the repetition is omitted.
It should be noted that, in the technical solution of the present disclosure, the acquiring, storing, using, processing, etc. of data all conform to relevant regulations of national laws and regulations, and various types of data such as personal identity data, operation data, behavior data, etc. relevant to individuals, clients, crowds, etc. acquired in the embodiments of the present disclosure have been authorized.
Based on the same inventive concept, the embodiment of the disclosure also provides a solid state disk data storage device, as described in the following embodiment. Since the principle of solving the problem of the embodiment of the device is similar to that of the embodiment of the method, the implementation of the embodiment of the device can be referred to the implementation of the embodiment of the method, and the repetition is omitted.
FIG. 8 is a schematic diagram of a solid state disk data storage device according to an embodiment of the disclosure, as shown in FIG. 8, applied to a host, where the host is communicatively connected to a solid state disk; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the apparatus comprising:
a data request receiving module 801, configured to receive a data request, where the data request is used to write data to the first storage unit or the second storage unit;
a processing priority determination module 802, configured to determine a processing priority of the data request;
and the data sending and writing module 803 is configured to send data requested to be stored by the data request to the first storage unit or the second storage unit of the solid state disk according to the processing priority of the data request, so that the solid state disk writes the data into the first storage unit or the second storage unit.
The embodiment of the disclosure also provides a solid state disk data storage device, as described in the following embodiment. According to another aspect of the present disclosure, there is further provided a solid state disk data storage device, applied to a solid state disk, where the solid state disk is connected to a host in a communication manner; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the apparatus comprising:
the data receiving and writing module is used for receiving data which is sent by the host end and is requested to be stored, and writing the data into the first storage unit or the second storage unit; the data which is requested to be stored is determined by the host according to the processing priority of the data request; the data request is received by the host side; the data request is for writing data to the first storage unit or the second storage unit.
Here, the data request receiving module 801, the processing priority determining module 802, and the data transmitting/writing module 803 correspond to S202 to S206 in the method embodiment, and the modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in the method embodiment. It should be noted that the modules described above may be implemented as part of an apparatus in a computer system, such as a set of computer-executable instructions.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 900 according to such an embodiment of the present disclosure is described below with reference to fig. 9. The electronic device 900 shown in fig. 9 is merely an example and should not be construed to limit the functionality and scope of use of embodiments of the present disclosure in any way.
As shown in fig. 9, the electronic device 900 is embodied in the form of a general purpose computing device. Components of electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one storage unit 920, and a bus 930 connecting the different system components (including the storage unit 920 and the processing unit 910).
Wherein the storage unit stores program code that is executable by the processing unit 910 such that the processing unit 910 performs steps according to various exemplary embodiments of the present disclosure described in the above-described "exemplary methods" section of the present specification. For example, the processing unit 910 may perform the following steps of the method embodiment described above: the solid state disk data storage method is applied to a host end, and the host end is in communication connection with the solid state disk; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the method comprising:
Receiving a data request, wherein the data request is used for writing data into the first storage unit or the second storage unit;
determining a processing priority of the data request;
and sending the data requested to be stored by the data request to a first storage unit or a second storage unit of the solid state disk according to the processing priority of the data request, so that the solid state disk writes the data into the first storage unit or the second storage unit.
The storage unit 920 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 9201 and/or cache memory 9202, and may further include Read Only Memory (ROM) 9203.
The storage unit 920 may also include a program/utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The bus 930 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 900 may also communicate with one or more external devices 940 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 900, and/or any devices (e.g., routers, modems, etc.) that enable the electronic device 900 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 950. Also, electronic device 900 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 over the bus 930. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 900, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In particular, according to embodiments of the present disclosure, the process described above with reference to the flowcharts may be implemented as a computer program product comprising: and the computer program realizes the solid state disk data storage method when being executed by the processor.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium, which may be a readable signal medium or a readable storage medium, is also provided. On which a program product is stored which enables the implementation of the method described above of the present disclosure. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
More specific examples of the computer readable storage medium in the present disclosure may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In this disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Alternatively, the program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
In particular implementations, the program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the description of the above embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
Claims (17)
1. The solid state disk data storage method is characterized by being applied to a host end, wherein the host end is in communication connection with the solid state disk; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the method comprising:
receiving a data request, wherein the data request is used for writing data into the first storage unit or the second storage unit;
Determining a processing priority of the data request;
and sending the data requested to be stored by the data request to a first storage unit or a second storage unit of the solid state disk according to the processing priority of the data request, so that the solid state disk writes the data into the first storage unit or the second storage unit.
2. The method for storing data in a solid state disk of claim 1, further comprising: under the condition that the data requested to be stored by the data request is determined to be sent to a first storage unit of the solid state disk, acquiring the number of data requests written into the solid state disk in a target time period;
determining the proportion of the solid state disk for storing data by adopting the first storage unit according to the data request number written into the solid state disk in the target time period, the residual capacity of the solid state disk and the residual capacity of the first storage unit;
and according to the proportion of the solid state disk for storing data by adopting the first storage unit, sending the data requested to be stored by the data request to the first storage unit, so that the solid state disk writes the data into the first storage unit.
3. The method for storing data in a solid state disk of claim 2, further comprising:
determining a minimum threshold of the write data amount of the first storage unit according to the residual erase count of the first storage unit and the residual erase count of the second storage unit;
and controlling the data volume of the data written into the first storage unit according to the minimum threshold value of the written data volume of the first storage unit.
4. The method for storing solid state disk data according to claim 2, wherein determining the processing priority of the data request comprises:
acquiring heat information of the data request; the heat information is the access quantity of the data request in unit time;
dividing the data request into a plurality of data types, and giving corresponding response priority to the plurality of data types obtained by dividing;
and determining the processing priority of the data request according to the heat information of the data request and the corresponding response priority.
5. The method for storing data in a solid state disk according to claim 4, wherein, when determining that the data requested to be stored by the data request is sent to the first storage unit of the solid state disk, obtaining the number of data requests written into the solid state disk in the target period of time includes:
Determining a benefit value obtained by writing data corresponding to the data request into the first storage unit according to the processing priority of the data request;
determining a profit threshold according to the residual capacity of the solid state disk and the residual capacity of the first storage unit;
judging whether the data requested to be stored by the data request is sent to the first storage unit or the second storage unit according to the benefit value and the benefit threshold;
and under the condition that the data requested to be stored by the data request is determined to be sent to the first storage unit of the solid state disk, acquiring the data request number written into the solid state disk in a target time period.
6. The method for storing solid state disk data according to claim 5, wherein determining, according to the processing priority of the data request, a benefit value obtained by writing data corresponding to the data request to the first storage unit includes:
and adding the product of the response priority weight and the response priority of the data request with the heat information, and determining a benefit value obtained by writing the data corresponding to the data request into the first storage unit.
7. The method for storing data in a solid state disk according to claim 2, wherein determining, according to the number of data requests written in the solid state disk in the target period of time, the remaining capacity of the solid state disk and the remaining capacity of the first storage unit, a proportion of the solid state disk to store data in the first storage unit includes:
Determining the average total number of requests, the average number of read requests and the maximum depth of an input-output queue according to the number of data requests written into the solid state disk in the target time period;
and determining the proportion of the solid state disk for storing data by adopting the first storage unit according to the average total number of requests, the average number of reading requests, the maximum depth of the input and output queues, the residual capacity of the solid state disk and the residual capacity of the first storage unit.
8. The method for storing data in a solid state disk according to claim 7, wherein determining a proportion of data stored in the solid state disk by using the first storage unit according to an average request total number, an average read request number, a maximum depth of an input/output queue, a remaining capacity of the solid state disk, and a remaining capacity of the first storage unit comprises:
multiplying a sum of a ratio of the average read request number to the average request total number and a ratio of the average request total number to the maximum depth of the input-output queue by a scale factor to determine a first coefficient; the scale factor is the ratio of the residual capacity of the first storage unit to the residual capacity of the solid state disk;
and determining the minimum value between the first coefficient and a preset constant as the proportion of the solid state disk for storing data by adopting a first storage unit.
9. The method for storing data in a solid state disk according to claim 2, wherein sending the data requested to be stored by the data request to the first storage unit according to the proportion of the solid state disk to store the data using the first storage unit comprises:
according to the proportion of the solid state disk for storing data by adopting the first storage unit, the duty ratio of the first storage unit in the solid state disk is adjusted, and the adjusted first storage unit is determined;
and sending the data requested to be stored by the data request to the adjusted first storage unit.
10. The method of claim 3, wherein determining the minimum threshold for the amount of write data for the first storage unit based on the remaining erase count for the first storage unit and the remaining erase count for the second storage unit comprises:
determining a writing quantity limiting condition according to the residual erasure count of the first storage unit and the residual erasure count of the second storage unit;
determining the writing budget of the current writing window according to the writing quantity limiting condition;
and determining a minimum threshold value of the written data quantity of the first storage unit according to the writing budget of the current writing window.
11. The method of claim 10, wherein determining the write-quantity limitation condition based on the remaining erase count of the first storage unit and the remaining erase count of the second storage unit comprises:
acquiring all data written into the solid state disk, the data size of a flash memory block of a first storage unit and the data size of a flash memory block of a second storage unit;
and determining a writing quantity limiting condition according to all data written into the solid state disk, the data quantity of the flash memory block of the first storage unit and the data quantity of the flash memory block of the second storage unit and the erasing operation loss of the first storage unit.
12. The method for storing data in a solid state disk according to any one of claims 1 to 11, wherein the first storage unit adopts a single-level cell SLC storage mode, and the second storage unit adopts a three-level cell TLC storage mode.
13. The solid state disk data storage method is characterized by being applied to a solid state disk, wherein the solid state disk is in communication connection with a host end; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the method comprising:
Receiving data which is sent by the host end and is requested to be stored, and writing the data into the first storage unit or the second storage unit; the data which is requested to be stored is determined by the host according to the processing priority of the data request; the data request is received by the host side; the data request is for writing data to the first storage unit or the second storage unit.
14. The solid state disk data storage device is characterized by being applied to a host end, wherein the host end is in communication connection with a solid state disk; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the apparatus comprising:
a data request receiving module, configured to receive a data request, where the data request is used to write data to the first storage unit or the second storage unit;
a processing priority determining module, configured to determine a processing priority of the data request;
and the data sending and writing module is used for sending the data requested to be stored by the data request to the first storage unit or the second storage unit of the solid state disk according to the processing priority of the data request so as to enable the solid state disk to write the data into the first storage unit or the second storage unit.
15. The solid state disk data storage device is characterized by being applied to a solid state disk, and the solid state disk is in communication connection with a host end; the solid state disk includes: a first storage unit and a second storage unit, the first storage unit having a storage rate greater than a storage rate of the second storage unit, the second storage unit having a unit-space storage data volume greater than a unit-space storage data volume of the first storage unit, the apparatus comprising:
the data receiving and writing module is used for receiving data which is sent by the host end and is requested to be stored, and writing the data into the first storage unit or the second storage unit; the data which is requested to be stored is determined by the host according to the processing priority of the data request; the data request is received by the host side; the data request is for writing data to the first storage unit or the second storage unit.
16. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform a solid state disk data storage method of any one of claims 1 to 12 or claim 13 via execution of the executable instructions.
17. A computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements a solid state disk data storage method as claimed in any one of claims 1 to 12 or claim 13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310587500.9A CN117032557A (en) | 2023-05-23 | 2023-05-23 | Solid state disk data storage method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310587500.9A CN117032557A (en) | 2023-05-23 | 2023-05-23 | Solid state disk data storage method and device, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117032557A true CN117032557A (en) | 2023-11-10 |
Family
ID=88637909
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310587500.9A Pending CN117032557A (en) | 2023-05-23 | 2023-05-23 | Solid state disk data storage method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117032557A (en) |
-
2023
- 2023-05-23 CN CN202310587500.9A patent/CN117032557A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11068409B2 (en) | Method and system for user-space storage I/O stack with user-space flash translation layer | |
US9952970B2 (en) | Cache allocation for disk array | |
US10412170B2 (en) | Retention-based data management in a network-based data store | |
US8521986B2 (en) | Allocating storage memory based on future file size or use estimates | |
US9760392B1 (en) | Adaptive throttling in hybrid storage environments | |
CN107688437B (en) | Solid state memory capacity management system and method | |
US11500577B2 (en) | Method, electronic device, and computer program product for data processing | |
US11079968B1 (en) | Queue management in multi-site storage systems | |
US20180285012A1 (en) | Apparatus and method for accessing storage system that includes a plurality of storage devices with different access speeds | |
WO2020088525A1 (en) | Systems and methods for storage medium management | |
CN112346647B (en) | Data storage method, device, equipment and medium | |
CN114548426A (en) | Asynchronous federal learning method, business service prediction method, device and system | |
US11470144B1 (en) | Optimization-based pool protection for a cloud provider network | |
US20200218646A1 (en) | System and method of fpga-executed flash translation layer in multiple solid state drives | |
CN116529695A (en) | Enhanced application performance using storage system optimization | |
WO2021012795A1 (en) | Network node scheduling method and apparatus, electronic device and storage medium | |
CN105068875A (en) | Intelligence data processing method and apparatus | |
US9747028B1 (en) | Artificial memory pressure for low memory machine | |
US20190317670A1 (en) | Distributing data across a mixed data storage center | |
US11137923B2 (en) | Method and system for data reduction in a storage infrastructure to support a high-ration thin-provisioned service | |
CN117032557A (en) | Solid state disk data storage method and device, storage medium and electronic equipment | |
CN111510479A (en) | Resource allocation method and device for heterogeneous cache system | |
CN111857547B (en) | Method, apparatus and computer readable medium for managing data storage | |
WO2023151465A1 (en) | Method for adjusting specification parameter of ssd and related product | |
US20240320170A1 (en) | Method, device, and computer program product for data access |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |