A data reading method and related device applied to solid state drive (SSD)

By dynamically adjusting the number of insertion and read operations allowed by SSD when writing or erasing operations, the problem of low efficiency of NAND Flash operation is solved and the performance of SSD is improved.

CN116235138BActive Publication Date: 2025-06-06HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202080103398.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-30
Publication Date
2025-06-06
Estimated Expiration
2040-09-30

Smart Images

  • Figure CN116235138B_ABST
    Figure CN116235138B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a data reading method, device and solid state drive SSD applied to improve the performance of the solid state drive. Among them, a data reading method is provided, which may include: obtaining a characteristic value of the SSD, the characteristic value includes at least one of a read-write ratio value or a pressure value, the read-write ratio value is the ratio of the number of read operations performed by the SSD to the number of write operations performed by the SSD, and the pressure value indicates the number of read operations waiting to be executed in the SSD; based on the characteristic value, dynamically adjusting the number of read operations allowed to be inserted in a first operation process, the first operation being a currently executed write operation or erase operation, to improve the performance of the SSD.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage, and in particular to a data reading method and related devices applied to a solid state drive (SSD). Background Art

[0002] Solid State Disk (SSD) is a widely used storage device, mainly composed of a controller and a storage unit. Among them, the storage unit generally includes multiple flash memory particles such as NAND Flash, each flash memory particle includes one or more bare chips (die), each die includes multiple physical blocks (blocks), the capacity of a block is generally between hundreds of KB and several MB, each block includes multiple pages (pages), and the capacity of a page is generally a multiple of 4KB (such as 4KB or 16KB). SSD stores data evenly on each NAND Flash through the Flash Translation Layer (FTL). In general, read, write, erase and other operations can be performed on NAND Flash to read or store data, but read, write and erase operations cannot be performed simultaneously on the same NAND Flash.

[0003] If a write or erase operation is being executed on the NAND Flash, then if a new read operation is to be executed, you can: 1) wait for the write or erase operation on the NAND Flash to be completed; 2) send a suspend operation to the NAND Flash. After receiving the suspend operation, the NAND Flash will suspend the write or erase operation being executed, and then execute the read operation. To resume the suspended write or erase operation, the host can send a resume operation to the NAND Flash, which will resume the suspended write or erase operation. However, since the execution time of these operations varies greatly, if there is no limit on the total number of read operations issued during a write or erase operation, only the impact on the read latency is considered, which will have a greater impact on the write and erase operations. If the total number of read operations issued during a write or erase operation is limited to a fixed threshold, only the impact on the write and erase operations is considered, then if there are a large number of read operations waiting to be executed, the impact on the read operation will be greater.

[0004] Therefore, how to improve the efficiency of NAND Flash in performing read, write and erase operations and improve the performance of SSD is an urgent problem to be solved in this application. Summary of the invention

[0005] The embodiments of the present application provide a data reading method and device for a solid state drive (SSD), and a solid state drive (SSD) to improve the performance of the solid state drive.

[0006] In a first aspect, an embodiment of the present application provides a data reading method applied to a solid state drive (SSD), which may include: obtaining a characteristic value of the SSD, the characteristic value including at least one of a read-write ratio value or a pressure value, the read-write ratio value being the ratio of the number of read operations performed by the SSD to the number of write operations performed by the SSD, the pressure value indicating the number of read operations waiting to be executed in the SSD; based on the characteristic value, dynamically adjusting the number of read operations allowed to be inserted during a first operation, the first operation being a write operation or an erase operation currently being executed.

[0007] In the embodiment of the present application, the characteristic value of the SSD is first obtained, and the characteristic value includes at least one of a read-write ratio value or a pressure value. Since the read-write ratio value is the ratio of the number of read operations executed by the SSD to the number of write operations executed by the SSD, the pressure value is used to indicate the number of read operations waiting to be executed in the SSD. Therefore, the efficiency and pressure of the SSD currently executing the read, write or erase operation can be determined through the characteristic value. If the efficiency is low and the pressure is high, the number of read operations allowed to be inserted in a first operation process can be dynamically adjusted according to at least one of the obtained read-write ratio value or pressure value, so as to improve the efficiency of the NAND Flash in executing the read, write and erase operations, thereby improving the performance of the SSD.

[0008] In one possible implementation, the method of dynamically adjusting the number of read operations allowed to be inserted during a first operation based on the characteristic value includes: determining a first threshold value for allowing read operations to be inserted during the first operation based on the characteristic value; and dynamically adjusting the number of read operations allowed to be inserted during a first operation based on the first threshold value. During a write operation or an erase operation, the SSD can count once after each read operation is performed to record the number of read operations inserted so far. Therefore, when implementing an embodiment of the present application, by directly configuring a first threshold value (the first threshold value can be the maximum number) for allowing read operations to be inserted during a first operation, the number of read operations inserted is counted, and after reaching the maximum number of read operations allowed, read operations are prohibited from being inserted again, thereby achieving the purpose of adjusting the number of read operations. In this way, the number of read operations allowed to be inserted can be adjusted intuitively and conveniently, thereby improving the performance of the SSD.

[0009] In a possible implementation, the dynamically adjusting the number of read operations allowed to be performed during a first operation based on the characteristic value includes: based on the characteristic value, obtaining a pause operation strategy corresponding to the characteristic value, the pause operation strategy is a constraint condition for sending a pause (Suspend) operation during a first operation, the pause operation is used to insert a read operation into the first operation after suspending the first operation; based on the pause operation strategy, dynamically adjusting the number of read operations allowed to be inserted into a first operation. In an embodiment of the present application, the pause operation is used to suspend the first operation during a first operation, and then insert a read operation into the first operation after the pause operation is used. Therefore, the embodiment of the present application can dynamically adjust the maximum number of read operations allowed to be inserted after the use of the pause operation by adjusting the constraint conditions of the pause operation, such as: adjusting the use frequency of the pause operation, adjusting the use number of the pause operation, etc.

[0010] In one possible implementation, the method of obtaining the pause operation strategy corresponding to the characteristic value based on the characteristic value includes: obtaining the pause operation strategy corresponding to the characteristic value from a pre-stored mapping relationship table based on the characteristic value, wherein the mapping relationship table includes the correspondence between the characteristic value and the pause operation strategy. In an embodiment of the present application, the method of obtaining the pause operation strategy may be to directly determine it according to the characteristic value from a pre-stored mapping relationship table. Determining the pause operation strategy from a pre-stored mapping relationship table can save calculation steps quickly and conveniently, greatly shorten the time to obtain the pause operation strategy, and also improve the efficiency of adjusting the number of read operations allowed to be inserted, thereby improving the performance of the SSD.

[0011] In one possible implementation, the pause operation strategy is a second threshold value that allows the pause operation to be sent during a first operation. During a first operation, the embodiment of the present application directly limits the second threshold value used for the pause operation, and the second threshold value can be a maximum number, that is, by limiting the number of times a first operation is interrupted, the maximum number of read operations allowed to be inserted can be limited, thereby improving the performance of the SSD. For example: by limiting the maximum number of read operations allowed to be inserted, the read operation will not frequently interrupt the execution of the write operation or the erase operation, because at this time the main bottleneck of the performance (input / output operations per second (IOPS)) is the write IOPS, so reducing the threshold value can reduce the interruption of the write operation, and the IOPS performance of the SSD will be higher.

[0012] In a possible implementation, the pause operation strategy is a third threshold value for allowing insertion of a read operation after each pause operation is sent during a first operation. The embodiment of the present application controls the number of read operations allowed to be sent during a first operation by configuring the third threshold value for allowing insertion of a read operation after sending the pause operation once, and the third threshold value can be a maximum number. That is, by controlling the maximum number of inserted read operations each time a pause operation is sent, the total execution time of a read operation that is paused is controlled, and the time for each pause operation to interrupt the first operation is reduced, thereby improving the performance of the SSD.

[0013] In one possible implementation, when the characteristic value includes the read-write ratio value, the first threshold value for allowing insertion of read operations during the first operation is inversely proportional to the read-write ratio value. In the implementation of the embodiment of the present application, when the read-write ratio value is larger, the proportion of read operations is higher. Therefore, the main bottleneck of the IOPS performance of the SSD is the write IOPS. At this time, the maximum number of read operations allowed to be inserted is set to a smaller threshold, so there will not be too many read operations frequently interrupting the execution of write operations. Therefore, reducing the maximum number of inserted read operations can reduce the interruption of write operations, thereby improving the performance of the SSD.

[0014] In one possible implementation, when the characteristic value includes the pressure value, the first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value. In an embodiment of the present application, the larger the pressure value, the more operations are waiting to be executed. At this time, it is necessary to reduce the maximum number of read operations allowed to be inserted to prevent excessive read operations from interrupting the execution of write operations. If the pressure value is small, it means that the computing device is more focused on the read latency of the read operation. At this time, a larger threshold value for the maximum number of pause operations allowed to be sent should be configured to allow read operations to interrupt write operations or erase operations as much as possible, so that the read operation can be completed as soon as possible.

[0015] In a possible implementation, when the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than the first pressure value, the first threshold value for allowing insertion of the read operation during the first operation is inversely proportional to the read-write ratio value, and if the pressure value is less than the first pressure value, the first threshold value for allowing insertion of the read operation during the first operation is inversely proportional to the pressure value. In an embodiment of the present application, when the read-write ratio value and the pressure value are obtained at the same time, if the pressure value is greater than the first pressure value (such as: the pressure value is large enough), if you want to quickly improve the efficiency of NAND Flash in performing read, write and erase operations, you also need to adaptively reduce the first threshold value for allowing insertion of the read operation according to the read-write ratio value executed by the SSD, and reduce the interruption of the read operation to the first operation, so as to improve the IOPS performance of the SSD. If the pressure value is less than the first pressure value (the pressure value is small enough), it means that the number of read operations waiting at this time is small, and the computing device is more focused on the read delay of the read operation. At this time, a larger first threshold value for allowing insertion of the read operation can be configured to allow the read operation to interrupt the write operation or erase operation as much as possible, so that the read operation can be executed as soon as possible.

[0016] In a possible implementation, when the characteristic value includes the read-write ratio value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value. In the implementation of the present application, when the read-write ratio value is larger, the proportion of read operations is higher. Therefore, at this time, the main bottleneck of the IOPS performance of the SSD is the write IOPS. At this time, the maximum number of pause operations allowed to be sent is set to a smaller threshold, so the read operation will not frequently interrupt the execution of the write operation. Therefore, reducing the threshold can reduce the interruption of the write operation, and the IOPS performance will be higher. For example, when the maximum number of pause operations allowed to be sent is set to 0, the read operation will not disturb the progress of the write operation, and the focus is on the write operation. On the contrary, the smaller the ratio of the ratio of the read operation to the write operation, the higher the proportion of the write operation. At this time, the performance of the SSD is more dependent on the execution of the read operation, so the maximum number of pause operations allowed to be sent is set to a larger threshold, so the read operation can frequently interrupt the execution of the write operation, which can make the read operation faster, and the performance of the SSD will be higher.

