CN114791790B - SSD (solid State disk) reading performance optimization method and device, storage medium and storage equipment - Google Patents

SSD (solid State disk) reading performance optimization method and device, storage medium and storage equipment Download PDF

Info

Publication number
CN114791790B
CN114791790B CN202210708003.5A CN202210708003A CN114791790B CN 114791790 B CN114791790 B CN 114791790B CN 202210708003 A CN202210708003 A CN 202210708003A CN 114791790 B CN114791790 B CN 114791790B
Authority
CN
China
Prior art keywords
reading
read
grade
data
target
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.)
Active
Application number
CN202210708003.5A
Other languages
Chinese (zh)
Other versions
CN114791790A (en
Inventor
宛丽娟
薛红军
蒲强
孟欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dera Technology Co Ltd
Original Assignee
Beijing Dera Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dera Technology Co Ltd filed Critical Beijing Dera Technology Co Ltd
Priority to CN202210708003.5A priority Critical patent/CN114791790B/en
Publication of CN114791790A publication Critical patent/CN114791790A/en
Application granted granted Critical
Publication of CN114791790B publication Critical patent/CN114791790B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

The invention relates to the technical field of data storage, and provides a method and a device for optimizing SSD (solid State disk) reading performance, a storage medium and a storage device, wherein the method comprises the following steps: dividing the reading mode of the flash memory chip into different reading grades according to the difference of the data quantity loaded when the reading command is executed; when the SSD is accessed, a target reading level matched with a reading command in a current access mode is obtained; and executing the read operation on the flash memory chip by adopting a read mode corresponding to the target read grade. The invention can solve the problem of larger SSD reading performance difference in different modes, ensures that the SSD has good performance indexes in different access modes, further improves the SSD reading performance and provides better use experience for users.

Description

SSD (solid State disk) reading performance optimization method and device, storage medium and storage equipment
Technical Field
The invention relates to the technical field of data storage, in particular to a method and a device for optimizing SSD (solid State disk) reading performance, a storage medium and storage equipment.
Background
A flash memory chip has several die (or luns, each die has several planes, each plane has several blocks, each block has several pages, in the chip, each plane has its own independent buffer space (cache register), the size of which is equal to the size of one page, when reading nand, the data of nand page is read (loaded) from the flash memory medium to the cache, and then transmitted to the main control as required, the flash memory supports 4K and single-page (single-plane) operations, and generally supports multi-plane (multi-plane) or double-plane (multi-page dual-plane) concurrent operations, for reading, the multi-plane operation is used, the page data on two different planes can be loaded into the respective cache registers at one flash memory reading time, so that the data of two pages is read at one flash memory reading time, and the reading speed is increased, the read performance of the partial access mode may be improved, but not for all access modes, and for small granularity random reads, using multi-page concurrency may reduce performance, because a multi-page read operation will send page selection commands in sequence with a time gap between each page selection.
In the prior art, multiple-page concurrent reading operation of flash is basically used, so that the sequential reading bandwidth of large-block data can be improved to 2 times or more of that of a single-page mode, but the random reading performance of small-block data is not ideal; for small blocks of data, there are also solutions proposed for this access mode, such as changing the conventional serial operation of random reading to parallel operation.
Therefore, the prior art scheme has a single use method, and although the read-write performance under a certain use scene or access mode can be improved, the read performance under various different access modes cannot be considered. Under different access modes, the SSD reading performance difference is large, and the use experience of a user is influenced.
Disclosure of Invention
In view of the above, the present invention has been made to provide an SSD read performance optimization method, apparatus, storage medium and storage device that overcome or at least partially solve the above-mentioned problems.
In one aspect of the present invention, a method for optimizing SSD read performance is provided, the method comprising:
dividing the reading mode of the flash memory chip into different reading grades according to the difference of the data quantity loaded when the reading command is executed;
when the SSD is accessed, a target reading level matched with a reading command in a current access mode is obtained;
and executing the read operation on the flash memory chip by adopting a read mode corresponding to the target read grade.
Further, the data amount loaded in the reading modes corresponding to different reading levels is sequentially increased along with the increase of the reading levels.
Further, when the current access mode is random read access, the obtaining of the target read rank matched with the read command in the current access mode includes:
and selecting a target reading grade matched with the read command according to the data block length of the read data corresponding to the single read command.
Further, dividing the reading mode of the flash memory chip into different reading levels according to the difference of the data amount loaded when the reading command is executed, including:
when the data volume loaded when executing the read command is 4K, the reading mode of the flash memory chip is a first level;
when the data volume loaded during the execution of the read command is data of one physical page, the reading mode of the flash memory chip is a second level;
when the data volume loaded during the execution of the read command is data of two physical pages, the reading mode of the flash memory chip is a third level;
when the data size loaded when executing the read command is data of four physical pages, the read mode of the flash memory chip is the fourth level.
Further, the selecting a target reading level matched with the read command according to the data block length of the read data corresponding to the single read command includes:
when the length of the data block is less than or equal to 4K, selecting a first grade as a target reading grade; when the length of the data block is larger than 4K and is smaller than or equal to the data of one physical page, selecting a second grade as a target reading grade; when the length of the data block is larger than the data of one physical page and is smaller than or equal to the data of four physical pages, selecting a third grade as a target reading grade; and when the length of the data block is larger than the data of the four physical pages, selecting the fourth grade as a target reading grade.
Further, when the current access mode is continuous read access, the obtaining of the target read rank matched with the read command in the current access mode includes:
when a first read command is received, recording the physical address of the first read command;
judging whether the physical addresses of the first read command and the adjacent previous read command are continuous, if so, accumulating hit statistics values, wherein the hit statistics values represent the continuous distribution number of the corresponding physical addresses in the continuous read commands;
when the accumulated hit statistic value is smaller than a first preset threshold value, selecting a reading grade matched with the first reading command as a target reading grade according to the data block length of the read data corresponding to the first reading command;
and when the accumulated hit statistic value is greater than or equal to a first preset threshold value, selecting a reading grade corresponding to the belonged value interval as a target reading grade according to the value interval of the hit statistic value.
Further, the selecting, according to the value interval of the hit statistic value, the reading grade corresponding to the value interval to which the hit statistic value belongs as the target reading grade includes:
and when the accumulated hit statistic value is greater than or equal to a first preset threshold value and less than a second preset threshold value, selecting a higher level of the second level and the target reading level corresponding to the previous read command as the target reading level matched with the first read command.
Further, the method further comprises:
and when the accumulated hit statistic value is greater than or equal to a second preset threshold value and less than a third preset threshold value, selecting a higher one of the third grade and the target reading grade corresponding to the previous read command as the target reading grade matched with the first read command.
Further, the method further comprises:
and when the accumulated hit statistic value is greater than or equal to a third preset threshold value, selecting a fourth grade as a target reading grade matched with the first reading command.
In a second aspect, the present invention further provides an SSD read performance optimization device, which includes:
the configuration module is used for dividing the reading mode of the flash memory chip into different reading grades according to the difference of the data quantity loaded when the reading command is executed;
the acquisition module is used for acquiring a target reading grade matched with the reading command in the current access mode when the SSD is accessed;
and the data reading module is used for executing reading operation on the flash memory chip by adopting a reading mode corresponding to the target reading grade.
In a third aspect, the present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the SSD read performance optimization method as above.
In a fourth aspect, the present invention also provides a storage device, including a storage controller, where the storage controller includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the SSD read performance optimization method when executing the computer program.
According to the SSD reading performance optimization method, the SSD reading performance optimization device, the storage medium and the storage equipment, the matched target reading grade can be obtained for the reading command according to the current access mode of the SSD; the reading mode corresponding to the target reading grade is adopted to execute reading operation on the flash memory chip, the problem that the SSD reading performance difference under different modes is large is solved, good performance indexes of the SSD under different access modes are guaranteed, the SSD reading performance is further improved, and better use experience is provided for users.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of an SSD read performance optimization method according to an embodiment of the invention;
fig. 2 is a block diagram of an SSD read performance optimization apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The performance indexes of the SSD generally include an IOPS (input output operations per second, which reflects a random read/write performance), a throughput (throughput, which reflects a sequential read/write performance, in MB/s units), and a response time/delay. The access mode is considered in the design of the performance test: (ii) random and sequential data command requests: it means that the LBA (logical address) of the two commands before and after are not consecutive, the consecutive address is called sequential, and the discontinuous address is called random. Block size (Block size): i.e., the data length of a single command transmission, performance tests vary from 4KB to 512 KB. Random testing is typically performed with small blocks of data, such as 4 KB; sequential testing typically uses large blocks of data, such as 512 KB.
The invention provides a reading performance optimization scheme aiming at different SSD access modes, and the reading performance optimization of the SSD can be realized in the different access modes.
Fig. 1 schematically shows a flowchart of an SSD read performance optimization method of one embodiment of the invention. Referring to fig. 1, the SSD read performance optimization method according to the embodiment of the present invention specifically includes the following steps:
and S11, dividing the reading mode of the flash memory chip into different reading grades according to the difference of the data quantity loaded when the reading command is executed.
In this embodiment, the reading modes of the flash memory chip are divided into different reading levels according to different operation modes of the nand flash memory chip. The reading method specifically comprises four reading levels, namely a first-level GRD0, a second-level GRD1, a third-level GRD2 and a fourth-level GRD3, wherein the reading levels are sequentially increased, and the higher the reading level is, the larger the data volume of the read data in each reading operation of the corresponding reading mode is.
And S12, when the SSD is accessed, acquiring a target reading level matched with the reading command in the current access mode.
And S13, executing read operation on the flash memory chip by adopting a read mode corresponding to the target read level.
The SSD reading performance optimization method provided by the embodiment of the invention can acquire the matched target reading grade for the reading command according to the current access mode of the SSD, and adopts the reading mode corresponding to the target reading grade to execute the reading operation on the flash memory chip, thereby solving the problem of larger SSD reading performance difference in different modes, ensuring that the SSD can have good performance indexes in different access modes, further improving the SSD reading performance and providing better use experience for users.
In the embodiment of the invention, the data amount loaded under the reading modes corresponding to different reading levels is sequentially increased along with the increase of the reading levels.
Further, the specific implementation manner of dividing the reading manner of the flash memory chip into different reading levels according to the difference of the data amount loaded when the read command is executed in step S11 includes the following steps:
when the data size loaded when executing the read command is 4K, the read mode of the flash memory chip is the first level GRD 0; when the data size loaded during the execution of the read command is data of one physical page, the read mode of the flash memory chip is the second-level GRD 1; when the data size loaded when executing the read command is data of two physical pages, the read mode of the flash memory chip is the third level GRD 2; when the amount of data loaded when executing the read command is four physical pages of data, the flash memory chip is read in the fourth level GRD 3.
Specifically, for a single read command, the data amount loaded in the following read command level is sequentially increased.
R GRD 0: only loading (load) 4K data in each read command;
② GRD 1: loading data of one page in each read command;
③ GRD 2: loading data of two pages in each read command;
GRD 3: four pages of data are loaded per read command.
In an embodiment of the present invention, when the current access mode is random read access, the obtaining a target read rank matched with a read command in the current access mode includes: and selecting a target reading grade matched with the read command according to the data block length of the read data corresponding to the single read command.
Further, the specific implementation manner of selecting the target reading level matched with the read command according to the data block length of the read data corresponding to the single read command includes the following steps: when the length of the data block is less than or equal to 4K, selecting a first grade as a target reading grade; when the length of the data block is larger than 4K and is smaller than or equal to the data of one physical page, selecting a second grade as a target reading grade; when the length of the data block is larger than the data of one physical page and is smaller than or equal to the data of four physical pages, selecting a third grade as a target reading grade; and when the length of the data block is larger than the data of the four physical pages, selecting the fourth grade as a target reading grade.
In the embodiment of the present invention, a target reading level matched with a read command may be selected according to a data block length (i.e., a data block size) corresponding to a single read command, and the specific selection principle is as follows: reading nand by using GRD0 as target reading grade when the size of the data block is less than or equal to 4K, reading nand by using GRD1 as target reading grade when the size of the data block is more than 4K and less than or equal to single page data, and reading nand by using GRD2 as target reading grade when the size of the data block is more than the single page data amount and less than or equal to multi page data; and when the data block size is larger than the multi page data, using the GRD3 as a target reading level to read the nand. Meanwhile, when each READ command is processed, the obtained target READ level is recorded as READ _ grad _ 1.
In another embodiment of the present invention, when the current access mode is continuous read access, the specific implementation manner of obtaining the target read level matched with the read command in the current access mode includes the following steps:
when a first read command is received, recording the physical address of the first read command;
judging whether the physical addresses of the first read command and the adjacent previous read command are continuous, and if so, accumulating hit statistics (read hit) which indicate the continuous distribution number of the corresponding physical addresses in the continuous read command;
and determining an acquisition mode of the target reading grade according to the value range of the hit statistic value, and acquiring the target reading grade matched with the read command.
In this embodiment, when each READ command is processed, the obtained target READ rank is recorded as READ _ grant _1, so that when an adjacent next READ command is processed, the target READ rank corresponding to the previous READ command is referred to.
Specifically, determining an obtaining mode of a target reading level according to a value interval of the hit statistic value, and obtaining the target reading level matched with the read command specifically includes: when the accumulated hit statistic value is smaller than a first preset threshold value, selecting a reading grade matched with the first reading command as a target reading grade according to the data block length of the data read corresponding to the first reading command; and when the accumulated hit statistic value is greater than or equal to a first preset threshold value, selecting a reading grade corresponding to the value section of the hit statistic value as a target reading grade according to the value section of the hit statistic value.
Further, the method further comprises: when the accumulated hit statistics is greater than or equal to a first preset threshold and less than a second preset threshold, selecting a higher one of the second level and a target READ level (i.e., READ _ grant _1 recorded by the system) corresponding to the previous READ command as a target READ level matched with the first READ command.
Further, the method further comprises: and when the accumulated hit statistic value is greater than or equal to a second preset threshold value and less than a third preset threshold value, selecting a higher one of the third grade and the target reading grade corresponding to the previous read command as the target reading grade matched with the first read command.
Further, the method further comprises: and when the accumulated hit statistic value is greater than or equal to a third preset threshold value, selecting a fourth grade as a target reading grade matched with the first reading command.
In a specific example, the target read rank of the current read command may be obtained according to a hit statistic (read hit) of the historical read commands, and the specific method is as follows:
1. when a read command sent by a host is received, recording a physical address PBA (physical block address) of the current read command, and simultaneously judging whether the PBA is continuous with the PBA of the previous read command;
2. if the current PBA is continuous with the PBA of the previous read command, the read hit is accumulated once; if not, clearing the read hit value to 0;
3. comparing the read hit value with a preset threshold, wherein the preset threshold can be obtained according to an actual use test:
a. if the read hit value is less than the first preset threshold TH 1: and acquiring a target reading grade according to the size of the data block of the command, namely selecting the reading grade matched with the read command as the target reading grade according to the length of the data block of the read data corresponding to the read command.
b. If the read hit value is greater than the first preset threshold TH1 and less than the second preset threshold TH 2: the target READ rank for reading nand selects the higher rank of the above GRD1 and READ _ grad _1 as the target READ rank to READ nand.
c. If the read hit value is greater than the second predetermined threshold TH2 and less than the third predetermined threshold TH 3: the target READ rank for reading nand selects the higher rank of the above GRD2 and READ _ grad _1 as the target READ rank to READ nand.
d. If the read hit value is greater than the third preset threshold TH 3: then nand is read using GRD3 as the target read level.
According to the practical use experience of nand, when the small granularity (smaller than the single page data size) is read randomly, by using the two methods provided by the invention, the GRD0 or the GRD1 is correspondingly used for reading nand according to the granularity of the read command, so that the performance reduction caused by loading redundant data in the use scene is avoided; for random reading and sequential reading with large grain size, according to the read hit statistic method provided by the invention, the GRD2 or GRD3 is correspondingly used for reading nand, so that the advantage of parallel operation of nand multiple pages can be fully utilized, and the reading performance is improved.
The SSD reading performance optimization method provided by the embodiment of the invention has the following beneficial effects:
1. according to the invention, the read grade is divided according to the nand characteristics, namely the difference of the data quantity loaded when the read command is executed, and the read performance under all access modes can be improved by using different grades to read the nand in different use scenes.
2. The invention judges the grade of the read command in a mode of combining the two schemes according to the size of the data block and the read hit statistic value, and the read grade is more accurately judged.
3. According to the method provided by the invention, the reading performance has rising amplitude in various SSD access modes.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Fig. 2 schematically shows a structural diagram of an SSD read performance optimization device according to an embodiment of the present invention. Referring to fig. 2, the SSD read performance optimization apparatus according to the embodiment of the present invention specifically includes a configuration module 201, an obtaining module 202, and a data reading module 203, where:
a configuration module 201, configured to divide the reading mode of the flash memory chip into different reading levels according to different data amounts loaded when the read command is executed;
an obtaining module 202, configured to obtain, when performing SSD access, a target read level that matches a read command in a current access mode;
and the data reading module 203 is configured to perform a read operation on the flash memory chip in a reading manner corresponding to the target reading level.
In the embodiment of the invention, the data loading amount under the reading modes corresponding to different reading levels is sequentially increased along with the increase of the reading levels.
In this embodiment of the present invention, the configuration module 201 is specifically configured to set a reading mode of the flash memory chip to a first level when the amount of loaded data is 4K when the read command is executed; when the data volume loaded during the execution of the read command is data of one physical page, the reading mode of the flash memory chip is a second level; when the data size loaded during the execution of the read command is the data of two physical pages, the reading mode of the flash memory chip is a third grade; when the data size loaded when executing the read command is data of four physical pages, the read mode of the flash memory chip is the fourth level.
In this embodiment of the present invention, when the current access mode is random read access, the obtaining module 202 is configured to select a target read level matching a read command according to a data block length of read data corresponding to a single read command, and specifically includes: when the length of the data block is less than or equal to 4K, selecting a first grade as a target reading grade; when the length of the data block is larger than 4K and is smaller than or equal to the data of one physical page, selecting a second grade as a target reading grade; when the length of the data block is larger than the data of one physical page and is smaller than or equal to the data of four physical pages, selecting a third grade as a target reading grade; and when the length of the data block is larger than the data of the four physical pages, selecting the fourth grade as a target reading grade.
In this embodiment of the present invention, when the current access mode is continuous read access, the obtaining module 202 is configured to record a physical address of a first read command when the first read command is received; judging whether the physical addresses of the first read command and the adjacent previous read command are continuous, if so, accumulating hit statistics values, wherein the hit statistics values represent the continuous distribution number of the corresponding physical addresses in the continuous read commands; determining an obtaining mode of a target reading grade according to a value interval of the hit statistic value, and obtaining the target reading grade matched with the read command, wherein the obtaining mode specifically comprises the following steps: and when the accumulated hit statistic value is greater than or equal to the first preset threshold value, selecting the reading grade corresponding to the belonged value interval as the target reading grade according to the value interval of the hit statistic value.
Further, the obtaining module 202 is further configured to select a higher one of the second level and the target read level corresponding to the previous read command as a target read level matched with the first read command when the accumulated hit statistic is greater than or equal to a first preset threshold and is smaller than a second preset threshold.
Further, the obtaining module 202 is further configured to select a higher level of the third level and the target read level corresponding to the previous read command as the target read level matched with the first read command when the accumulated hit statistic is greater than or equal to a second preset threshold and is less than a third preset threshold.
Further, the obtaining module 202 is further configured to select a fourth level as a target reading level matched with the first read command when the accumulated hit statistic is greater than or equal to a third preset threshold.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the SSD read performance optimization method described above.
In this embodiment, if the SSD read performance optimization method is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
In addition, an embodiment of the present invention further provides a storage device, including a storage controller, where the storage controller includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the program, the processor implements the steps of the SSD read performance optimization method. Such as steps S11-S13 shown in FIG. 1.
In a specific embodiment, the storage device is a Solid State Disk (SSD).
According to the SSD reading performance optimization method, the SSD reading performance optimization device, the storage medium and the storage equipment, the matched target reading grade can be obtained for the reading command according to the current access mode of the SSD; the reading mode corresponding to the target reading grade is adopted to execute reading operation on the flash memory chip, the problem that the SSD reading performance difference under different modes is large is solved, good performance indexes of the SSD under different access modes are guaranteed, the SSD reading performance is further improved, and better use experience is provided for users.
Moreover, those of skill in the art will appreciate that while some embodiments herein include some features included in other embodiments, not others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, any of the claimed embodiments may be used in any combination.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A method of SSD read performance optimization, the method comprising:
dividing the reading mode of the flash memory chip into different reading grades according to the difference of the data quantity loaded when the reading command is executed;
when the SSD is accessed, a target reading level matched with a reading command in a current access mode is obtained;
executing read operation on the flash memory chip by adopting a read mode corresponding to the target read grade;
when the current access mode is continuous read access, the obtaining of the target read level matched with the read command in the current access mode includes:
when a first read command is received, recording the physical address of the first read command;
judging whether the physical addresses of the first read command and the adjacent previous read command are continuous, if so, accumulating hit statistics values, wherein the hit statistics values represent the continuous distribution number of the corresponding physical addresses in the continuous read commands;
when the accumulated hit statistic value is smaller than a first preset threshold value, selecting a reading grade matched with the first reading command as a target reading grade according to the data block length of the read data corresponding to the first reading command;
and when the accumulated hit statistic value is greater than or equal to a first preset threshold value, selecting a reading grade corresponding to the value section of the hit statistic value as a target reading grade according to the value section of the hit statistic value.
2. The method of claim 1, wherein the data amount loaded in the reading modes corresponding to different reading levels is sequentially increased with the increase of the reading level.
3. The method of claim 1, wherein when the current access mode is random read access, the obtaining the target read level matching the read command in the current access mode comprises:
and selecting a target reading grade matched with the read command according to the data block length of the read data corresponding to the single read command.
4. The method of claim 3, wherein dividing the read mode of the flash memory chip into different read levels according to the amount of data loaded when executing the read command comprises:
when the loaded data volume is 4K when the read command is executed, the reading mode of the flash memory chip is a first level;
when the data volume loaded during the execution of the read command is data of one physical page, the reading mode of the flash memory chip is a second level;
when the data volume loaded during the execution of the read command is data of two physical pages, the reading mode of the flash memory chip is a third level;
when the data size loaded when executing the read command is data of four physical pages, the read mode of the flash memory chip is the fourth level.
5. The method of claim 4, wherein selecting the target read rank matching the read command according to the data block length of the read data corresponding to the single read command comprises:
when the length of the data block is less than or equal to 4K, selecting a first grade as a target reading grade; when the length of the data block is larger than 4K and is smaller than or equal to the data of one physical page, selecting a second grade as a target reading grade; when the length of the data block is larger than the data of one physical page and is smaller than or equal to the data of four physical pages, selecting a third grade as a target reading grade; and when the length of the data block is larger than the data of the four physical pages, selecting the fourth grade as a target reading grade.
6. The method of claim 1, wherein selecting, as the target reading level, the reading level corresponding to the value section to which the hit statistic value belongs according to the value section of the hit statistic value comprises:
and when the accumulated hit statistic value is greater than or equal to a first preset threshold and less than a second preset threshold, selecting a higher one of the second level and the target reading level corresponding to the previous read command as the target reading level matched with the first read command.
7. The method of claim 6, further comprising:
and when the accumulated hit statistic value is greater than or equal to a second preset threshold value and less than a third preset threshold value, selecting a higher one of the third grade and the target reading grade corresponding to the previous read command as the target reading grade matched with the first read command.
8. The method of claim 7, further comprising:
and when the accumulated hit statistic value is greater than or equal to a third preset threshold value, selecting a fourth grade as a target reading grade matched with the first reading command.
9. An apparatus for SSD read performance optimization, the apparatus comprising:
the configuration module is used for dividing the reading mode of the flash memory chip into different reading grades according to the difference of the data quantity loaded when the reading command is executed;
the acquisition module is used for acquiring a target reading grade matched with the reading command in the current access mode when the SSD is accessed;
the data reading module is used for executing reading operation on the flash memory chip by adopting a reading mode corresponding to the target reading grade;
when the current access mode is continuous read access, the acquisition module is used for recording the physical address of the first read command when the first read command is received; judging whether the physical addresses of the first read command and the adjacent previous read command are continuous, if so, accumulating hit statistics values, wherein the hit statistics values represent the continuous distribution number of the corresponding physical addresses in the continuous read commands; determining an obtaining mode of a target reading grade according to a value interval of the hit statistic value, and obtaining the target reading grade matched with the read command, wherein the obtaining mode specifically comprises the following steps: and when the accumulated hit statistic value is greater than or equal to the first preset threshold value, selecting the reading grade corresponding to the belonged value interval as the target reading grade according to the value interval of the hit statistic value.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
11. A storage device comprising a storage controller including a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method according to any one of claims 1 to 8 when executing the computer program.
CN202210708003.5A 2022-06-22 2022-06-22 SSD (solid State disk) reading performance optimization method and device, storage medium and storage equipment Active CN114791790B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210708003.5A CN114791790B (en) 2022-06-22 2022-06-22 SSD (solid State disk) reading performance optimization method and device, storage medium and storage equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210708003.5A CN114791790B (en) 2022-06-22 2022-06-22 SSD (solid State disk) reading performance optimization method and device, storage medium and storage equipment

Publications (2)

Publication Number Publication Date
CN114791790A CN114791790A (en) 2022-07-26
CN114791790B true CN114791790B (en) 2022-09-09

Family

ID=82463830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210708003.5A Active CN114791790B (en) 2022-06-22 2022-06-22 SSD (solid State disk) reading performance optimization method and device, storage medium and storage equipment

Country Status (1)

Country Link
CN (1) CN114791790B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086008A (en) * 2018-07-26 2018-12-25 浪潮电子信息产业股份有限公司 The data processing method and solid state hard disk of solid state hard disk

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101185B (en) * 2017-06-20 2023-08-11 北京忆恒创源科技股份有限公司 Solid-state storage device and write command and read command processing method thereof
CN108132760B (en) * 2018-01-19 2021-03-12 湖南国科微电子股份有限公司 Method and system for improving SSD (solid State disk) reading performance
CN110580227B (en) * 2018-06-07 2024-04-12 北京忆恒创源科技股份有限公司 Adaptive NVM command generation method and device
TWI717816B (en) * 2019-08-28 2021-02-01 群聯電子股份有限公司 Memory control method, memory storage device and memory control circuit unit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086008A (en) * 2018-07-26 2018-12-25 浪潮电子信息产业股份有限公司 The data processing method and solid state hard disk of solid state hard disk

Also Published As

Publication number Publication date
CN114791790A (en) 2022-07-26

Similar Documents

Publication Publication Date Title
US8583854B2 (en) Nonvolatile storage device with NCQ supported and writing method for a nonvolatile storage device
CN102096556B (en) Method for copying data as well as method, device and system for reading data
US11216189B2 (en) Method and computer program product for reading partial data of a page on multiple planes
CN110764708A (en) Data reading method, device, equipment and storage medium
US10628081B2 (en) Managing internal command queues in solid state storage drives
US20140052928A1 (en) Information processing device and method
TWI525430B (en) Cache memory device and data processing method of the device
KR20120082218A (en) Storage device of adaptively determining processing scheme with respect to request of host based on partition information and operating method thereof
US11107522B2 (en) Multi-level cell programming using optimized multiphase mapping with balanced gray code
CN110377233B (en) SSD (solid State disk) reading performance optimization method and device, computer equipment and storage medium
US20170364300A1 (en) Controller, flash memory apparatus, method for identifying data block stability, and method for storing data in flash memory apparatus
US11886743B2 (en) Method for enhancing quality of service of solid-state drive and solid-state drive
CN111930307B (en) Data reading method, device and equipment and computer readable storage medium
CN108829346A (en) A kind of user's write request processing method for the solid state hard disk adapting to Hash memory pages difference
US10152339B1 (en) Methods and apparatus for server caching simulator
CN115428083A (en) Managing write operations in non-volatile memory devices using variable pre-read voltage levels
CN110737607B (en) Method and device for managing HMB memory, computer equipment and storage medium
CN114791790B (en) SSD (solid State disk) reading performance optimization method and device, storage medium and storage equipment
CN103577349B (en) Select the method and apparatus that data carry out brush in the caches
CN115079936A (en) Data writing method and device
CN114527936B (en) Distributed storage method and device for high-performance disk of server
CN115827511A (en) Method and device for setting cache
CN115758206A (en) Method for quickly searching NorFlash last-time writing end position in ZNS solid state disk
CN114327272A (en) Data processing method, solid state disk controller and solid state disk
CN109992217B (en) Service quality control method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant