CN111459413B - Method, device, computer equipment and storage medium for improving SSD performance - Google Patents
Method, device, computer equipment and storage medium for improving SSD performance Download PDFInfo
- Publication number
- CN111459413B CN111459413B CN202010242300.6A CN202010242300A CN111459413B CN 111459413 B CN111459413 B CN 111459413B CN 202010242300 A CN202010242300 A CN 202010242300A CN 111459413 B CN111459413 B CN 111459413B
- Authority
- CN
- China
- Prior art keywords
- voltage threshold
- data
- reading
- threshold vth
- vth
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000004590 computer program Methods 0.000 claims description 14
- 238000013500 data storage Methods 0.000 claims description 3
- 230000004044 response Effects 0.000 abstract description 17
- 238000010586 diagram Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 3
- 238000011084 recovery Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 230000008929 regeneration Effects 0.000 description 1
- 238000011069 regeneration method Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000013403 standard screening design Methods 0.000 description 1
- 238000006467 substitution reaction Methods 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
- G06F3/0607—Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
-
- 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/0683—Plurality of storage devices
- G06F3/0688—Non-volatile semiconductor memory arrays
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)
- Read Only Memory (AREA)
- Digital Magnetic Recording (AREA)
Abstract
The invention relates to a method, a device, computer equipment and a storage medium for improving SSD performance, wherein the method comprises the following steps: acquiring a voltage threshold table, wherein the voltage threshold table records voltage threshold Vth when all data blocks of the SSD read data; pre-reading all data blocks at regular intervals according to the voltage threshold Vth recorded on the voltage threshold table, dynamically adjusting the voltage threshold Vth of the data blocks, and updating the adjusted voltage threshold Vth into the voltage threshold table; acquiring a data reading instruction of a host, wherein the data reading instruction comprises target data block information of data to be read; acquiring a target voltage threshold Vth corresponding to the target data block from the voltage threshold table according to the target data block information; and reading data according to the acquired target voltage threshold Vth. The invention can successfully read the corresponding voltage threshold value stored in the voltage threshold value table once, reduce the data reading times, reduce the SSD command response delay and improve the IO performance of the SSD.
Description
Technical Field
The invention relates to the field of SSDs, in particular to a method, a device, computer equipment and a storage medium for improving SSD performance.
Background
SSD (Solid State Disk), which is a new type of storage medium that uses NAND (flash memory) particles as data storage, has the greatest advantage of high read-write performance over conventional HDD (Hard Disk Drive).
With the technology upgrade of NAND, from the initial adoption of SLC (Single-Level Cell) to the current QLC (Quad-Level Cell, or 4bit MLC), the QLC has the advantages of large capacity and low cost compared with SLC, but the defect is obvious, the bit error rate of QLC NAND is higher than that of SLC, the number of Cell error bits of NAND is large after NAND passes through disturb or regeneration, and when data is read again, correct data can be read only after repeated readouts are needed, so that the IO performance of SSD is reduced.
As shown in fig. 1-3, after data is written into NAND for a period of time, due to the characteristics of NAND, the internal cell of NAND will change with Disturb or restination, if the data is read with default Vth (voltage threshold value) at this time, the read data will not be right, multiple Vth adjustments (adding or subtracting Δth) are needed, and then the NAND data is read again until the data is obtained correctly, which will cause the increase of command response delay of SSD and the decrease of IO performance.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method, a device, computer equipment and a storage medium for improving SSD performance.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
in a first aspect, the present invention proposes a method for improving SSD performance, including the steps of:
acquiring a voltage threshold table, wherein the voltage threshold table records voltage threshold Vth when all data blocks of the SSD read data;
pre-reading all data blocks at regular intervals according to the voltage threshold Vth recorded on the voltage threshold table, dynamically adjusting the voltage threshold Vth of the data blocks, and updating the adjusted voltage threshold Vth into the voltage threshold table;
acquiring a data reading instruction of a host, wherein the data reading instruction comprises target data block information of data to be read;
acquiring a target voltage threshold Vth corresponding to the target data block from the voltage threshold table according to the target data block information;
and reading data according to the acquired target voltage threshold Vth.
In a second aspect, the present invention proposes an apparatus for improving SSD performance, including:
the table acquisition unit is used for acquiring a voltage threshold value table, wherein the voltage threshold value table records voltage threshold values Vth when all data blocks of the SSD read data;
the pre-reading adjusting unit is used for pre-reading all the data blocks at regular intervals according to the voltage threshold Vth recorded on the voltage threshold table, dynamically adjusting the voltage threshold Vth of the data blocks and updating the adjusted voltage threshold Vth into the voltage threshold table;
the data reading device comprises an instruction acquisition unit, a data processing unit and a data processing unit, wherein the instruction acquisition unit is used for acquiring a data reading instruction of a host, and the data reading instruction comprises target data block information of data to be read;
a target obtaining unit, configured to obtain a target voltage threshold Vth corresponding to a target data block from the voltage threshold table according to target data block information;
and the data reading unit is used for reading the data according to the acquired target voltage threshold Vth.
In a third aspect, the present invention proposes a computer device comprising a memory and a processor, the memory having stored thereon a computer program, the processor implementing a method of improving SSD performance as described above when executing the computer program.
In a fourth aspect, the present invention proposes a storage medium storing a computer program which, when executed by a processor, implements a method of improving SSD performance as described above.
Compared with the prior art, the invention has the beneficial effects that: through periodically pre-reading the data of all the data blocks in the SSD, dynamically adjusting the voltage threshold Vth of the data blocks during pre-reading, updating the voltage threshold Vth into a voltage threshold table, and when a host issues a reading instruction to read the data, the correct data can be read once by using the corresponding voltage threshold Vth stored in the voltage threshold table, so that the data reading times are reduced, the SSD command response delay is reduced, and the IO performance of the SSD is improved.
The invention is further described below with reference to the drawings and specific embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of SSD default voltage threshold Vth distribution;
FIG. 2 is a schematic diagram showing the voltage threshold Vth distribution of SSD after Disturb;
FIG. 3 is a schematic diagram showing the voltage threshold Vth distribution of SSD after the recovery;
FIG. 4 is a flowchart illustrating a method for improving SSD performance according to an embodiment of the present invention;
FIG. 5 is a schematic sub-flowchart of a method for improving SSD performance according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a method for improving SSD performance according to another embodiment of the present invention;
FIG. 7 is a schematic block diagram of an apparatus for improving SSD performance according to an embodiment of the present invention;
FIG. 8 is a schematic block diagram of a read-ahead adjustment unit of an SSD performance enhancing apparatus provided by an embodiment of the present invention;
FIG. 9 is a schematic block diagram of an apparatus for improving SSD performance according to another embodiment of the present invention;
fig. 10 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, 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 is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Fig. 4 is a flowchart illustrating a method for improving SSD performance according to an embodiment of the invention. As shown in fig. 4, the method includes the following steps S110 to S150.
S110, acquiring a voltage threshold table, wherein the voltage threshold table records voltage threshold Vth when all data blocks of the SSD read data.
After the data is written into the NAND for a period of time, the NAND internal cell will change with the Disturb or the restination due to the characteristic of the NAND, as shown in fig. 2 and 3, if the data is read by using the default voltage threshold Vth (as shown in fig. 1) at this time, the read data will not be right, and the voltage threshold Vth needs to be adjusted (for example, Δth is added or subtracted) multiple times in the reading process, and then the NAND data is read again until the data is obtained correctly, which will cause the increase of the command response delay of the SSD and the decrease of the IO performance.
In this embodiment, by recording the voltage threshold Vth of the SSD when all the data blocks read data in the voltage threshold table, and further performing data reading according to the real-time voltage threshold Vth recorded in the voltage threshold table after the voltage threshold table is obtained, one-time data reading can be achieved, the number of data reading times is reduced, the SSD command response delay is reduced, and the IO performance of the SSD is improved.
S120, pre-reading all the data blocks at regular intervals according to the voltage threshold Vth recorded on the voltage threshold table, dynamically adjusting the voltage threshold Vth of the data blocks, and updating the adjusted voltage threshold Vth into the voltage threshold table.
In this embodiment, as described above, after the SSD is written into the NAND for a period of time, the NAND internal cell changes with the Disturb or the recovery due to the characteristic of the NAND, and the voltage threshold Vth recorded in the voltage threshold table cannot be used for directly reading the data of the corresponding data block. According to the scheme, all data blocks of the SSD are sequentially pre-read at regular time, voltage threshold Vth adjustment of specific data blocks is completed in the pre-reading process, the latest voltage threshold Vth which can be used for reading data of the data blocks is obtained and is replaced to the original voltage threshold Vth, so that the fact that the voltage threshold Vth in a voltage threshold table is latest is guaranteed, the SSD can directly record the voltage threshold Vth by adopting the voltage threshold table according to a reading command of a host, data of the corresponding data blocks are read at one time, SSD command response delay is reduced, and performance of the SSD in actual data reading is improved.
Referring to FIG. 5, in one embodiment, step S120 includes steps S121-S124.
S121, reading a voltage threshold Vth in a voltage threshold table.
In this embodiment, all the fast voltage threshold Vth of the SSD is recorded in the voltage threshold table, and before updating the voltage threshold table, it is required to determine whether the currently recorded voltage threshold Vth of the voltage threshold table is available, so it is required to access the voltage threshold table and read the voltage threshold Vth therein, and perform data pre-reading based on the voltage threshold Vth, so as to further determine whether the voltage threshold Vth is available.
S122, pre-reading data on the corresponding data block according to the voltage threshold Vth, and judging whether reading is successful or not.
In this embodiment, after the voltage threshold Vth in the voltage threshold table is periodically obtained, the corresponding data block is pre-read according to the voltage threshold Vth, and in the pre-reading process, only if the voltage threshold Vth meets the reading voltage requirement of the data block, the pre-reading can be successfully performed, so that whether the current voltage threshold Vth is available can be further determined according to whether the pre-reading is successful, that is, the pre-reading result.
In one embodiment, step S122 is: creating a voltage threshold automatic scanning task, and pre-reading data on each data block of the SSD at fixed time through the voltage threshold automatic scanning task.
The method comprises the steps of creating a voltage threshold automatic scanning task in an SSD, setting interval execution time for the voltage threshold automatic scanning task, running the voltage threshold automatic scanning task at intervals, automatically executing SSD data pre-reading according to a voltage threshold table, sequentially pre-reading data on each data block, and updating the voltage threshold table.
S123, if the pre-reading is unsuccessful, adjusting the voltage threshold Vth of the corresponding data block, and re-executing the step of pre-reading the data on the corresponding data block according to the voltage threshold Vth.
And S124, if the pre-reading is successful, correspondingly updating the voltage threshold Vth into a voltage threshold table, and storing the associated data block.
In this embodiment, when the pre-reading is unsuccessful, the current voltage threshold Vth reaching the standard is too large or too small, and an adjusted voltage threshold Vth is obtained by dynamically adjusting the voltage threshold Vth, that is, adding or subtracting Δth, and the data on the corresponding data block is pre-read by using the adjusted voltage threshold Vth until the pre-reading is successful, and the voltage threshold Vth corresponding to the pre-reading is updated into the voltage threshold table for calling.
After the pre-reading is successful, the corresponding voltage threshold Vth is updated to the voltage threshold table to replace the original voltage threshold Vth, so that the voltage threshold Vth in the voltage threshold table is guaranteed to be latest and available, the SSD can directly record the voltage threshold Vth by adopting the voltage threshold table according to the reading command of the host, data of the corresponding data block are read once, the SSD command response delay is reduced, and the performance of the SSD in the actual data reading process is improved.
S130, acquiring a data reading instruction of the host, wherein the data reading instruction comprises target data block information of data to be read.
In this embodiment, the host issues a data reading instruction, the SSD obtains a manuscript data reading instruction, and analyzes the data reading instruction to obtain target data block information of data to be read, and based on the target data block information, further reads data stored in the target data block.
And S140, acquiring a target voltage threshold Vth corresponding to the target data block from the voltage threshold table according to the target data block information.
In this embodiment, the voltage threshold Vth in the voltage threshold table is stored in association with a data block, and according to the information of the target data block, the target voltage threshold Vth corresponding to the target data block can be obtained, and based on the target voltage threshold Vth, the data on the target data block can be read at a time, so as to improve the performance and efficiency of SSD data reading.
And S150, data reading is carried out according to the acquired target voltage threshold Vth.
In this embodiment, the voltage threshold Vth in the voltage threshold table is all the latest and available, and the data of the corresponding data block can be directly read once based on the obtained target voltage threshold Vth, so that the response delay of the SSD command is reduced, and the performance of the SSD in actually reading the data is improved.
According to the invention, through periodically pre-reading the data of all the data blocks in the SSD, dynamically adjusting the voltage threshold value of the data blocks during pre-reading, updating the voltage threshold value into the voltage threshold value table, and when a host issues a reading instruction to read the data, the correct data can be read once by using the corresponding voltage threshold value stored in the voltage threshold value table, so that the data reading times are reduced, the SSD command response delay is reduced, and the IO performance of the SSD is improved.
Fig. 6 is a flowchart of a method for improving SSD performance according to another embodiment of the invention. As shown in fig. 6, the method for improving SSD performance of the embodiment includes steps S210-S260. Steps S220 to S260 are similar to steps S110 to S150 in the above embodiment, and are not described herein. Step S210 added in the present embodiment is described in detail below.
S210, a voltage threshold table is newly built for the SSD, and the voltage threshold Vth of all data blocks of the SSD when data are read is recorded in the voltage threshold table.
In this embodiment, a voltage threshold table is newly built in the SSD, in which a voltage threshold Vth when all data blocks (blocks) of the SSD read data is recorded, and when the voltage threshold Vth of a data block changes, the voltage threshold Vth corresponding to the data block is timely adjusted and updated, the most accurate voltage threshold Vth of the corresponding data block is written into the voltage threshold table, and when the subsequent host needs to read the data of the data block, the data can be read according to the voltage threshold Vth corresponding to the voltage threshold table, so that correct data can be read once, the number of times of data reading is reduced, the response delay of the SSD command is reduced, and the IO performance of the SSD is improved.
Fig. 7 is a schematic block diagram of an apparatus for improving SSD performance according to an embodiment of the invention. As shown in fig. 7, the present invention further provides an apparatus for improving SSD performance, corresponding to the above method for improving SSD performance. The apparatus for improving SSD performance includes a unit for performing the method for improving SSD performance described above, and the apparatus may be configured in a desktop computer, a tablet computer, a portable computer, or the like. Specifically, referring to fig. 7, the device for improving SSD performance includes a table obtaining unit 10, a read-ahead adjusting unit 20, an instruction obtaining unit 30, a target obtaining unit 40 and a data reading unit 50.
The table obtaining unit 10 is configured to obtain a voltage threshold table, where a voltage threshold Vth when all data blocks of the SSD read data is recorded.
After the data is written into the NAND for a period of time, the internal cell of the NAND changes along with the Disturb or the restination due to the characteristic of the NAND, if the data is read by using the default voltage threshold Vth at the moment, the read data will not be right, the voltage threshold Vth needs to be adjusted for a plurality of times (for example, delta th is added or subtracted) in the reading process, and then the data of the NAND is read again until the data is obtained correctly, so that the command response delay of the SSD is increased, and the IO performance is reduced.
In this embodiment, by recording the voltage threshold Vth of the SSD when all the data blocks read data in the voltage threshold table, and further performing data reading according to the real-time voltage threshold Vth recorded in the voltage threshold table after the voltage threshold table is obtained, one-time data reading can be achieved, the number of data reading times is reduced, the SSD command response delay is reduced, and the IO performance of the SSD is improved.
The pre-reading adjustment unit 20 is configured to pre-read all the data blocks at regular intervals according to the voltage threshold Vth recorded on the voltage threshold table, dynamically adjust the voltage threshold Vth of the data block, and update the adjusted voltage threshold Vth into the voltage threshold table.
In this embodiment, as described above, after the SSD is written into the NAND for a period of time, the NAND internal cell changes with the Disturb or the recovery due to the characteristic of the NAND, and the voltage threshold Vth recorded in the voltage threshold table cannot be used for directly reading the data of the corresponding data block. According to the scheme, all data blocks of the SSD are sequentially pre-read at regular time, voltage threshold Vth adjustment of specific data blocks is completed in the pre-reading process, the latest voltage threshold Vth which can be used for reading data of the data blocks is obtained and is replaced to the original voltage threshold Vth, so that the fact that the voltage threshold Vth in a voltage threshold table is latest is guaranteed, the SSD can directly record the voltage threshold Vth by adopting the voltage threshold table according to a reading command of a host, data of the corresponding data blocks are read at one time, SSD command response delay is reduced, and performance of the SSD in actual data reading is improved.
Referring to fig. 8, the read-ahead adjustment unit 20 includes a read sub-unit 21, a read-ahead sub-unit 22, an adjustment sub-unit 23, and an update sub-unit 24.
The reading subunit 21 is configured to read the voltage threshold Vth in the voltage threshold table.
In this embodiment, all the fast voltage threshold Vth of the SSD is recorded in the voltage threshold table, and before updating the voltage threshold table, it is required to determine whether the currently recorded voltage threshold Vth of the voltage threshold table is available, so it is required to access the voltage threshold table and read the voltage threshold Vth therein, and perform data pre-reading based on the voltage threshold Vth, so as to further determine whether the voltage threshold Vth is available.
The pre-reading subunit 22 is configured to pre-read the data on the corresponding data block according to the voltage threshold Vth, and determine whether the reading is successful.
In this embodiment, after the voltage threshold Vth in the voltage threshold table is periodically obtained, the corresponding data block is pre-read according to the voltage threshold Vth, and in the pre-reading process, only if the voltage threshold Vth meets the reading voltage requirement of the data block, the pre-reading can be successfully performed, so that whether the current voltage threshold Vth is available can be further determined according to whether the pre-reading is successful, that is, the pre-reading result.
In one embodiment, the pre-read subunit 22 includes a pre-read module for creating a voltage threshold auto-scan task by which the data on each data block of the SSD is pre-read at regular time.
The method comprises the steps of creating a voltage threshold automatic scanning task in an SSD, setting interval execution time for the voltage threshold automatic scanning task, running the voltage threshold automatic scanning task at intervals, automatically executing SSD data pre-reading according to a voltage threshold table, sequentially pre-reading data on each data block, and updating the voltage threshold table.
The adjusting subunit 23 is configured to adjust the voltage threshold Vth of the corresponding data block if the pre-reading is unsuccessful, and re-execute the pre-reading of the data on the corresponding data block according to the voltage threshold Vth.
The updating subunit 24 is configured to update the voltage threshold Vth to the voltage threshold table and store the associated data block if the pre-reading is successful.
In this embodiment, when the pre-reading is unsuccessful, the current voltage threshold Vth reaching the standard is too large or too small, and an adjusted voltage threshold Vth is obtained by dynamically adjusting the voltage threshold Vth, that is, adding or subtracting Δth, and the data on the corresponding data block is pre-read by using the adjusted voltage threshold Vth until the pre-reading is successful, and the voltage threshold Vth corresponding to the pre-reading is updated into the voltage threshold table for calling.
After the pre-reading is successful, the corresponding voltage threshold Vth is updated to the voltage threshold table to replace the original voltage threshold Vth, so that the voltage threshold Vth in the voltage threshold table is guaranteed to be latest and available, the SSD can directly record the voltage threshold Vth by adopting the voltage threshold table according to the reading command of the host, data of the corresponding data block are read once, the SSD command response delay is reduced, and the performance of the SSD in the actual data reading process is improved.
The instruction obtaining unit 30 is configured to obtain a data reading instruction of the host, where the data reading instruction includes information of a target data block where data to be read is located.
In this embodiment, the host issues a data reading instruction, the SSD obtains a manuscript data reading instruction, and analyzes the data reading instruction to obtain target data block information of data to be read, and based on the target data block information, further reads data stored in the target data block.
A target acquiring unit 40, configured to acquire a target voltage threshold Vth corresponding to the target data block from the voltage threshold table according to the target data block information.
In this embodiment, the voltage threshold Vth in the voltage threshold table is stored in association with a data block, and according to the information of the target data block, the target voltage threshold Vth corresponding to the target data block can be obtained, and based on the target voltage threshold Vth, the data on the target data block can be read at a time, so as to improve the performance and efficiency of SSD data reading.
The data reading unit 50 is configured to perform data reading according to the obtained target voltage threshold Vth.
In this embodiment, the voltage threshold Vth in the voltage threshold table is all the latest and available, and the data of the corresponding data block can be directly read once based on the obtained target voltage threshold Vth, so that the response delay of the SSD command is reduced, and the performance of the SSD in actually reading the data is improved.
According to the invention, through periodically pre-reading the data of all the data blocks in the SSD, dynamically adjusting the voltage threshold value of the data blocks during pre-reading, updating the voltage threshold value into the voltage threshold value table, and when a host issues a reading instruction to read the data, the correct data can be read once by using the corresponding voltage threshold value stored in the voltage threshold value table, so that the data reading times are reduced, the SSD command response delay is reduced, and the IO performance of the SSD is improved.
Fig. 9 is a schematic block diagram of an apparatus for improving SSD performance according to another embodiment of the invention. As shown in fig. 9, the device for improving SSD performance of the present embodiment is added with the table creating unit 60 on the basis of the above-mentioned embodiment.
The table creating unit 60 is configured to create a voltage threshold table for the SSD, and record the voltage threshold Vth of all the data blocks of the SSD when the data blocks are read in the voltage threshold table.
In this embodiment, a voltage threshold table is newly built in the SSD, in which a voltage threshold Vth when all data blocks (blocks) of the SSD read data is recorded, and when the voltage threshold Vth of a data block changes, the voltage threshold Vth corresponding to the data block is timely adjusted and updated, the most accurate voltage threshold Vth of the corresponding data block is written into the voltage threshold table, and when the subsequent host needs to read the data of the data block, the data can be read according to the voltage threshold Vth corresponding to the voltage threshold table, so that correct data can be read once, the number of times of data reading is reduced, the response delay of the SSD command is reduced, and the IO performance of the SSD is improved.
It should be noted that, as those skilled in the art can clearly understand, the specific implementation process of the device and each unit for improving the SSD performance may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, the description is omitted here.
Referring to fig. 10, fig. 10 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a terminal or a server, where the terminal may be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster formed by a plurality of servers.
With reference to FIG. 10, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a method of improving SSD performance.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the non-volatile storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform a method of improving SSD performance.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of a portion of the architecture in connection with the present application and is not intended to limit the computer device 500 to which the present application is applied, and that a particular computer device 500 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502 is adapted to run a computer program 5032 stored in a memory.
It should be appreciated that in embodiments of the present application, the processor 502 may be a central processing unit (Central Processing Unit, CPU), the processor 502 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that all or part of the flow in a method embodying the above described embodiments may be accomplished by computer programs instructing the relevant hardware. The computer program comprises program instructions, and the computer program can be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer readable storage medium.
The storage medium may be a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, or other various computer-readable storage media that can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs. In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The integrated unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (4)
1. A method for improving SSD performance, comprising the steps of:
acquiring a voltage threshold table, wherein the voltage threshold table records voltage threshold Vth when all data blocks of the SSD read data;
pre-reading all data blocks at regular intervals according to the voltage threshold Vth recorded on the voltage threshold table, dynamically adjusting the voltage threshold Vth of the data blocks, and updating the adjusted voltage threshold Vth into the voltage threshold table;
acquiring a data reading instruction of a host, wherein the data reading instruction comprises target data block information of data to be read;
acquiring a target voltage threshold Vth corresponding to the target data block from the voltage threshold table according to the target data block information;
reading data according to the acquired target voltage threshold Vth;
the step of pre-reading all the data blocks at regular intervals according to the voltage threshold Vth recorded on the voltage threshold table, dynamically adjusting the voltage threshold Vth of the data block, and updating the adjusted voltage threshold Vth into the voltage threshold table includes:
reading a voltage threshold Vth in the voltage threshold table;
pre-reading data on a corresponding data block according to a voltage threshold Vth, and judging whether reading is successful or not;
if the pre-reading is unsuccessful, adjusting a voltage threshold Vth of the corresponding data block, and re-executing the step of pre-reading the data on the corresponding data block according to the voltage threshold Vth;
if the pre-reading is successful, correspondingly updating the voltage threshold Vth into a voltage threshold table, and storing the associated data block;
when the pre-reading is unsuccessful, judging that the current voltage threshold Vth is too large or too small, and dynamically adjusting the voltage threshold Vth, namely adding or subtracting delta th, to obtain an adjusted voltage threshold Vth, pre-reading data on a corresponding data block by using the adjusted voltage threshold Vth until the pre-reading is successful, and updating the voltage threshold Vth corresponding to the pre-reading success into a voltage threshold table;
the step of pre-reading the data on the corresponding data block according to the voltage threshold Vth includes:
creating a voltage threshold automatic scanning task, and pre-reading data on each data block of the SSD at fixed time through the voltage threshold automatic scanning task;
prior to the step of obtaining the voltage threshold table, comprising,
creating a voltage threshold table for the SSD, and recording voltage threshold Vth of all data blocks of the SSD when reading data in the voltage threshold table;
the voltage threshold Vth is associated with a data block in the voltage threshold table, and the data on the target data block is read once based on the target voltage threshold Vth, which is obtained according to the target data block information and corresponds to the target data block.
2. An apparatus for improving SSD performance, comprising:
the table acquisition unit is used for acquiring a voltage threshold value table, wherein the voltage threshold value table records voltage threshold values Vth when all data blocks of the SSD read data;
the pre-reading adjusting unit is used for pre-reading all the data blocks at regular intervals according to the voltage threshold Vth recorded on the voltage threshold table, dynamically adjusting the voltage threshold Vth of the data blocks and updating the adjusted voltage threshold Vth into the voltage threshold table;
the data reading device comprises an instruction acquisition unit, a data processing unit and a data processing unit, wherein the instruction acquisition unit is used for acquiring a data reading instruction of a host, and the data reading instruction comprises target data block information of data to be read;
a target obtaining unit, configured to obtain a target voltage threshold Vth corresponding to a target data block from the voltage threshold table according to target data block information;
a data reading unit for reading data according to the acquired target voltage threshold Vth;
the pre-reading adjusting unit comprises a reading subunit, a pre-reading subunit, an adjusting subunit and an updating subunit;
the reading subunit is used for reading the voltage threshold Vth in the voltage threshold table;
the pre-reading subunit is used for pre-reading the data on the corresponding data block according to the voltage threshold Vth and judging whether the reading is successful or not;
the adjusting subunit is configured to adjust a voltage threshold Vth of the corresponding data block if the pre-reading is unsuccessful, and re-execute pre-reading of data on the corresponding data block according to the voltage threshold Vth;
the updating subunit is configured to update the voltage threshold Vth corresponding to the voltage threshold Vth to a voltage threshold table if the pre-reading is successful, and store the associated data block;
when the pre-reading is unsuccessful, judging that the current voltage threshold Vth is too large or too small, and dynamically adjusting the voltage threshold Vth, namely adding or subtracting delta th, to obtain an adjusted voltage threshold Vth, pre-reading data on a corresponding data block by using the adjusted voltage threshold Vth until the pre-reading is successful, and updating the voltage threshold Vth corresponding to the pre-reading success into a voltage threshold table;
the pre-reading subunit comprises a pre-reading module, wherein the pre-reading module is used for creating a voltage threshold automatic scanning task, and the data on each data block of the SSD is pre-read at fixed time through the voltage threshold automatic scanning task
The system further comprises a table creating unit, a data storage unit and a data storage unit, wherein the table creating unit is used for creating a voltage threshold table for the SSD and recording the voltage threshold Vth of all data blocks of the SSD when the data are read in the voltage threshold table; the table creating unit is used for acquiring a target voltage threshold Vth corresponding to the target data block according to the target data block information, and reading data on the target data block once based on the target voltage threshold Vth.
3. A computer device comprising a memory having a computer program stored thereon and a processor that when executing the computer program implements the method of improving SSD performance of claim 1.
4. A storage medium storing a computer program which when executed by a processor implements the method of improving SSD performance of claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010242300.6A CN111459413B (en) | 2020-03-31 | 2020-03-31 | Method, device, computer equipment and storage medium for improving SSD performance |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010242300.6A CN111459413B (en) | 2020-03-31 | 2020-03-31 | Method, device, computer equipment and storage medium for improving SSD performance |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111459413A CN111459413A (en) | 2020-07-28 |
CN111459413B true CN111459413B (en) | 2024-04-02 |
Family
ID=71681641
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010242300.6A Active CN111459413B (en) | 2020-03-31 | 2020-03-31 | Method, device, computer equipment and storage medium for improving SSD performance |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111459413B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112599177B (en) * | 2020-12-23 | 2024-07-26 | 深圳大普微电子股份有限公司 | Threshold voltage management method and flash memory data reading method |
CN115793991B (en) * | 2023-01-20 | 2023-04-14 | 苏州浪潮智能科技有限公司 | Data reading method and device, electronic equipment and readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106448737A (en) * | 2016-09-30 | 2017-02-22 | 北京忆芯科技有限公司 | Flash memory data reading method and device and solid disk drive |
CN109582228A (en) * | 2018-11-15 | 2019-04-05 | 深圳忆联信息系统有限公司 | The hardware-accelerated method and device for reading to retry automatically based on nand flash memory controller |
CN110471624A (en) * | 2019-08-07 | 2019-11-19 | 深圳忆联信息系统有限公司 | SSD reads accelerated method, device, computer equipment and the storage medium retried |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106816179B (en) * | 2015-11-30 | 2020-12-25 | 华为技术有限公司 | Flash memory error correction method and device |
TWI623878B (en) * | 2017-07-07 | 2018-05-11 | 大心電子(英屬維京群島)股份有限公司 | Data reading method and storage controller |
US10607693B2 (en) * | 2018-06-29 | 2020-03-31 | Micron Technology, Inc. | Misplacement mitigation algorithm |
-
2020
- 2020-03-31 CN CN202010242300.6A patent/CN111459413B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106448737A (en) * | 2016-09-30 | 2017-02-22 | 北京忆芯科技有限公司 | Flash memory data reading method and device and solid disk drive |
CN109582228A (en) * | 2018-11-15 | 2019-04-05 | 深圳忆联信息系统有限公司 | The hardware-accelerated method and device for reading to retry automatically based on nand flash memory controller |
CN110471624A (en) * | 2019-08-07 | 2019-11-19 | 深圳忆联信息系统有限公司 | SSD reads accelerated method, device, computer equipment and the storage medium retried |
Also Published As
Publication number | Publication date |
---|---|
CN111459413A (en) | 2020-07-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI447733B (en) | Methods for calculating compensating voltage and adjusting threshold voltage and memory apparatus and controller | |
US11714580B2 (en) | Dynamic background scan optimization in a memory sub-system | |
US9983991B2 (en) | Data storage based on rank modulation in single-level flash memory | |
CN111459413B (en) | Method, device, computer equipment and storage medium for improving SSD performance | |
KR101059673B1 (en) | Storage device and method for dynamically adjusting reliability or storage capacity | |
US20080046778A1 (en) | Memory controller and semiconductor memory device | |
US20080195822A1 (en) | Pilot placement for non-volatile memory | |
JP2010511225A (en) | System, method, and computer program product for delaying operations that reduce memory life | |
CN106415502A (en) | Data storage method and device | |
US11150970B2 (en) | Method, electronic device and computer program product for evaluating health of storage disk | |
US9342246B2 (en) | Host command based read disturb methodology | |
US20210096755A1 (en) | Managing sequential write performance consistency for memory devices | |
CN109411002B (en) | Data reading method and flash memory controller | |
US20170090768A1 (en) | Storage device that performs error-rate-based data backup | |
CN114067892B (en) | Solid state disk temperature-crossing data reading method, storage medium and SSD (solid state disk) device | |
CN108920107B (en) | Method and device for screening cold data, computer equipment and storage medium | |
CN115862714A (en) | SSD (solid State disk) read delay optimization method and device, computer equipment and storage medium | |
US10747454B1 (en) | Data storage systems and methods for self adaptive chip-enable setup time | |
CN114816836B (en) | Recovery method and device of equivalent residence time, storage medium and electronic equipment | |
US9378097B1 (en) | Selective copy-back | |
US10095417B1 (en) | Method and system for improving flash storage read performance in partially programmed blocks | |
CN114816833B (en) | Writing method, device and system of flash data | |
CN110516479B (en) | Data writing method and related device | |
US11836384B2 (en) | Automatic prediction timers adaptation | |
CN113094294B (en) | SSD abnormal power failure processing method, SSD abnormal power failure processing device, computer 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 |