[0017] In one possible implementation, when the characteristic value includes the pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value. In an embodiment of the present application, the larger the pressure value, the more attention is paid to IOPS performance on the computing device. Therefore, when the pressure value is large, the maximum number of pause operations sent can be reduced accordingly. If the pressure value is small, it means that the computing device is more focused on the read latency of the read operation. At this time, a larger maximum number of pause operations allowed to be sent should be configured to allow the read operation to interrupt the write operation or erase operation as much as possible, so that the read operation can be executed and completed as soon as possible.

[0018] In a possible implementation, when the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than the second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value; if the pressure value is less than the second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value. In an embodiment of the present application, if the pressure value is greater than the second pressure value, it means that the computing device is more concerned about the IOPS performance of the SSD. Therefore, when the pressure value is large, the second threshold value for allowing the pause operation to be sent is configured according to the ratio of read I / O and write I / O on the SSD to reduce the interruption of the read operation to the first operation. If the pressure value is less than the second pressure value, it means that the computing device is more focused on the read latency of the read operation. At this time, a larger second threshold value for allowing the pause operation to be sent should be configured to allow the read operation to interrupt the write operation or erase operation as much as possible, so that the read operation can be executed and completed as soon as possible.

[0019] In a possible implementation, the SSD includes a controller, and the SSD is connected to a computing device; the number of read operations performed by the SSD corresponds to the number of read operations generated by the computing device, and the number of write operations performed by the SSD corresponds to the number of read operations generated by the controller; the characteristic value includes the read-write ratio value; the acquisition of the characteristic value of the SSD includes: counting the first number of first read operations performed by the SSD, the first read operation is the read operation generated by the computing device; counting the second number of second read operations performed by the SSD, the second read operation is the read operation generated by the controller; and taking the ratio of the first number to the second number as the read-write ratio value of the SSD. In an embodiment of the present application, the read-write ratio of the SSD is determined based on the number of read operations performed by the SSD and the number of write operations performed by the SSD, because it is not easy to directly count the number of write operations performed by the SSD. Therefore, the number of write operations performed by the SSD here can be indicated by the number of read operations (second read operations) generated by the controller in the SSD (the read operations generated by the computing device are not counted). Moreover, the number of read operations performed by the SSD can be indicated by the number of read operations (first read operations) generated by the computing device (the read operations generated by the SSD itself are not counted). Therefore, the read-write ratio value of the SSD can be determined by the ratio of the number of first read operations to the number of second read operations, which is more convenient to obtain. Among them, each read operation has a flag bit, which can record whether the read operation is generated by the computing device or generated by the controller in the SSD itself. Therefore, when executing a read operation, the controller can easily and accurately identify and count the number of the first read operation and the second read operation respectively.

[0020] In a possible implementation, the counting of the first number of first read operations executed by the SSD includes: counting the first number of the first read operations in the first cache queue executed by the SSD; the counting of the second number of second read operations executed by the SSD includes: counting the second number of the second read operations in the first cache queue executed by the SSD; the pressure value indicates the number of the first read operations waiting to be executed by the SSD in the second cache queue, wherein the first read operation in the first cache queue enters the first cache queue from the second cache queue, and the second read operation does not exist in the second cache queue. In implementing the embodiment of the present application, by counting the number of first read operations executed and the number of second read operations executed in the first cache queue, as well as the number of read operations waiting in the second cache queue, the read-write ratio value and the pressure value can be determined more quickly, and the changes in the read-write ratio value and the pressure value in the SSD can be fed back in a timely manner, so as to timely adjust the maximum number of read operations allowed to be inserted during a first operation, thereby ensuring and further improving the performance of the SSD.

[0021] In one possible implementation, the obtaining of the characteristic value of the SSD includes: periodically recording and storing the characteristic value of the SSD; obtaining the target characteristic value of the most recent period at the current time point; and dynamically adjusting the number of read operations allowed to be inserted during a first operation based on the characteristic value, including: dynamically adjusting the number of read operations allowed to be inserted during a first operation based on the target characteristic value. By implementing the embodiment of the present application, the read-write ratio value and pressure value in the SSD are periodically recorded, and the number of read operations allowed to be inserted is adjusted according to the latest read-write ratio value and pressure value, so that the adaptability of the SSD can be adjusted in a timely manner, thereby improving the storage performance of the SSD.

[0022] In a second aspect, an embodiment of the present application provides a solid-state drive (SSD), comprising a controller and a storage array; the controller is coupled to the storage array, and is used to: obtain a characteristic value of the SSD, the characteristic value comprising at least one of a read-write ratio value or a pressure value, the read-write ratio value being the ratio of the number of read operations executed by the SSD to the number of write operations executed by the SSD, and the pressure value indicating the number of read operations waiting to be executed in the SSD; based on the characteristic value, dynamically adjust the number of read operations allowed to be inserted during a first operation, the first operation being a write operation or an erase operation currently performed by the controller on the storage array.

[0023] In one possible implementation, the controller is specifically used to: determine a first threshold for allowing insertion of read operations during the first operation based on the characteristic value; and dynamically adjust the number of read operations allowed to be inserted during a first operation according to the first threshold.

[0024] In one possible implementation, the controller is specifically used to: based on the characteristic value, obtain a pause operation strategy corresponding to the characteristic value, the pause operation strategy is a constraint condition for sending a pause (Suspend) operation during a first operation process, and the pause operation is used to insert a read operation into the first operation after pausing the first operation; based on the pause operation strategy, dynamically adjust the number of read operations allowed to be inserted during a first operation process.

[0025] In one possible implementation, the controller is specifically configured to: based on the feature value, obtain the pause operation strategy corresponding to the feature value from a pre-stored mapping relationship table, wherein the mapping relationship table includes a correspondence between the feature value and the pause operation strategy.

[0026] In a possible implementation, the pause operation policy is a second threshold value that allows the pause operation to be sent during a first operation.

[0027] In a possible implementation, the pause operation strategy is a third threshold for allowing insertion of a read operation after each pause operation is sent during a first operation.

[0028] In a possible implementation, when the characteristic value includes the read-write ratio value, the first threshold for allowing insertion of a read operation during the first operation process is inversely proportional to the read-write ratio value.

[0029] In a possible implementation, when the characteristic value includes the pressure value, a first threshold for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value.

[0030] In one possible implementation, when the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than a first pressure value, a first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the read-write ratio value; and if the pressure value is less than the first pressure value, a first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value.

[0031] In a possible implementation, when the characteristic value includes the read-write ratio value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value.

[0032] In a possible implementation, when the characteristic value includes the pressure value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value.

[0033] In one possible implementation, when the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than a second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value; if the pressure value is less than the second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value.

[0034] In one possible implementation, the SSD is connected to a computing device; the number of read operations performed by the SSD corresponds to the number of read operations generated by the computing device, and the number of write operations performed by the SSD corresponds to the number of read operations generated by the controller; the characteristic value includes the read-write ratio value; the controller is specifically used to: count a first number of first read operations performed by the SSD, where the first read operation is a read operation generated by the computing device; count a second number of second read operations performed by the SSD, where the second read operation is a read operation generated by the controller; and use the ratio of the first number to the second number as the read-write ratio value of the SSD.

[0035] In one possible implementation, the controller is specifically used to: count the first number of the first read operations in the first cache queue executed by the SSD; the controller is specifically used to: count the second number of the second read operations in the first cache queue executed by the SSD; the pressure value indicates the number of the first read operations waiting to be executed by the SSD in the second cache queue, wherein the first read operation in the first cache queue enters the first cache queue from the second cache queue, and the second read operation does not exist in the second cache queue.

[0036] In one possible implementation, the controller is specifically used to: periodically record and store characteristic values ​​related to the SSD; obtain the target characteristic value of the most recent period at the current time point; and dynamically adjust the number of read operations allowed to be inserted during a first operation based on the target characteristic value.

[0037] In a third aspect, an embodiment of the present application provides a computing device, which may include a processor; the computing device is connected to a solid-state drive (SSD); the processor is used to: obtain a characteristic value of the SSD, the characteristic value including at least one of a read-write ratio value or a pressure value, the read-write ratio value being the ratio of the number of read operations performed by the SSD to the number of write operations performed by the SSD, the pressure value indicating the number of read operations waiting to be executed in the SSD; based on the characteristic value, dynamically adjust the number of read operations allowed to be inserted during a first operation, the first operation being a write operation or an erase operation currently being executed in the SSD.

[0038] In one possible implementation, the processor is specifically used to: determine, based on the characteristic value, a first threshold for allowing insertion of read operations during the first operation; and dynamically adjust, according to the first threshold, the number of read operations allowed to be inserted during a first operation.

[0039] In one possible implementation, the processor is specifically used to: based on the characteristic value, obtain a pause operation strategy corresponding to the characteristic value, the pause operation strategy is a constraint condition for sending a pause (Suspend) operation during a first operation process, and the pause operation is used to insert a read operation into the first operation after suspending the first operation; send the pause strategy to the SSD so that the SSD dynamically adjusts the number of read operations allowed to be inserted during a first operation process based on the pause operation strategy.

[0040] In one possible implementation, the processor is specifically configured to: based on the feature value, obtain the pause operation strategy corresponding to the feature value from a pre-stored mapping relationship table, wherein the mapping relationship table includes a correspondence between the feature value and the pause operation strategy.

[0041] In a possible implementation, the pause operation policy is a second threshold value that allows the pause operation to be sent during a first operation.

[0042] In a possible implementation, the pause operation strategy is a third threshold for allowing insertion of a read operation after each pause operation is sent during a first operation.

[0043] In a possible implementation, when the characteristic value includes the read-write ratio value, the first threshold for allowing insertion of a read operation during the first operation process is inversely proportional to the read-write ratio value.

[0044] In a possible implementation, when the characteristic value includes the pressure value, a first threshold for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value.

[0045] In one possible implementation, when the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than a first pressure value, a first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the read-write ratio value; and if the pressure value is less than the first pressure value, a first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value.

[0046] In a possible implementation, when the characteristic value includes the read-write ratio value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value.

[0047] In a possible implementation, when the characteristic value includes the pressure value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value.

[0048] In one possible implementation, when the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than a second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value; if the pressure value is less than the second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value.

[0049] In one possible implementation, the number of read operations executed by the SSD corresponds to the number of read operations generated by the computing device, and the number of write operations executed by the SSD corresponds to the number of read operations generated by the controller; the characteristic value includes the read-write ratio value; the controller is specifically used to: count a first number of first read operations executed by the SSD, where the first read operation is a read operation generated by the computing device; count a second number of second read operations executed by the SSD, where the second read operation is a read operation generated by the controller; and use the ratio of the first number to the second number as the read-write ratio value of the SSD.

[0050] In one possible implementation, the processor is specifically used to: count the first number of the first read operations in the first cache queue executed by the SSD; the processor is specifically used to: count the second number of the second read operations in the first cache queue executed by the SSD; the pressure value indicates the number of the first read operations waiting to be executed by the SSD in the second cache queue, wherein the first read operation in the first cache queue enters the first cache queue from the second cache queue, and the second read operation does not exist in the second cache queue.

[0051] In one possible implementation, the processor is specifically used to: periodically record and store characteristic values ​​related to the SSD; obtain the target characteristic value of the most recent period at the current time point; and dynamically adjust the number of read operations allowed to be inserted during a first operation based on the target characteristic value.

[0052] In a fourth aspect, an embodiment of the present application provides a data reading device applied to a solid-state drive (SSD), which may include: an acquisition unit, used to acquire a characteristic value of the SSD, the characteristic value including at least one of a read-write ratio value or a pressure value, the read-write ratio value being the ratio of the number of read operations performed by the SSD to the number of write operations performed by the SSD, and the pressure value indicating the number of read operations waiting to be executed in the SSD; an adjustment unit, used to dynamically adjust the number of read operations allowed to be inserted during a first operation based on the characteristic value, the first operation being a currently executed write operation or erase operation.

[0053] In one possible implementation, the adjustment unit is specifically used to: determine a first threshold for allowing insertion of read operations in the first operation process based on the characteristic value; and dynamically adjust the number of read operations allowed to be inserted in a first operation process according to the first threshold.

[0054] In one possible implementation, the adjustment unit is specifically used to: based on the characteristic value, obtain a pause operation strategy corresponding to the characteristic value, the pause operation strategy is a constraint condition for sending a pause (Suspend) operation during a first operation process, and the pause operation is used to insert a read operation into the first operation after suspending the first operation; based on the pause operation strategy, dynamically adjust the number of read operations allowed to be inserted during a first operation process.

[0055] In a possible implementation, the adjustment unit is specifically configured to: based on the feature value, obtain the pause operation strategy corresponding to the feature value from a pre-stored mapping relationship table, wherein the mapping relationship table includes a correspondence between the feature value and the pause operation strategy.

[0056] In a possible implementation, the pause operation policy is a second threshold value that allows the pause operation to be sent during a first operation.

[0057] In a possible implementation, the pause operation strategy is a third threshold for allowing insertion of a read operation after each pause operation is sent during a first operation.

[0058] In a possible implementation, when the characteristic value includes the read-write ratio value, the first threshold for allowing insertion of a read operation during the first operation process is inversely proportional to the read-write ratio value.

[0059] In a possible implementation, when the characteristic value includes the pressure value, a first threshold for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value.

[0060] In one possible implementation, when the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than a first pressure value, a first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the read-write ratio value; and if the pressure value is less than the first pressure value, a first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value.

[0061] In a possible implementation, when the characteristic value includes the read-write ratio value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value.

[0062] In a possible implementation, when the characteristic value includes the pressure value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value.

[0063] In one possible implementation, when the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than a second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value; if the pressure value is less than the second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value.

[0064] In one possible implementation, the SSD is connected to a computing device; the number of read operations performed by the SSD corresponds to the number of read operations generated by the computing device, and the number of write operations performed by the SSD corresponds to the number of read operations generated by the controller; the characteristic value includes the read-write ratio value; the acquisition unit is specifically used to: count a first number of first read operations performed by the SSD, where the first read operation is a read operation generated by the computing device; count a second number of second read operations performed by the SSD, where the second read operation is a read operation generated by the controller; and use the ratio of the first number to the second number as the read-write ratio value of the SSD.

[0065] In one possible implementation, the acquisition unit is further specifically used to: count the first number of the first read operations in the first cache queue executed by the SSD; the acquisition unit is further specifically used to: count the second number of the second read operations in the first cache queue executed by the SSD; the pressure value indicates the number of the first read operations waiting to be executed by the SSD in the second cache queue, wherein the first read operation in the first cache queue enters the first cache queue from the second cache queue, and the second read operation does not exist in the second cache queue.

[0066] In one possible implementation, the acquisition unit is specifically used to: periodically record and store characteristic values ​​related to the SSD; obtain the target characteristic value of the most recent period at the current time point; and the adjustment unit is specifically used to dynamically adjust the number of read operations allowed to be inserted during a first operation based on the target characteristic value.

[0067] In a fifth aspect, an embodiment of the present application provides a controller, which includes a processing component, a storage component and a communication interface, and the processing component reads instructions stored on the storage component through the communication interface to execute the method described in the first aspect above.

[0068] In a sixth aspect, an embodiment of the present application provides a computer program, which includes instructions. When the computer program is executed by a computer, the computer can execute the process executed by the solid state drive SSD in the second aspect above.

[0069] In a seventh aspect, an embodiment of the present application provides a computer storage medium for storing computer software instructions for a solid-state drive (SSD) provided in the second aspect, which includes a program for executing the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments of the present application will be described below.

[0071] Figure 1 This is a schematic diagram of a data reading system architecture applied to a solid-state drive (SSD) provided in an embodiment of the present application.

[0072] Figure 2 It is a flowchart of a method for reading data through a pause operation provided in an embodiment of the present application.

[0073] Figure 3 It is a schematic diagram of a logic module of an SSD provided in an embodiment of the present application.

[0074] Figure 4 It is a schematic diagram of a logic module of another SSD provided in an embodiment of the present application.

[0075] Figure 5 This is a schematic diagram of a logic module of another SSD provided in an embodiment of the present application.

[0076] Figure 6 It is a schematic diagram of a logic module of a computing device provided in an embodiment of the present application.

[0077] Figure 7 It is a schematic diagram of a logic module of another computing device provided in an embodiment of the present application.

[0078] Figure 8 It is a flow chart of a data reading method applied to a solid state drive (SSD) provided in an embodiment of the present application.

[0079] Fig. 9 It is a flow chart of obtaining a read-write ratio value of an SSD provided in an embodiment of the present application.

[0080] Fig.10 This is a schematic diagram of an SSD counting first read operations and second read operations provided in an embodiment of the present application.

[0081] Fig.11 It is a flow chart of obtaining a pause operation strategy based on a pre-stored mapping relationship table provided in an embodiment of the present application.

[0082] Fig.12 It is a structural schematic diagram of a data reading device applied to a solid state drive (SSD) provided in an embodiment of the present application. DETAILED DESCRIPTION

[0083] The embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0084] The terms "first" and "second" etc. in this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0085] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0086] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program and / or a computer. By way of illustration, both applications running on a computing device and a computing device can be components. One or more components may reside in a process and / or an execution thread, and a component may be located on a computer and / or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may, for example, communicate through local and / or remote processes according to signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system and / or a network, for example, the Internet interacting with other systems through signals).

[0087] First, some terms in this application are explained to facilitate understanding by those skilled in the art.

[0088] (1) Solid State Drive (SSD), or solid-state hard disk, is a hard disk made of a solid-state electronic storage chip array. SSD consists of a control unit and a storage unit (Flash chip, DRAM chip). The operating temperature range of the chip is very wide and its application field is extensive. There are usually two types of storage media for solid-state hard disks, one is to use flash memory (Flash chip) as the storage medium, and the other is to use DRAM as the storage medium. The solid-state hard disk involved in the embodiment of the present application is a solid-state hard disk based on flash memory, that is, an SSD that uses a Flash chip as the storage medium. Its appearance can be made into a variety of styles, such as: notebook hard disk, micro hard disk, memory card, USB flash drive and other styles.

[0089] (2) NAND Flash is a non-volatile storage technology. NAND Flash storage units are divided into cells, dies, blocks, pages, cells, etc. Cell is the smallest memory unit. Multiple cells make up a page; multiple pages make up a block; and multiple blocks make up a die. In addition to the ability to save data after power failure, NAND Flash also has the following hardware characteristics: After a memory cell is written (programmed), the data represented can change from logic 1 to logic 0, but the cell cannot be restored to logic 1 by writing. It must be erased to restore to logic 1. The smallest unit of erasure in general flash memory is called a block. The operation time of erasing is generally longer than the operation time of reading and writing. At present, the flash memory particles of most SSDs are mainly divided into single-level cells (Single-Level Cell, SLC), double-level cells (Multi-Level Cell, MLC), triple-level cells (Trinary-Level Cell, TLC) and quadruple-level cells (Quadruple-Level Cell, QLC), and even multi-layer cells may appear; among them, TLC includes 3D-TLC and 2D-TLC; 3D-TLC can be subdivided into 32-layer 3D-TLC, 64-layer 3D-TLC and 96-layer 3D-TLC.

[0090] (3) I / O interface, or IO interface, can be a link for information exchange between a control object and a controlled object. The computing device of the present application exchanges data with a solid-state hard disk through an I / O interface. At present, most of the specific programs involved in the I / O interface are programmable, that is, their working mode can be controlled by a program.

[0091] (4) Host interface, or data bus, can include SATA, SAS and PCIe. Among them, Serial Advanced Technology Attachment (Serial ATA) is a computer bus responsible for data transmission between the motherboard and large-capacity storage devices (such as hard disks and optical drives), mainly used in personal computers; Serial ATA is compatible with serial SCSI (Serial Attached SCSI, SAS) cables, and SATA hard drives can be connected to the SAS interface. SAS (Serial Attached SCSI) is a serial attached SCSI interface, that is, a serial attached small computer system interface; like SATA hard drives, they all use serial technology to achieve higher transmission speeds and improve internal space by shortening the connection line. SAS is a new interface developed after the parallel SCSI interface. In order to improve the performance, availability and scalability of the storage system, it provides compatibility with SATA hard drives. The PCI Express bus (i.e. PCIe) is a high-speed serial replacement for the older PCI / PCI-X bus; PCI Express is based on a point-to-point topology, and a separate serial link connects each device to the root system (host). Due to its shared bus topology, access to the PCI bus in a single direction can be arbitrated (in the case of multiple masters) and restricted to one master at a time; furthermore, PCI Express bus links support full-duplex communication between any two endpoints, with no inherent limit on concurrent access across multiple endpoints.

[0092] (5) IOPS (Input / Output Operations Per Second), the number of reads and writes per second, can also be called the number of input / output operations per second. It is a measurement method used to test the performance of computer storage devices (such as hard disk drives (HDDs), solid-state drives (SSDs), or storage area networks (SANs)), which can be regarded as the number of reads and writes per second.

[0093] (6) Field Programmable Gate Array (FPGA) is a digital integrated circuit chip. FPGA is one of the physical implementation methods of digital circuits.

[0094] The following first describes one of the system architectures on which the embodiments of the present application are based. Figure 1 , Figure 1 is a schematic diagram of a data reading system architecture applied to a solid state drive (SSD) provided in an embodiment of the present application. Figure 1The architecture shown is mainly based on the solid state drive SSD and is described from the perspective of data reading. The data reading method of the solid state drive proposed in this application can be applied to the system architecture. The system architecture includes a computing device 10 (Host, the figure takes the processor 101 as an example, which is equivalent to the host) and a solid state drive (SSD) 20; Figure 1 Taking the controller 201 and the memory 202 integrated in the solid state drive 20 as an example, the solid state drive 20 may include the controller 201 and the memory 202; optionally, the controller 201 may be a processing device independent of the solid state drive 20, and execute data writing, data reading, and data erasing operations by connecting to the memory 202 in the solid state drive 20; and the memory 202 may also be an independent storage device, which will not be described in detail here. Figure 1 As shown, the memory 202 may also include multiple Flash storage areas, such as Flash 0, Flash 1, ..., Flash N, etc., where N is an integer greater than 0. The memory is equivalent to the storage array in the embodiment of the present application.

[0095] In the data reading system of the solid state drive SSD, the computing device 10 can send read operations, write operations, and erase operations to the SSD, and the controller 201 in the solid state drive can return the operation results to the processor 101. In the solid state drive, the controller sends read, write, and erase operations to the NAND Flash, and the NAND Flash returns the operation results to the controller. Please refer to the attached Figure 2 , Figure 2 1 is a flow chart of a method for reading data by pausing operation provided in an embodiment of the present application. Figure 2 In the application scenario shown, in order to reduce the read latency of the computing device, when the controller of the solid-state drive processes a read operation, if it is determined that a first operation is being executed on the NAND Flash to be accessed by the read operation, and the first operation is a write operation or an erase operation performed by the controller 201 on the storage array, the controller waits for the current read operation, first sends a suspend operation to the NAND Flash, suspends the first operation being executed, and then executes the read operation on the NAND Flash ( Figure 2 For the read operation after the pause operation has been issued, the controller directly issues the read operation to the NAND Flash for execution ( Figure 2 If there is no read operation for a period of time, the controller will send a resume operation to the NAND Flash to resume the first operation that was suspended (such as Figure 2 The order of issuing in the middle and down 3).

[0096] Specifically, when the processor 101 processes a data instruction, a data read command may be sent to the solid-state drive 20, and the solid-state drive 20 may be instructed to read the data in the storage area of ​​the solid-state drive 20 according to a preset rule through the read command. A data write command may also be sent to the solid-state drive 20, and the solid-state drive 20 may be instructed to write the data into the storage area of ​​the solid-state drive 20 according to a preset rule through the write command. A data erase command may also be sent to the solid-state drive 20, and the solid-state drive 20 may be instructed to erase the data originally stored in the storage area of ​​the solid-state drive 20 according to a preset rule through the erase command, so as to write new data.

[0097] In the embodiment of the present application, the processor 101 may also obtain data information in the solid state drive 20 so that the solid state drive can adjust the maximum number of read operations allowed to be inserted during a first operation.

[0098] The controller 201 in the solid-state drive 20 can obtain a characteristic value of the SSD, wherein the characteristic value includes at least one of a read-write ratio value or a pressure value, wherein the read-write ratio value is the ratio of the number of read operations executed by the SSD to the number of write operations executed by the SSD, and the pressure value indicates the number of read operations waiting to be executed in the SSD; based on the characteristic value, the number of read operations allowed to be inserted during a first operation is dynamically adjusted, wherein the first operation is a write operation or an erase operation currently being executed in the storage array (equivalent to the memory 202).

[0099] It is understandable that the solid-state drive can be configured in different devices, and different devices correspond to different forms of master control. The embodiment of the present application does not limit the form of the master control, such as a server or a computer.

[0100] When the aforementioned solid-state drive is configured in a computer (i.e., the computing device 10 is a computer), the solid-state drive 20 exchanges data with the computer's central processing unit CPU through a data bus. For example, the computer sends a write command to the solid-state drive 20 through the data bus to write specific data to the solid-state drive.

[0101] When the aforementioned solid-state drive is configured in a server (i.e., the computing device 10 is a server, which is the main server of the entire server network and processes all transactions in the server network), the server communicates and processes data through Wi-Fi, mobile network, etc. or wired connection. For example, the server sends a read command to the solid-state drive 20 through the data bus. After the solid-state drive receives the read command, the controller waits for the current read operation, first sends a pause operation to the NAND Flash, pauses the first operation being executed, and then performs a read operation on the NAND Flash to read data from the storage area. Other structures and functions are similar to the aforementioned electronic devices. The specific data reading scenarios after configuring the solid-state drive are also applicable to the application scenarios illustrated in the embodiments of the present application, which will not be repeated here.

[0102] It should be noted that the pause operation involved in the embodiment of the present application is equivalent to the Suspend operation, which is used to insert a certain number of read operations after suspending the write operation during a write operation; or, insert a certain number of read operations after suspending the erase operation during an erase operation. For example: the pause operation is sent to the NAND Flash. After receiving the pause operation, the NAND Flash will suspend the write or erase operation being executed (that is, the first operation), and then perform the read operation. To resume the suspended write or erase operation, the computing device can send a resume operation to the NAND Flash, which will resume the suspended write or erase operation. Among them, the resume operation is equivalent to the Resume operation.

[0103] Combination Figure 1 The system architecture shown in the embodiment of the present application also provides several related device diagrams of data reading in the SSD involving the interaction between the Host and the SSD, which can be applied to Figure 1 The system architecture is shown.

[0104] See also Figure 3 , Figure 3 is a schematic diagram of a logic module of an SSD provided in an embodiment of the present application; Figure 3 As shown, the built-in logic module of the SSD in the embodiment of the present application may include: an SSD controller 201, which is also the aforementioned Figure 1 The system architecture shown includes a controller 201 in an SSD; and a storage module 202, which may include a flash memory NAND Flash array, which is also the aforementioned Figure 1 The system architecture shown includes a memory 202; an interface module 203 for communicating with external devices. The controller 201 includes a sensing module 2011 and a feedback control module 2012. The sensing module 2011 may also include a read / write ratio value acquisition module and a pressure value acquisition module.

[0105] Specifically, the control (controller) module 201 is the control unit (ie, controller) of the SSD; it can be understood that the controller (or controller unit) is the brain of the SSD device, and is responsible for processing SSD read and write commands, data distribution management, NAND Flash management, and other functions.

[0106] The controller of the embodiment of the present application includes a perception module 2011 and a feedback control module 2012, and may also include an interface module 203. Among them, the perception module 2011 can be used to obtain a characteristic value, and the characteristic value includes at least one of a read-write ratio value or a pressure value. The perception module 2011 may also include a read-write ratio value acquisition module and a pressure value acquisition module. The read-write ratio value acquisition module is used to obtain the read-write ratio value of the SSD; the pressure value acquisition module is used to obtain the pressure value of the SSD. For example, the read-write ratio value acquisition module can obtain the read-write ratio value based on the ratio of the number of read operations executed by the SSD to the number of write operations executed by the SSD. The pressure value acquisition module can obtain the pressure value based on the number of read operations waiting to be executed in the SSD. For example: the number of read operations waiting in the SSD is 10, the pressure value can be 10, or it can be the pressure value corresponding to 10 read operations based on a preset mapping relationship.

[0107] The feedback control module 2012 can dynamically adjust the number of read operations allowed to be inserted during a first operation based on the characteristic values ​​acquired by the perception module 2011, such as at least one of a read-write ratio value or a pressure value.

[0108] It may also include: an interface module 203, which is used to connect to the Host 10 and undertake the functions of receiving read and write commands and transmitting data.

[0109] For example: By Figure 3 For the SSD shown, you can execute:

[0110] 1. The pressure value acquisition module acquires the pressure value within a certain period.

[0111] 2. The module for obtaining the read-write ratio value obtains the read-write ratio value within a certain period.

[0112] 3. The feedback control module reads the above pressure value and read-write ratio value.

[0113] 4. The feedback control module obtains the pause operation strategy through the obtained pressure value and read-write ratio value index, and adjusts the number of read operations allowed to be inserted in a first operation process based on the pause operation strategy. Alternatively, the feedback control module directly adjusts the number of read operations allowed to be inserted in a first operation process through the obtained pressure value and read-write ratio value.

[0114] In one possible implementation, see Figure 4 , Figure 4 FIG. 1 is a schematic diagram of another logic module of an SSD provided in an embodiment of the present application. Figure 3 The SSD shown is different. Figure 4 In the controller 201 of the SSD shown in FIG. 1 , the sensing module 2011 includes a module for obtaining a read-write ratio value, but does not include a module for obtaining a pressure value. Figure 3 Compared with the execution process shown, the SSD can obtain the read-write ratio value, and the feedback control module can adjust the number of read operations allowed to be inserted during a first operation based on the read-write ratio value obtained by the perception module 2011.

[0115] In one possible implementation, see Figure 5 , Figure 5 FIG. 1 is another schematic diagram of a logic module of an SSD provided in an embodiment of the present application. Figure 3 The SSD shown is different. Figure 5 In the controller 201 of the SSD shown in FIG. 1 , the sensing module 2011 does not include a module for obtaining a read-write ratio value, but includes a module for obtaining a pressure value. Figure 3 Compared with the execution process shown, the SSD can obtain the pressure value, and the feedback control module adjusts the number of read operations allowed to be inserted during a first operation based on the pressure value obtained by the perception module 2011.

[0116] In the present embodiment of the application, the perception module and feedback control module in the SSD and each module therein can be implemented by hardware (such as FPGA, hardware acceleration unit, etc.) or by software.

[0117] The description of the Host, the processor included in the Host, and other contents in the Host in the embodiments of the present application can be referred to the following embodiments, so they are not specifically described and identified in the embodiments of the present application.

[0118] Combination Figure 1 The system architecture shown in the figure, the embodiment of the present application also provides several other computer device schematic diagrams involving the interaction between the Host and the SSD, which can be applied to Figure 1 For the system architecture shown, see Figure 6 , Figure 6 Schematic diagram of a logic module of a computing device provided in an embodiment of the present application. Figure 6 As shown, the built-in logic module of the computing device in the embodiment of the present application may include: processor 101, which is also the aforementioned Figure 1The system architecture shown is a processor 101 in a computing device. The processor 101 includes: a perception module 1011 and a feedback control module 1012. The perception module 1011 may also include a read-write ratio value acquisition module and a pressure value acquisition module. The solid-state drive SSD connected to the computing device includes: a controller 201, which is also the aforementioned Figure 1 The system architecture shown is an SSD and a controller 201 in the SSD; and a storage module 202, which is also the aforementioned Figure 1 The memory 202 in the system architecture shown may also include an interface module 203, which may be used to communicate with a computing device.

[0119] The processor 101 of the embodiment of the present application involves a perception module 1011, and the perception module 1011 may also include a module for obtaining a read-write ratio value and a module for obtaining a pressure value. The perception module 1011 may be used to obtain a characteristic value, and the characteristic value includes at least one of a read-write ratio value or a pressure value. Among them, the module for obtaining a read-write ratio value in the perception module 1011 is used to obtain the read-write ratio value of the SSD; the module for obtaining a pressure value in the perception module 1011 is used to obtain the pressure value of the SSD. For example, the module for obtaining a read-write ratio value may obtain a read-write ratio value based on the ratio of the number of read operations executed by the SSD to the number of write operations executed by the SSD. The module for obtaining a pressure value may obtain a pressure value based on the number of read operations waiting to be executed in the SSD. For example, if the number of read operations waiting in the SSD is 10, the pressure value may be 10, or it may be a pressure value corresponding to 10 read operations based on a preset mapping relationship.

[0120] The feedback control module 1012 can obtain a pause operation strategy based on the data obtained by the perception module 1011, and send the pause operation strategy to the SSD, so that the SSD adjusts the maximum number of read operations allowed to be inserted during a first operation based on the pause operation strategy.

[0121] Optionally, the feedback control module 1012 can also obtain a pause operation strategy based on the feature value obtained by the perception module 1011; generate a target instruction according to the pause operation strategy and send it to the SSD, so that the SSD adjusts the number of read operations allowed to be inserted during a first operation based on the target instruction.

[0122] For example: By Figure 6 The computing device shown may execute:

[0123] 1. The pressure value acquisition module acquires the pressure value within a certain period.

[0124] 2. The module for obtaining the read-write ratio value calculates the read-write ratio value within a certain period.

[0125] 3. The feedback control module reads the pressure value and the read-write ratio value.

[0126] 4. The feedback control module obtains a pause operation strategy through the obtained pressure value and read-write ratio value index, and sends the pause operation strategy to the SSD, so that the SSD adjusts the number of read operations allowed to be inserted in a first operation process based on the pause operation strategy.

[0127] In one possible implementation, Figure 6 Different from the computing device shown in FIG. 1 , in the processor 101 of the computing device, the sensing module 1011 includes a module for obtaining a read-write ratio value, but does not include a module for obtaining a pressure value. Figure 6 Compared with the computing device execution process shown in the figure, the computing device can obtain the read-write ratio value, and the feedback control module can obtain the pause operation strategy based on the read-write ratio value obtained by the perception module 1011, and send the pause operation strategy to the SSD, so that the SSD can adjust the number of read operations allowed to be inserted during a first operation based on the pause operation strategy.

[0128] In one possible implementation, Figure 6 Unlike the SSD shown in FIG. 1 , in the processor 101 of the computing device, the sensing module 1011 does not include a module for obtaining a read-write ratio value, but includes a module for obtaining a pressure value. Figure 6 Compared with the computing device execution process shown in the figure, the computing device can obtain the pressure value. Moreover, the feedback control module can obtain the suspension operation strategy based on the pressure value obtained by the perception module 1011, and send the suspension operation strategy to the SSD, so that the SSD can adjust the number of read operations allowed to be inserted in a first operation process based on the suspension operation strategy.

[0129] In one possible implementation, see Figure 7 , Figure 7 Schematic diagram of a logic module of another computing device provided in an embodiment of the present application. Figure 6 The computing devices shown are different. Figure 7 The processor 201 of the computing device shown in the figure includes a sensing module 1011, but does not include a feedback control module. The sensing module 1011 includes a module for obtaining a read / write ratio value and a module for obtaining a pressure value. The controller 201 of the SSD connected to the computing device includes a feedback control module 2012. Therefore, Figure 6 Compared with the execution process of the computing device shown, the computing device can execute:

[0130] 1. The pressure value acquisition module acquires the pressure value within a certain period.

[0131] 2. The module for obtaining the read-write ratio value calculates the read-write ratio value within a certain period.

[0132] 3. Send the pressure value and read-write ratio value to the SSD.

[0133] It should be noted that after the computing device sends the pressure value and the read-write ratio value to the SSD, the SSD controller receives the pressure value and the read-write ratio value; then the feedback control module in the SSD obtains the pause operation strategy through the obtained pressure value and read-write ratio value, and adjusts the maximum number of read operations allowed to be inserted during a first operation based on the pause operation strategy.

[0134] In one possible implementation, Figure 7 Different from the computing device shown in FIG. 1 , in the processor 101 of the computing device, the sensing module 1011 includes a module for obtaining a read-write ratio value, but does not include a module for obtaining a pressure value. Figure 7 Compared with the execution process of the computing device shown, the computing device obtains the read-write ratio value and sends the obtained read-write ratio value to the SSD. The controller of the SSD receives the read-write ratio value; then the feedback control module of the SSD obtains the pause operation strategy through the obtained read-write ratio value, and adjusts the maximum number of read operations allowed to be inserted in a first operation process based on the pause operation strategy.

[0135] In one possible implementation, Figure 7 Unlike the SSD shown in FIG. 1 , in the processor 101 of the computing device, the sensing module 1011 does not include a module for obtaining a read-write ratio value, but includes a module for obtaining a pressure value. Figure 7 Compared with the execution process of the computing device shown, the computing device obtains the pressure value and sends the obtained pressure value to the SSD. The controller of the SSD receives the pressure value; then the feedback control module of the SSD can obtain the pause operation strategy through the obtained pressure value, and adjust the maximum number of read operations allowed to be inserted in a first operation process based on the pause operation strategy.

[0136] The description of the SSD, the controller included in the SSD, and other contents in the SSD in the embodiments of the present application can refer to the above embodiments and the following method embodiments, so they are not specifically described and identified in the embodiments of the present application.

[0137] In an embodiment of the present application, the perception module and the feedback control module in the computing device and each module therein can be implemented by hardware (such as FPGA, hardware acceleration unit, etc.) or by software.

[0138] Based on the above Figure 1 The system architecture provided, as well as the above Figure 3The structure of the solid-state hard disk provided, combined with the management method for data reading in the solid-state hard disk SSD provided in this application, specifically analyzes and solves the technical problems raised in this application.

[0139] See also Figure 8 , Figure 8 is a flow chart of a data reading method for a solid state drive (SSD) provided in an embodiment of the present application. The method can be applied to the above Figure 1 In the data reading system architecture for a solid state drive SSD described in the above, the solid state drive SSD20 can be used to support and execute Figure 8 The data reading method for a solid state drive SSD shown in FIG. 1 is a flow chart of steps S301 to S305. Figure 8 The method is described from the controller side of a solid state drive, and the solid state drive is connected to a computing device. The method may include the following steps S301 to S305.

[0140] Step S301: Count the number of read operations performed by the SSD.

[0141] Specifically, the SSD can obtain the number of read operations performed by the SSD so as to obtain the read-write ratio value of the SSD. The method of obtaining the number of read operations performed by the SSD can be direct statistics by the controller in the SSD, or statistics can be obtained by other counting devices or modules connected to the SSD. Among them, the read operation is to read out the data stored in the memory. The time for the SSD to perform a read operation is less than the time to perform a write operation, and is also less than the time to perform an erase operation. Moreover, when the SSD performs a read operation, it can record the number of read operations performed so far.

[0142] Optionally, the number of read operations executed by the SSD corresponds to the number of read operations generated by the computing device. That is, the read-write ratio value obtained by the SSD is the ratio between the number of read operations generated by the computing device and the number of write operations generated by the computing device. Therefore, the SSD can count the first number of first read operations executed by the SSD, wherein the first read operation is a read operation generated by the computing device. Since each read operation executed by the SSD has a flag bit, the flag bit can be used to identify whether the read operation is generated by the computing device or generated by the controller in the SSD itself. Therefore, the SSD can identify the first read operation based on the flag on the read operation, and then the SSD can count the first number of first read operations executed.

[0143] Optionally, the SSD may count the first number of the first read operations in a first cache queue executed by the SSD, wherein the first cache queue is a message queue storing the first read operations and the second read operations in the SSD.

[0144] Step S302: Count the number of write operations performed by the SSD.

[0145] Specifically, before obtaining the read-write ratio value, the SSD needs to obtain the number of write operations performed by the SSD. The method of obtaining the number of write operations performed by the SSD can also be direct statistics by the controller in the SSD, or statistics can be obtained by other counting devices or modules connected to the SSD. In general, the time for the SSD to perform a write operation is much longer than the time for the SSD to perform a read operation.

[0146] Optionally, the number of write operations performed by the SSD corresponds to the number of read operations generated by the controller. That is, when the SSD obtains the number of write operations performed by the SSD, the second number of second read operations performed by the SSD can be counted, wherein the second read operation is a read operation generated by the controller. Because in general, when the SSD updates the data in the written position, it will write the data to the new position, and mark the data originally written to the position as garbage (invalid data). When the storage space of the SSD is written to a certain proportion, it will trigger the background garbage collection to release the storage space (after reading the valid data, aggregating and moving it to the new storage location, erasing the data at the original location), so a corresponding amount of storage space must be released when writing new data. Therefore, the number of write operations generated by the executing computing device can correspond to the number of read operations generated by the executing controller itself. Therefore, in the embodiment of the present application, the read operation generated by the controller can refer to the count of the executed write operations.

[0147] It should be noted that the embodiments of the present application do not limit the correspondence between the number of read operations generated by the execution controller and the number of write operations performed. The number of write operations performed by the SSD can be the number of read operations generated by the execution controller, for example: the number of read operations generated by the execution controller is directly used as the number of write operations performed. Alternatively, the number of write operations performed by the SSD is linearly related to the number of read operations generated by the execution controller. For example: 10 times the number of read operations generated by the execution controller is used as the number of write operations performed. The present application does not make any specific limitation on this.

[0148] Optionally, the controller counts the second number of the second read operations in the first cache queue executed by the SSD, wherein the second read operation is a read operation generated by the controller, and the first cache queue includes a first read operation and a second read operation.

[0149] Step S303: Obtain the read-write ratio value.

[0150] Specifically, the SSD obtains a characteristic value, and the characteristic value includes a read-write ratio value, and the read-write ratio value is the ratio of the number of read operations performed by the SSD to the number of write operations performed by the SSD. For example: when the number of read operations performed by the SSD is 10 and the number of write operations performed by the SSD is 1, the read-write ratio value is 10. Optionally, the read-write ratio value can also be a numerical value corresponding to the ratio between the number of read operations performed by the SSD and the number of write operations performed by the SSD based on a pre-stored correspondence. For another example: when the number of read operations performed by the SSD is 10 and the number of write operations performed by the SSD is 1, the read-write ratio value can also be 1 / 10.

[0151] Please refer to the attached Fig. 9 , Fig. 9 1 is a flow chart of obtaining a read-write ratio value of an SSD provided in an embodiment of the present application. Fig. 9 As shown, the controller in the SSD can periodically record and store the read-write ratio value of the SSD. First, in the first preset cycle, the read-write ratio value is calculated. When calculating the read-write ratio value, the controller processes the read operation in the first cache queue, and the read operation in the first cache queue includes the first read operation and the second read operation. By judging the values ​​of the two counters, the proportional relationship between the read I / O and the write I / O can be calculated. After calculating the ratio and saving it, the counter A and the counter B can be cleared respectively, the statistics of the cycle are ended, and the calculation of the next cycle can be started. Among them, the controller can include counter A and counter B, and counter A records the number of read operations (first read operations) generated from the computing device. Counter B records the number of read operations (second read operations) generated by the controller itself instead of the computing device. It should be noted that counter A and counter B count once for each read operation executed according to the corresponding strategy, and the read operation waiting in the first cache queue is not counted. Therefore, the first number and the second number are the first read operation and the second read operation that the controller is executing or has executed, respectively.

[0152] Optionally, the SSD can periodically record and store the read-write ratio value of the SSD to obtain the target read-write ratio value of the most recent cycle at the current time point. For example, if the read-write ratio value is recorded every 10 minutes, then in the fifth cycle, when the SSD needs to obtain the read-write ratio value, the read-write ratio value calculated in the fourth cycle is the read ratio value that the SSD needs to obtain.

[0153] Step S304: Obtain the pressure value.

[0154] Specifically, the SSD obtains a characteristic value, and the characteristic value includes a pressure value. The pressure value indicates the number of read operations waiting to be executed in the SSD. The pressure value can be directly equal to the number of read operations waiting to be executed. For example, when the number of read operations waiting to be executed in the SSD is 10, the pressure value can be 10. The number of read operations waiting to be executed in the SSD can also be divided into multiple levels, and each level in the multiple levels corresponds to a different pressure value. For example, the number of read operations waiting to be executed in the SSD is divided into three levels, wherein the number of read operations waiting to be executed is less than 10, and the corresponding pressure value is 1; the number of read operations waiting to be executed is 10-50, and the corresponding pressure value is 2; the number of read operations waiting to be executed is greater than 50, and the corresponding pressure value is 3. The pressure value can also be based on a pre-stored corresponding relationship, and the value corresponding to the number of read operations waiting to be executed in the SSD. For example, according to the pre-stored corresponding relationship, the pressure value = the number of read operations waiting to be executed * k + b, wherein k and b can be constants.

[0155] Optionally, the SSD obtains the number of the first read operations waiting to be executed by the SSD in the second cache queue. The first read operation in the first cache queue is entered into the first cache queue by the second cache queue, and the second read operation does not exist in the second cache queue. It is understandable that the first read operation waiting to be executed in the SSD will be entered into the first cache queue by the second cache queue for execution. The SSD obtains the number of the first read operations waiting to be executed by the SSD in the second cache queue, that is, obtains the pressure value.

[0156] Optionally, the SSD can periodically record and store pressure values, and obtain the target pressure value of the most recent period at the current time point. For example: if the pressure value is recorded every 15 minutes, then in the fifth period, when the SSD needs to obtain the pressure value, the pressure value counted in the fourth period is the pressure value that the SSD needs to obtain. The SSD can also periodically record and store pressure values, and the SSD obtains the target pressure value after calculation according to preset rules. So that the SSD can dynamically adjust the number of read operations allowed to be inserted during a first operation based on the target pressure value. It should be noted that there is no direct connection between the period for counting the read-write ratio value and the period for counting the pressure value.

[0157] For example, in the embodiment of the present application, the target pressure value is the pressure value corresponding to the first M cycles including the current cycle, and the pressure value with the largest pressure value is the target pressure value. Fig.10 , Fig.10 Schematic diagram of an SSD counting first read operation and second read operation provided by an embodiment of the present application. Fig.10As shown, the service perception device reads the number of first read operations queued in the second cache queue once every timing cycle T2 (i is the count value of the counter C, starting from 0, representing the i-th cycle), and Yi represents the number of first read operations waiting to be executed in the second cache queue of the i-th cycle. Since the execution time of a single read operation is very short, the volatility of Yi within a cycle will be relatively large. Therefore, in order to better determine the pressure value in the SSD, the maximum value Y_max of a total of M values ​​(M greater than 1) from Y_(i-m+1) to Yi can be used as the target pressure value (M is a preset value). If i is less than M, the maximum value of i service pressure values ​​is used as the target pressure value. For example: M=5, the pressure values ​​of 5 cycles are 15, 20, 17, 16, and 10 respectively, and the target pressure value is 20. If there are not yet 5 cycles counted, but only 3 cycles, and the pressure values ​​corresponding to the 3 cycles are 13, 15, and 8 respectively, then the target pressure value is 15.

[0158] Step S305: Based on the characteristic value, dynamically adjust the number of read operations allowed to be inserted during a first operation.

[0159] Specifically, the SSD can dynamically adjust the number of read operations allowed to be inserted during a first operation based on the characteristic value. The characteristic value includes at least one of a read-write ratio value or a pressure value, and the first operation is a currently executed write operation or erase operation. The characteristic value can be used to indicate the efficiency of executing a read operation in the SSD (such as a read-write ratio value), or the pressure of waiting to execute a read operation (such as a pressure value). Therefore, the SSD can dynamically adjust the number of read operations allowed to be inserted during a currently executed write operation or erase operation based on the read-write ratio value, or the pressure value, or the read-write ratio value and the pressure value. For example: when the read-write ratio value is too large, it means that the efficiency of executing a read operation is high, and the first operation currently being executed will be frequently interrupted. Therefore, based on the number of currently allowed read operations, the number of read operations allowed to be inserted during a write operation or erase operation can be reduced to prevent the read operation from frequently interrupting the execution of the write operation or erase operation, so as to improve system performance.

[0160] Optionally, the dynamically adjusting the number of read operations allowed to be inserted during a first operation based on the characteristic value includes: determining a first threshold value for allowing read operations to be inserted during the first operation based on the characteristic value; and dynamically adjusting the number of read operations allowed to be inserted during a first operation based on the first threshold value. Wherein, the first threshold value is the maximum number of read operations allowed to be inserted during the first operation, that is, it indicates that the number of read operations inserted during the first operation can be less than the first threshold value but cannot be greater than the first threshold value, and thus the number of read operations allowed to be inserted during a first operation can be adjusted. Since during the execution of a first operation, the SSD can count once each time it interrupts the first operation and executes a read operation to record the number of read operations inserted so far. Therefore, when implementing the embodiment of the present application, after directly configuring the first threshold value for allowing read operations to be inserted during a first operation, the number of read operations inserted is counted, and after reaching the maximum number allowed to be inserted, the read operation is prohibited from being inserted again, so as to achieve the purpose of adjusting the number of read operations. In this way, the number of read operations allowed to be inserted can be adjusted intuitively and conveniently, thereby improving the performance of the SSD.

[0161] Optionally, the dynamically adjusting the number of read operations allowed to be performed during a first operation based on the characteristic value includes: based on the characteristic value, obtaining a pause operation strategy corresponding to the characteristic value, the pause operation strategy is a constraint condition for sending a pause (Suspend) operation during a first operation, the pause operation is used to insert a read operation into the first operation after suspending the first operation; based on the pause operation strategy, dynamically adjusting the number of read operations allowed to be inserted into a first operation. In an embodiment of the present application, the pause operation is used to suspend the first operation during a first operation, and then insert a read operation into the first operation after the pause operation is used. Therefore, the embodiment of the present application can dynamically adjust the number of read operations allowed to be inserted after the use of the pause operation by adjusting the constraint conditions of the pause operation, such as: adjusting the use frequency of the pause operation, adjusting the use number of the pause operation, etc.

[0162] In a possible implementation, the method of obtaining a pause operation strategy corresponding to the characteristic value based on the characteristic value includes: obtaining the pause operation strategy corresponding to the characteristic value from a pre-stored mapping relationship table based on the characteristic value, and the mapping relationship table includes the correspondence between the characteristic value and the pause operation strategy. In an embodiment of the present application, the method of obtaining the pause operation strategy may be to determine it directly according to the characteristic value from a pre-stored mapping relationship table. Determining the pause operation strategy from a pre-stored mapping relationship table can quickly and conveniently save calculation steps, greatly shorten the time to obtain the pause operation strategy, and also improve the efficiency of adjusting the number of read operations allowed to be inserted, thereby improving the performance of the SSD. For example: Please refer to Table 1 below, which is a mapping relationship table provided in an embodiment of the present application, which is used to obtain a pause operation strategy corresponding to the characteristic value based on the characteristic value. Among them, the characteristic value includes a read-write ratio value and a pressure value.

[0163] Table 1: Pre-stored mapping relationship table

[0164]

[0165] In the above Table 1, the pressure value interval indicates that the pressure value is divided into P intervals according to a certain strategy, and each interval has its corresponding suspension operation strategy. Similarly, the read-write ratio value interval indicates that the read-write ratio value is divided into Q intervals according to a certain strategy, and each interval has its corresponding suspension operation strategy. Among them, the suspension operation strategy is respectively expressed as: the maximum number of suspension operations that the controller can issue during a write operation R1, the number of read operations that the controller can issue after suspending the write operation through a suspension operation during a write operation R2, the total number of read operations that the controller can issue during a write operation R3, the maximum number of suspension operations that the controller can issue during an erase operation R4, the number of read operations that the controller can issue during an erase operation R5 after suspending the erase operation through a suspension operation during an erase operation, and the total number of read operations that the controller can issue during an erase operation R6.

[0166] Please refer to the attached Fig.11 , Fig.11 FIG. 1 is a flow chart of obtaining a pause operation strategy based on a pre-stored mapping relationship table provided by an embodiment of the present application. Fig.11As shown, within a preset cycle, the SSD can obtain a read-write ratio value and determine the interval according to the read-write ratio value; the SSD can also obtain a pressure value and determine the interval according to the pressure value. Then, according to the interval where the read-write ratio value and / or the interval where the pressure value is located, the pause operation strategy corresponding to the current cycle is determined. For example: if the pressure value obtained by the SSD is in the pressure value interval 1, and the read-write ratio value obtained by the SSD is in the read-write ratio value interval 1, it can be seen from the table that the pause operation strategy is R1=8, R2=5, R3=30, R4=8, R5=3, R6=20. Therefore, within this cycle, the maximum number of pause operations that the controller can issue during a write operation is 8, the number of read operations that the controller can issue after suspending the write operation through a pause operation during a write operation is 5, the total number of read operations that the controller can issue during a write operation is 30, the maximum number of pause operations that the controller can issue during an erase operation is 8, the number of read operations that the controller can issue after suspending the erase operation through a pause operation during an erase operation is 3, and the total number of read operations that the controller can issue during an erase operation is 20.

[0167] It can be understood that when the corresponding pause operation strategy in the table includes one or more of R1, R2, R3, R4, R5, and R6, it means that Table 1 does not impose too many restrictions on the remaining strategies not included, or is a pre-set default value, and the embodiment of the present application does not make specific limitations.

[0168] It can also be understood that the values ​​in Table 1, as well as the number and types of pause operation strategies, are only examples of adaptability. In the specific configuration process, it is also necessary to configure the adaptability according to the performance of the SSD, and the embodiments of the present application do not make specific limitations. Moreover, when R1, R2 and R3 exist at the same time or when R4, R5 and R6 exist at the same time, it is necessary to limit the maximum number of pause operations that can be issued by the controller in a first operation process to the product of the maximum number of read operations that can be issued after each pause operation is issued in a first operation process, which must be greater than the maximum number of read operations allowed to be inserted in a first operation process. That is, the product of R1 and R2 in Table 1 is not less than R3, and the product of R4 and R5 is not less than R6. For example: if the pressure value obtained by the SSD is in the pressure value interval 1, and the read-write ratio value obtained by the SSD is in the read-write ratio value interval Q, it can be seen from the table that R1=4, R2=3, R3=8, R4=3, R5=3, R6=5, where the product of R1 and R2 is greater than R3, and the product of R4 and R5 is greater than R6. If the product of R1 and R2 is less than R3 or the product of R4 and R5 is less than R6, it is meaningless to limit R3 or R6 at this time.

[0169] It should be noted that in the pre-stored mapping relationship table, the division method and the number of divisions of the pressure value interval and the read-write ratio value interval may be different.

[0170] It should also be noted that the above Table 1 is only one of the mapping methods provided by the present application, and the embodiments of the present application may also include other classification methods, for example: the pre-stored mapping table may include the target value obtained after the characteristic value is related to the operation, and the pause operation strategy corresponding to the target value. The pre-stored mapping table also includes the read-write ratio value, or the pressure value, or the pause operation strategy corresponding to the read-write ratio value and the pressure value, which is not specifically limited by the present application.

[0171] Optionally, the pause operation policy is a second threshold value for allowing the pause operation to be sent during a first operation. The second threshold value is the maximum number of pause operations allowed to be sent during a first operation, and the pause operation is used to insert a read operation into the first operation after pausing the first operation. During a first operation, the embodiment of the present application directly limits the maximum number of pause operations used, that is, by limiting the number of times a first operation is interrupted, and thus the maximum number of read operations allowed to be inserted can be limited, thereby improving the performance of the SSD. For example: by limiting the maximum number of pause operations allowed to be sent, the write operation or erase operation being executed will not be frequently paused to perform a read operation, because at this time the main bottleneck of the performance (input / output operations per second (IOPS)) is the write IOPS, so reducing the threshold can reduce the interruption of the write operation, and the IOPS performance of the SSD will be higher.

[0172] Optionally, the pause operation strategy is a third threshold value for allowing insertion of a read operation after each pause operation is sent during a first operation. The third threshold value is the maximum number of read operations allowed to be inserted after each pause operation is sent during a first operation, that is, the upper limit of the number of read operations allowed to be inserted after each pause operation is sent. The embodiment of the present application controls the maximum number of pause operations allowed to be sent during a first operation by configuring the maximum number of read operations allowed to be inserted after the pause operation is sent once. That is, by controlling the maximum number of inserted read operations each time a pause operation is sent, the total execution time of a read operation that is paused is controlled, thereby reducing the time that each pause operation interrupts the first operation, thereby improving the performance of the SSD.

[0173] Optionally, when the characteristic value includes the read-write ratio value, the first threshold value for allowing insertion of read operations during the first operation is inversely proportional to the read-write ratio value. For example, the corresponding reference may be made to the pause operation strategy involved in the above Table 1. The larger the read-write ratio value, the higher the proportion of read operations. Therefore, the main bottleneck of the SSD's IOPS performance is the write IOPS. At this time, the first threshold value for allowing insertion of read operations is set to a smaller threshold value, so there will not be too many read operations frequently interrupting the execution of write operations. Therefore, reducing the first threshold value for inserting read operations can reduce the interruption of write operations, thereby improving the performance of the SSD.

[0174] Optionally, when the characteristic value includes the pressure value, the first threshold for allowing insertion of read operations during the first operation is inversely proportional to the pressure value. For example, the pause operation strategy involved in the above Table 1 may be referred to accordingly. The larger the pressure value, the more read operations are waiting to be executed. At this time, it is necessary to lower the first threshold for allowing insertion of read operations to prevent excessive read operations from interrupting the execution of write operations. If the pressure value is small, it means that the computing device is more focused on the read latency of the read operation. At this time, a larger threshold for allowing the first threshold for sending the pause operation should be configured to allow the read operation to interrupt the write operation or erase operation as much as possible, so that the read operation can be completed as soon as possible.

[0175] Optionally, when the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than the first pressure value, the first threshold value for allowing the insertion of the read operation during the first operation is inversely proportional to the read-write ratio value, and if the pressure value is less than the first pressure value, the first threshold value for allowing the insertion of the read operation during the first operation is inversely proportional to the pressure value. In the embodiment of the present application, when the read-write ratio value and the pressure value are obtained at the same time, if the pressure value is greater than the first pressure value (such as: the pressure value is large enough), if you want to quickly improve the efficiency of NAND Flash in performing read, write and erase operations, you also need to adaptively reduce the first threshold value for allowing the insertion of the read operation according to the read-write ratio value executed by the SSD, and reduce the interruption of the read operation to the first operation, so as to improve the IOPS performance of the SSD. If the pressure value is less than the first pressure value (the pressure value is small enough), it means that the number of read operations waiting at this time is small, and the computing device is more focused on the read delay of the read operation. At this time, a larger first threshold value for allowing the insertion of the read operation can be configured to allow the read operation to interrupt the first operation as much as possible, so that the read operation can be executed as soon as possible.

[0176] Optionally, when the characteristic value includes the read-write ratio value, the second threshold value for allowing the suspension operation to be sent during the first operation is inversely proportional to the read-write ratio value. For example, the suspension operation strategy involved in the above Table 1 may be referred to. When the read-write ratio value is larger, the proportion of executing read operations is higher. Therefore, at this time, the main bottleneck of the IOPS performance of the SSD is the write IOPS. At this time, the second threshold value for allowing the suspension operation to be sent is set to a smaller threshold value, so the read operation will not frequently interrupt the execution of the first operation. Therefore, reducing the threshold value can reduce the interruption of the write operation, and the IOPS performance will be higher. For example, when the second threshold value for allowing the suspension operation to be sent is set to 0, the read operation will not disturb the first operation, and the focus is on the write operation. On the contrary, the smaller the ratio of the ratio of the read operation to the write operation, the higher the proportion of the write operation. At this time, the performance of the SSD depends more on the execution of the read operation, so the second threshold value for allowing the suspension operation to be sent is set to a larger threshold value, so the read operation can frequently interrupt the execution of the first operation, which can make the read operation execute faster, and the performance of the SSD will be higher.

[0177] Optionally, when the characteristic value includes the pressure value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value. For example, the pause operation strategy involved in the above Table 1 may be referred to accordingly. The larger the pressure value, the more attention is paid to IOPS performance on the computing device. Therefore, when the pressure value is large, the second threshold for sending the pause operation can be reduced accordingly. If the pressure value is small, it means that the computing device is more focused on the read latency of the read operation. At this time, a larger second threshold for allowing the pause operation to be sent should be configured to allow the read operation to interrupt the first operation as much as possible, so that the read operation can be executed and completed as soon as possible.

[0178] Optionally, when the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than the second pressure value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value; if the pressure value is less than the second pressure value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value. In an embodiment of the present application, if the pressure value is greater than the second pressure value, it means that the computing device is more concerned about the IOPS performance of the SSD. Therefore, when the pressure value is large, the second threshold for allowing the pause operation to be sent is configured according to the ratio of read I / O and write I / O on the SSD. If the pressure value is less than the second pressure value, it means that the computing device is more focused on the read latency of the read operation. At this time, a larger second threshold for allowing the pause operation to be sent should be configured to allow the read operation to interrupt the first operation as much as possible, so that the read operation can be executed as soon as possible.

[0179] It should be noted that in the embodiment of the present application, there is no special connection between the magnitudes of the first pressure value and the second pressure value. For example, the first pressure value and the second pressure value can be the same or different; the first pressure value can be greater than the second pressure value or less than the second pressure value. The user can set the above two pressure values ​​according to the actual performance of the SSD, and the embodiment of the present application does not make specific limitations on this.

[0180] In an embodiment of the present application, a characteristic value of the SSD may be first obtained, and the characteristic value includes at least one of a read-write ratio value or a pressure value. Since the read-write ratio value is the ratio of the number of read operations performed by the SSD to the number of write operations performed by the SSD, the pressure value is used to indicate the number of read operations waiting to be executed in the SSD. Therefore, the efficiency and pressure of the SSD currently performing read, write or erase operations may be determined by the obtained characteristic value. If the efficiency is low and the pressure is high, the number of read operations allowed to be inserted during a first operation may be dynamically adjusted according to at least one of the obtained read-write ratio value or pressure value, so as to improve the efficiency of the NAND Flash in performing read, write and erase operations, thereby improving the performance of the SSD.

[0181] It should be noted that the method in the embodiment of the present application is implemented in the above Figure 3-Figure 5 The solid state drive, and Figure 6 , Figure 7 The same is applicable to the computing device shown in FIG. 1 , and its specific implementation can also refer to the above Figure 8 The method embodiment shown is not described in detail in the present application.

[0182] The method of the embodiment of the present application is described in detail above, and the related device of the embodiment of the present application is provided below.

[0183] See also Fig.12 , Fig.12 1 is a schematic diagram of the structure of a data reading device for a solid state drive (SSD) provided in an embodiment of the present application. The data reading device 10 may include an acquisition unit 401 and an adjustment unit 402, wherein each unit is described in detail as follows.

[0184] An acquiring unit 401 is configured to acquire a characteristic value of the SSD, wherein the characteristic value includes at least one of a read-write ratio value or a pressure value, wherein the read-write ratio value is a ratio of the number of read operations executed by the SSD to the number of write operations executed by the SSD, and the pressure value indicates the number of read operations waiting to be executed in the SSD;

[0185] The adjusting unit 402 is used to dynamically adjust the number of read operations allowed to be inserted during a first operation based on the characteristic value, where the first operation is a currently executed write operation or erase operation.

[0186] In one possible implementation, the adjustment unit 402 is specifically used to: determine a first threshold for allowing insertion of read operations in the first operation process based on the characteristic value; and dynamically adjust the number of read operations allowed to be inserted in a first operation process according to the first threshold.

[0187] In one possible implementation, the adjustment unit 402 is specifically used to: based on the characteristic value, obtain a pause operation strategy corresponding to the characteristic value, the pause operation strategy is a constraint condition for sending a pause (Suspend) operation during a first operation process, and the pause operation is used to insert a read operation into the first operation after pausing the first operation; based on the pause operation strategy, dynamically adjust the number of read operations allowed to be inserted during a first operation process.

[0188] In a possible implementation, the adjustment unit 402 is specifically configured to: based on the feature value, obtain the pause operation strategy corresponding to the feature value from a pre-stored mapping relationship table, wherein the mapping relationship table includes a correspondence between the feature value and the pause operation strategy.

[0189] In a possible implementation, the pause operation policy is a second threshold value that allows the pause operation to be sent during a first operation.

[0190] In a possible implementation, the pause operation strategy is a third threshold for allowing insertion of a read operation after each pause operation is sent during a first operation.

[0191] In a possible implementation, when the characteristic value includes the read-write ratio value, the first threshold for allowing insertion of a read operation during the first operation process is inversely proportional to the read-write ratio value.

[0192] In a possible implementation, when the characteristic value includes the pressure value, a first threshold for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value.

[0193] In one possible implementation, when the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than a first pressure value, a first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the read-write ratio value; and if the pressure value is less than the first pressure value, a first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value.

[0194] In a possible implementation, when the characteristic value includes the read-write ratio value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value.

[0195] In a possible implementation, when the characteristic value includes the pressure value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value.

[0196] In one possible implementation, when the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than a second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value; if the pressure value is less than the second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value.

[0197] In one possible implementation, the SSD is connected to a computing device; the number of read operations performed by the SSD corresponds to the number of read operations generated by the computing device, and the number of write operations performed by the SSD corresponds to the number of read operations generated by the controller; the characteristic value includes the read-write ratio value; the acquisition unit 401 is specifically used to: count a first number of first read operations performed by the SSD, where the first read operation is a read operation generated by the computing device; count a second number of second read operations performed by the SSD, where the second read operation is a read operation generated by the controller; and use the ratio of the first number to the second number as the read-write ratio value of the SSD.

[0198] In one possible implementation, the acquisition unit 401 is further specifically used to: count the first number of the first read operations in the first cache queue executed by the SSD; the acquisition unit 401 is further specifically used to: count the second number of the second read operations in the first cache queue executed by the SSD; the pressure value indicates the number of the first read operations waiting to be executed by the SSD in the second cache queue, wherein the first read operation in the first cache queue enters the first cache queue from the second cache queue, and the second read operation does not exist in the second cache queue.

[0199] In one possible implementation, the acquisition unit 401 is specifically used to: periodically record and store characteristic values ​​related to the SSD; obtain the target characteristic value of the most recent period at the current time point; the adjustment unit 402 is specifically used to dynamically adjust the number of read operations allowed to be inserted during a first operation based on the target characteristic value.

[0200] It should be noted that the functions of the various functional units in the management device 10 for reading data from the solid state drive SSD described in the embodiment of the present application can be referred to in the above Figure 8The descriptions of steps S301 to S305 in the method embodiment are not repeated here.

[0201] An embodiment of the present application also provides a controller, which includes a processing component, a storage component and a communication interface. The processing component reads instructions stored on the storage component through the communication interface, and is used to execute the management method and function related to data reading in the solid-state drive SSD in any of the above embodiments.

[0202] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the management method and function related to data reading in a solid-state drive (SSD) in any of the above embodiments.

[0203] An embodiment of the present application provides a computer storage medium for storing computer software instructions used for a solid-state drive (SSD) provided in the second aspect, which includes a program for executing the first aspect.

[0204] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0205] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, some steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0206] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0207] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0208] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0209] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. Among them, the aforementioned storage medium may include: U disk, mobile hard disk, magnetic disk, optical disk, read-only memory (Read-Only Memory, abbreviated: ROM) or random access memory (Random Access Memory, abbreviated: RAM) and other media that can store program codes.

[0210] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A data reading method applied to a solid state drive (SSD). It is characterized in that include: periodically acquiring a characteristic value of the SSD, the characteristic value comprising at least one of a read-write ratio value or a pressure value, the read-write ratio value being a ratio of the number of read operations executed by the SSD to the number of write operations executed by the SSD, and the pressure value indicating the number of read operations waiting to be executed in the SSD; Based on the characteristic value of the most recent cycle at the current time point, the maximum number of read operations allowed to be inserted into the first operation process is determined, and the number of read operations allowed to be inserted into the first operation process is dynamically adjusted, where the first operation is a currently executed write operation or erase operation.

2. The method according to claim 1, It is characterized in that The determining, based on the characteristic value of the most recent cycle at the current time point, a maximum number of read operations allowed to be inserted into the first operation process, and dynamically adjusting the maximum number of read operations allowed to be inserted into the first operation process, includes: Based on the characteristic value of the most recent cycle at the current time point, acquiring a suspend operation strategy corresponding to the characteristic value, wherein the suspend operation strategy is a constraint condition for sending a suspend operation during the first operation, and the suspend operation is used to insert a read operation into the first operation after suspending the first operation; Based on the pause operation strategy, the maximum number of read operations allowed to be inserted into the first operation process is determined, and the number of read operations allowed to be inserted into the first operation process is dynamically adjusted.

3. The method according to claim 2, It is characterized in that The acquiring, based on the characteristic value of the most recent period at the current time point, a pause operation strategy corresponding to the characteristic value includes: Based on the characteristic value of the most recent period at the current time point, the pause operation strategy corresponding to the characteristic value is obtained from a pre-stored mapping relationship table, and the mapping relationship table includes a correspondence between the characteristic value and the pause operation strategy.

4. The method according to claim 2, It is characterized in that The pause operation policy is a second threshold value that allows sending the pause operation during a first operation.

5. The method according to claim 2, It is characterized in that The pause operation strategy is a third threshold value for allowing insertion of a read operation after sending the pause operation once during a first operation.

6. The method according to claim 1, It is characterized in that When the characteristic value includes the read-write ratio value, the first threshold for allowing insertion of a read operation during the first operation is inversely proportional to the read-write ratio value.

7. The method according to claim 1, It is characterized in that When the characteristic value includes the pressure value, a first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value.

8. The method according to claim 1, It is characterized in that When the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than a first pressure value, the first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the read-write ratio value; if the pressure value is less than the first pressure value, the first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value.

9. The method according to claim 4, It is characterized in that When the characteristic value includes the read-write ratio value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value.

10. The method according to claim 4, It is characterized in that When the characteristic value includes the pressure value, the second threshold for allowing the pause operation to be sent during the one first operation is inversely proportional to the pressure value.

11. The method according to claim 4, It is characterized in that When the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than the second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value; if the pressure value is less than the second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value.

12. The method according to any one of claims 1 to 11, It is characterized in that The SSD includes a controller, the SSD is connected to a computing device; the number of read operations performed by the SSD corresponds to the number of read operations generated by the computing device, and the number of write operations performed by the SSD corresponds to the number of read operations generated by the controller; The characteristic value includes the read-write ratio value; The obtaining of the characteristic value of the SSD comprises: Counting a first number of first read operations executed by the SSD, where the first read operation is a read operation generated by the computing device; Counting a second number of second read operations executed by the SSD, where the second read operation is a read operation generated by the controller; The ratio of the first number to the second number is used as the read-write ratio value of the SSD.

13. The method according to claim 12, It is characterized in that The counting of the first number of first read operations executed by the SSD includes: counting the first number of the first read operations in a first cache queue executed by the SSD; The counting of the second number of the second read operations executed by the SSD includes: counting the second number of the second read operations executed by the SSD in the first cache queue; The pressure value indicates the number of the first read operations waiting to be executed by the SSD in the second cache queue, wherein the first read operations in the first cache queue enter the first cache queue from the second cache queue, and the second read operations do not exist in the second cache queue.

14. The method according to claim 13, It is characterized in that The periodically obtaining the characteristic value of the SSD includes: Periodically recording and storing characteristic values ​​related to the SSD; Get the target feature value of the most recent period at the current time point.

15. A solid state drive SSD, It is characterized in that include: controllers and storage arrays; The controller is coupled to the storage array and configured to: periodically acquiring a characteristic value of the SSD, the characteristic value comprising at least one of a read-write ratio value or a pressure value, the read-write ratio value being a ratio of the number of read operations executed by the SSD to the number of write operations executed by the SSD, and the pressure value indicating the number of read operations waiting to be executed in the SSD; Based on the characteristic value of the most recent cycle at the current time point, the maximum number of read operations allowed to be inserted into a first operation process is determined, and the number of read operations allowed to be inserted into a first operation process is dynamically adjusted, where the first operation is a write operation or an erase operation currently performed by the controller on the storage array.

16. The SSD according to claim 15, It is characterized in that The controller is specifically used for: Based on the characteristic value of the most recent cycle at the current time point, a suspend operation strategy corresponding to the characteristic value is acquired, wherein the suspend operation strategy is a constraint condition for sending a suspend operation during a first operation, and the suspend operation is used to insert a read operation into the first operation after suspending the first operation; Based on the pause operation strategy, the maximum number of read operations allowed to be inserted into the first operation process is determined, and the number of read operations allowed to be inserted into the first operation process is dynamically adjusted.

17. The SSD according to claim 16, It is characterized in that The controller is specifically used for: Based on the characteristic value of the most recent period at the current time point, the pause operation strategy corresponding to the characteristic value is obtained from a pre-stored mapping relationship table, and the mapping relationship table includes a correspondence between the characteristic value and the pause operation strategy.

18. The SSD according to claim 16, It is characterized in that The pause operation policy is a second threshold value that allows sending the pause operation during a first operation.

19. The SSD according to claim 16, It is characterized in that The pause operation strategy is a third threshold value for allowing insertion of a read operation after sending the pause operation once during a first operation.

20. The SSD according to claim 15, It is characterized in that When the characteristic value includes the read-write ratio value, the first threshold for allowing insertion of a read operation during the first operation is inversely proportional to the read-write ratio value.

21. The SSD according to claim 15, It is characterized in that When the characteristic value includes the pressure value, a first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value.

22. The SSD according to claim 15, It is characterized in that When the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than a first pressure value, the first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the read-write ratio value; if the pressure value is less than the first pressure value, the first threshold value for allowing insertion of a read operation during the first operation is inversely proportional to the pressure value.

23. The SSD according to claim 18, It is characterized in that When the characteristic value includes the read-write ratio value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value.

24. The SSD according to claim 18, It is characterized in that When the characteristic value includes the pressure value, the second threshold for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value.

25. The SSD according to claim 18, It is characterized in that When the characteristic value includes the read-write ratio value and the pressure value, if the pressure value is greater than the second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the read-write ratio value; if the pressure value is less than the second pressure value, the second threshold value for allowing the pause operation to be sent during the first operation is inversely proportional to the pressure value.

26. The SSD according to any one of claims 15 to 25, It is characterized in that The SSD is connected to a computing device; the number of read operations performed by the SSD corresponds to the number of read operations generated by the computing device, and the number of write operations performed by the SSD corresponds to the number of read operations generated by the controller; the characteristic value includes the read-write ratio value; The controller is specifically used to: count a first number of first read operations performed by the SSD, where the first read operation is a read operation generated by the computing device; Counting a second number of second read operations executed by the SSD, where the second read operation is a read operation generated by the controller; The ratio of the first number to the second number is used as the read-write ratio value of the SSD.

27. The SSD according to claim 26, It is characterized in that The controller is specifically configured to: count the first number of the first read operations in the first cache queue executed by the SSD; The controller is specifically configured to: count the second number of the second read operations in the first cache queue executed by the SSD; The pressure value indicates the number of the first read operations waiting to be executed by the SSD in the second cache queue, wherein the first read operations in the first cache queue enter the first cache queue from the second cache queue, and the second read operations do not exist in the second cache queue.

28. The SSD according to claim 27, It is characterized in that The controller is specifically used for: Periodically recording and storing characteristic values ​​related to the SSD; Get the target feature value of the most recent period at the current time point.

29. A computing device, It is characterized in that The computing device comprises a processor; the computing device is connected to a solid state drive SSD; The processor is used to: periodically acquiring a characteristic value of the SSD, the characteristic value comprising at least one of a read-write ratio value or a pressure value, the read-write ratio value being a ratio of the number of read operations executed by the SSD to the number of write operations executed by the SSD, and the pressure value indicating the number of read operations waiting to be executed in the SSD; Based on the characteristic value of the most recent cycle at the current time point, the maximum number of read operations allowed to be inserted during the first operation is determined, and the number of read operations allowed to be inserted during a first operation is dynamically adjusted, where the first operation is a write operation or an erase operation currently being executed in the SSD.

30. The computing device according to claim 29, It is characterized in that The processor is specifically used for: Based on the characteristic value of the most recent cycle at the current time point, a suspend operation strategy corresponding to the characteristic value is acquired, wherein the suspend operation strategy is a constraint condition for sending a suspend operation during a first operation, and the suspend operation is used to insert a read operation into the first operation after suspending the first operation; The pause operation policy is sent to the SSD, so that the SSD determines the maximum number of read operations allowed to be inserted into the first operation process based on the pause operation policy, and dynamically adjusts the number of read operations allowed to be inserted into the first operation process.

31. A controller comprising a processing component, a storage component and a communication interface, It is characterized in that The processing component reads the instructions stored on the storage component through the communication interface and executes the method according to any one of claims 1-14.

32. A computer storage medium, It is characterized in that The computer storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 14.

33. A computer program, It is characterized in that The computer program comprises instructions, and when the computer program is executed by a computer, the computer is caused to perform the method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Method and system for processing suspend operational optimization in solid state drives

    CN107436737A