Solid state disk performance optimization method and device, electronic equipment and storage medium
By adjusting the concurrency and periodic thresholds of write-empty data and temperature sensors, and by using serial write-empty data and discrete temperature sensor readings, the problem of decreased random read performance of solid-state drives was solved, and overall performance was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2026-03-10
AI Technical Summary
The performance of existing solid-state drives (SSDs) during random read operations is affected by parallel write operations and temperature sensor readings, resulting in performance degradation.
By adjusting the concurrency and periodic thresholds of write-empty data and temperature sensor scanning, and by adopting a serial write-empty data and discrete temperature sensor reading method, the impact on random read performance is reduced.
It improves the random read performance of the solid-state drive and reduces the impact of write operations and temperature sensor reads on user requests.
Smart Images

Figure CN116225331B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for optimizing the performance of a solid-state drive. Background Technology
[0002] To enhance data reliability, existing technologies employ RAID 5 (Redundant Arrays of Independent Disks) protection for internal data storage in SSDs (Solid State Drives). For example, a 31+1 configuration means that for every 31 user data writes, there is one corresponding parity data. For instance, superBLOCK0 is composed of BLOCK0 (data blocks) on each die (die). Similarly, SuperPAGE0 within superBLOCK0 is composed of PAGE0 blocks from all BLOCK0s.
[0003] Given the requirements of NAND openBLOCK, openBLOCK needs to be closed within a specified time. During SSD random reads (i.e., when no user writes), the background closes the block by periodically filling it with dummy data. Since blocks run concurrently on multiple dies within the same RAID, and only one of read / write / erase operations can be performed on a NAND die at a time, writing empty data will delay read operations on the corresponding die. To minimize the impact on random read performance, the current solution is to reduce the number of dummy pages written per die, for example, writing 4 pages per die, once per minute. However, due to the parallel operation of multiple dies, this has a significant impact on read performance.
[0004] In addition, SSDs contain multiple sensors (temperature sensors), and the CPU communicates with the sensors via I2C serial communication. If the temperature of multiple sensors is obtained at the same time, such as obtaining the temperature of 5 sensors every 15 seconds, without a time interval, it will increase the CPU (central processing unit) load and affect the performance of the SSD. Summary of the Invention
[0005] Therefore, it is necessary to provide a solid-state drive (SSD) performance optimization method, apparatus, electronic device, and storage medium that can improve the random read performance of SSDs, addressing the aforementioned technical problems.
[0006] Firstly, a method for optimizing solid-state drive (SSD) performance is provided, the method comprising:
[0007] When the wafer in the solid-state drive is detected to have reached the write empty data cycle, it is determined whether the working time of the data block corresponding to the data block in the wafer exceeds the end time threshold of the write empty data cycle.
[0008] If not, modify the write periodicity threshold and modify the write empty data concurrency to the first concurrency threshold;
[0009] When the processor in the solid-state drive is detected to have reached the temperature reading cycle, it is determined whether the temperature of all temperature sensors in the solid-state drive has reached the high temperature threshold in the previous temperature reading cycle.
[0010] If not, modify the scanning periodicity threshold of the temperature sensor and modify the processor's temperature reading concurrency to the second concurrency threshold.
[0011] In one embodiment, modifying the write periodicity threshold and modifying the write empty data concurrency to a first concurrency threshold includes:
[0012] Determine whether the solid-state drive received a write request from the user during the previous write-empty data cycle;
[0013] If so, the write periodicity threshold is modified to the first write periodicity threshold and the write empty data concurrency is modified to the first concurrency threshold;
[0014] If not, determine whether the solid-state drive received a read request from the user in the previous write-empty data cycle and modify the write-empty data concurrency to the first concurrency threshold.
[0015] In one embodiment, determining whether the solid-state drive received a read request from the user during the previous write-empty data cycle and modifying the write-empty data concurrency to a first concurrency threshold includes:
[0016] If so, the write periodicity threshold is modified to the second write periodicity threshold;
[0017] If not, the write periodicity threshold is modified to the first write periodicity threshold.
[0018] In one embodiment, modifying the write periodicity threshold to a first write periodicity threshold and modifying the write empty data concurrency to a first concurrency threshold includes:
[0019] The wafer write cycle corresponding to the wafer is generated based on the wafer number and the first write periodicity threshold;
[0020] The wafer is controlled to perform a write-empty data operation based on the wafer write cycle and the first concurrency threshold.
[0021] In one embodiment, modifying the scanning periodicity threshold of the temperature sensor and modifying the processor's read temperature concurrency to a second concurrency threshold includes:
[0022] Determine whether the temperature of the temperature sensor reached the high temperature threshold during the previous temperature reading cycle;
[0023] If so, then the temperature sensor that has not reached the high temperature threshold is identified as the target sensor, and the target scan periodic threshold of the target sensor is modified to the long scan periodic threshold;
[0024] If not, then modify the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modify the temperature reading concurrency to the second concurrency threshold.
[0025] In one embodiment, modifying the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modifying the temperature reading concurrency to the second concurrency threshold includes:
[0026] Determine whether the solid-state drive received a read request from the user during the previous temperature reading cycle;
[0027] If so, the temperature reading concurrency level is modified to the second concurrency threshold.
[0028] In one embodiment, modifying the temperature reading concurrency to a second concurrency threshold includes:
[0029] The scanning temperature period for all temperature sensors is generated based on the temperature reading period and the long scan period threshold.
[0030] The processor is controlled to read all temperature sensors based on the scanning temperature cycle and the second concurrency threshold.
[0031] On the other hand, a solid-state drive performance optimization device is provided, the device comprising:
[0032] The time determination module is used to determine whether the working time of the data block corresponding to the data block in the solid-state drive exceeds the end time threshold of the write empty data cycle when the wafer in the solid-state drive is detected to have reached the write empty data cycle.
[0033] The write modification module, if not, is used to modify the write periodicity threshold and modify the write empty data concurrency to the first concurrency threshold;
[0034] The temperature determination module is used to determine whether the temperatures of all temperature sensors in the solid-state drive have reached the high temperature threshold in the previous temperature reading cycle when the processor in the solid-state drive is detected to have reached the temperature reading cycle.
[0035] The scan modification module, if not, is used to modify the scan periodicity threshold of the temperature sensor and modify the processor's temperature reading concurrency to a second concurrency threshold.
[0036] In one embodiment, the write modification module modifies the write periodicity threshold and modifies the write empty data concurrency to a first concurrency threshold, including:
[0037] Determine whether the solid-state drive received a write request from the user during the previous write-empty data cycle;
[0038] If so, the write periodicity threshold is modified to the first write periodicity threshold and the write empty data concurrency is modified to the first concurrency threshold;
[0039] If not, determine whether the solid-state drive received a read request from the user in the previous write-empty data cycle and modify the write-empty data concurrency to the first concurrency threshold.
[0040] In one embodiment, the write modification module determines whether the solid-state drive received a read request from the user during the previous write-empty data cycle and modifies the write-empty data concurrency to a first concurrency threshold, including:
[0041] If so, the write periodicity threshold is modified to the second write periodicity threshold;
[0042] If not, the write periodicity threshold is modified to the first write periodicity threshold.
[0043] In one embodiment, after the write modification module modifies the write periodicity threshold to a first write periodicity threshold and modifies the write empty data concurrency to a first concurrency threshold, it includes:
[0044] The wafer write cycle corresponding to the wafer is generated based on the wafer number and the first write periodicity threshold;
[0045] The wafer is controlled to perform a write-empty data operation based on the wafer write cycle and the first concurrency threshold.
[0046] In one embodiment, the scan modification module modifies the scan periodicity threshold of the modified temperature sensor and modifies the processor's read temperature concurrency to a second concurrency threshold, including:
[0047] Determine whether the temperature of the temperature sensor reached the high temperature threshold during the previous temperature reading cycle;
[0048] If so, then the temperature sensor that has not reached the high temperature threshold is identified as the target sensor, and the target scan periodic threshold of the target sensor is modified to the long scan periodic threshold;
[0049] If not, then modify the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modify the temperature reading concurrency to the second concurrency threshold.
[0050] In one embodiment, the scan modification module modifies the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modifies the temperature reading concurrency to the second concurrency threshold, including:
[0051] Determine whether the solid-state drive received a read request from the user during the previous temperature reading cycle;
[0052] If so, the temperature reading concurrency level is modified to the second concurrency threshold.
[0053] In one embodiment, after the scan modification module modifies the read temperature concurrency to a second concurrency threshold, it includes:
[0054] The scanning temperature period for all temperature sensors is generated based on the temperature reading period and the long scan period threshold.
[0055] The processor is controlled to read all the temperature sensors sequentially according to the scanning temperature cycle.
[0056] In another aspect, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0057] When the wafer in the solid-state drive is detected to have reached the write empty data cycle, it is determined whether the working time of the data block corresponding to the data block in the wafer exceeds the end time threshold of the write empty data cycle.
[0058] If not, modify the write periodicity threshold and modify the write empty data concurrency to the first concurrency threshold;
[0059] When the processor in the solid-state drive is detected to have reached the temperature reading cycle, it is determined whether the temperature of all temperature sensors in the solid-state drive has reached the high temperature threshold in the previous temperature reading cycle.
[0060] If not, modify the scanning periodicity threshold of the temperature sensor and modify the processor's temperature reading concurrency to the second concurrency threshold.
[0061] In one embodiment, the processor performs the following steps when executing the computer program:
[0062] Modifying the write periodicity threshold and changing the write empty data concurrency to the first concurrency threshold includes:
[0063] Determine whether the solid-state drive received a write request from the user during the previous write-empty data cycle;
[0064] If so, the write periodicity threshold is modified to the first write periodicity threshold and the write empty data concurrency is modified to the first concurrency threshold;
[0065] If not, determine whether the solid-state drive received a read request from the user in the previous write-empty data cycle and modify the write-empty data concurrency to the first concurrency threshold.
[0066] In one embodiment, the processor performs the following steps when executing the computer program:
[0067] The step of determining whether the solid-state drive received a read request from the user during the previous write-empty data cycle and modifying the write-empty data concurrency to the first concurrency threshold includes:
[0068] If so, the write periodicity threshold is modified to the second write periodicity threshold;
[0069] If not, the write periodicity threshold is modified to the first write periodicity threshold.
[0070] In one embodiment, the processor performs the following steps when executing the computer program:
[0071] The step of modifying the write periodicity threshold to a first write periodicity threshold and modifying the write empty data concurrency to a first concurrency threshold includes:
[0072] The wafer write cycle corresponding to the wafer is generated based on the wafer number and the first write periodicity threshold;
[0073] The wafer is controlled to perform a write-empty data operation based on the wafer write cycle and the first concurrency threshold.
[0074] In one embodiment, when the processor executes the computer program, it performs the following steps: modifying the scanning periodicity threshold of the temperature sensor and modifying the processor's temperature reading concurrency to a second concurrency threshold includes:
[0075] Determine whether the temperature of the temperature sensor reached the high temperature threshold during the previous temperature reading cycle;
[0076] If so, then the temperature sensor that has not reached the high temperature threshold is identified as the target sensor, and the target scan periodic threshold of the target sensor is modified to the long scan periodic threshold;
[0077] If not, then modify the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modify the temperature reading concurrency to the second concurrency threshold.
[0078] In one embodiment, the processor performs the following steps when executing the computer program:
[0079] The step of modifying the scanning periodicity threshold of all temperature sensors to the long scanning periodicity threshold and modifying the temperature reading concurrency to the second concurrency threshold includes:
[0080] Determine whether the solid-state drive received a read request from the user during the previous temperature reading cycle;
[0081] If so, the temperature reading concurrency level is modified to the second concurrency threshold.
[0082] In one embodiment, the processor performs the following steps when executing the computer program:
[0083] The step of modifying the temperature reading concurrency to the second concurrency threshold includes:
[0084] The scanning temperature period for all temperature sensors is generated based on the temperature reading period and the long scan period threshold.
[0085] The processor is controlled to read all temperature sensors based on the scanning temperature cycle and the second concurrency threshold.
[0086] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0087] When the wafer in the solid-state drive is detected to have reached the write empty data cycle, it is determined whether the working time of the data block corresponding to the data block in the wafer exceeds the end time threshold of the write empty data cycle.
[0088] If not, modify the write periodicity threshold and modify the write empty data concurrency to the first concurrency threshold;
[0089] When the processor in the solid-state drive is detected to have reached the temperature reading cycle, it is determined whether the temperature of all temperature sensors in the solid-state drive has reached the high temperature threshold in the previous temperature reading cycle.
[0090] If not, modify the scanning periodicity threshold of the temperature sensor and modify the processor's temperature reading concurrency to the second concurrency threshold.
[0091] In one embodiment, modifying the write periodicity threshold and modifying the write empty data concurrency to a first concurrency threshold includes:
[0092] Determine whether the solid-state drive received a write request from the user during the previous write-empty data cycle;
[0093] If so, the write periodicity threshold is modified to the first write periodicity threshold and the write empty data concurrency is modified to the first concurrency threshold;
[0094] If not, determine whether the solid-state drive received a read request from the user in the previous write-empty data cycle and modify the write-empty data concurrency to the first concurrency threshold.
[0095] In one embodiment, determining whether the solid-state drive received a read request from the user during the previous write-empty data cycle and modifying the write-empty data concurrency to a first concurrency threshold includes:
[0096] If so, the write periodicity threshold is modified to the second write periodicity threshold;
[0097] If not, the write periodicity threshold is modified to the first write periodicity threshold.
[0098] In one embodiment, modifying the write periodicity threshold to a first write periodicity threshold and modifying the write empty data concurrency to a first concurrency threshold includes:
[0099] The wafer write cycle corresponding to the wafer is generated based on the wafer number and the first write periodicity threshold;
[0100] The wafer is controlled to perform a write-empty data operation based on the wafer write cycle and the first concurrency threshold.
[0101] In one embodiment, modifying the scanning periodicity threshold of the temperature sensor and modifying the processor's read temperature concurrency to a second concurrency threshold includes:
[0102] Determine whether the temperature of the temperature sensor reached the high temperature threshold during the previous temperature reading cycle;
[0103] If so, then the temperature sensor that has not reached the high temperature threshold is identified as the target sensor, and the target scan periodic threshold of the target sensor is modified to the long scan periodic threshold;
[0104] If not, then modify the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modify the temperature reading concurrency to the second concurrency threshold.
[0105] In one embodiment, modifying the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modifying the temperature reading concurrency to the second concurrency threshold includes:
[0106] Determine whether the solid-state drive received a read request from the user during the previous temperature reading cycle;
[0107] If so, the temperature reading concurrency level is modified to the second concurrency threshold.
[0108] In one embodiment, modifying the temperature reading concurrency to a second concurrency threshold includes:
[0109] The scanning temperature period for all temperature sensors is generated based on the temperature reading period and the long scan period threshold.
[0110] The processor is controlled to read all temperature sensors based on the scanning temperature cycle and the second concurrency threshold.
[0111] When the wafer in the solid-state drive (SSD) reaches a write-empty data cycle, it is determined whether the working time of the data block corresponding to the data block in the wafer exceeds the end time threshold of the write-empty data cycle. If not, the write cycle threshold is modified and the write-empty data concurrency is modified to a first concurrency threshold. When the processor in the SSD reaches a temperature read cycle, it is determined whether the temperatures of all temperature sensors in the SSD reached a high temperature threshold in the previous temperature read cycle. If not, the scan cycle threshold of the temperature sensors is modified and the read temperature concurrency of the processor is modified to a second concurrency threshold. By changing the wafer parallel write-empty data method to the wafer serial write-empty data method, and by discretizing the temperature sensor temperature acquisition, the impact on the SSD when receiving user read and write operations is reduced, thus improving the performance of the SSD. Attached Figure Description
[0112] Figure 1 A flowchart illustrating methods for optimizing solid-state drive performance;
[0113] Figure 2 A step-by-step diagram illustrating methods for optimizing solid-state drive performance;
[0114] Figure 3 A schematic diagram of a solid-state drive performance optimization device;
[0115] Figure 4 This is an internal structural diagram of a computer device in an embodiment of the present invention. Detailed Implementation
[0116] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0117] The flowchart of the solid-state drive performance optimization method provided in this application is shown below. Figure 1 As shown, when the wafer in the solid-state drive (SSD) reaches a write-empty data cycle, it first determines whether the data block working time exceeds the end time threshold of the write-empty data cycle; if not, it then determines whether the SSD received a write request from the user in the previous write-empty data cycle; finally, it determines whether the SSD received a read request from the user in the previous write-empty data cycle. When the processor in the SSD reaches a temperature read cycle, it first determines whether the temperature of all temperature sensors reached the high-temperature threshold in the previous temperature read cycle; then, it determines whether the temperature of any temperature sensor reached the high-temperature threshold in the previous temperature read cycle; finally, it determines whether the SSD received a read request from the user in the previous temperature read cycle. The detection of the wafer and processor in the SSD can be performed synchronously without a specific order.
[0118] In one embodiment, such as Figure 2 As shown, the present invention provides a method for optimizing the performance of a solid-state drive, the method comprising:
[0119] S201. When it is detected that the wafer in the solid-state drive has reached the write empty data cycle, determine whether the working time of the data block corresponding to the data block in the wafer exceeds the end time threshold of the write empty data cycle.
[0120] S202. If not, modify the write periodicity threshold and modify the write empty data concurrency to the first concurrency threshold.
[0121] S203. When the processor in the solid-state drive is detected to have reached the temperature reading cycle, determine whether the temperature of all temperature sensors in the solid-state drive has reached the high temperature threshold in the previous temperature reading cycle.
[0122] S204. If not, modify the scanning periodicity threshold of the temperature sensor and modify the temperature reading concurrency of the processor to the second concurrency threshold.
[0123] Specifically, taking a solid-state drive (SSD) dummy filling cycle of 1 minute and a RAID 31+1 configuration as an example, when the working time of a data block in a DIE (die) on the SSD reaches the end time threshold of the 1-minute cycle, such as the last 10 seconds, when a BLOCK (data block) is in operation, the SSD itself will, similar to existing technologies, modify the write-empty data concurrency to the maximum, allowing the most DIEs to perform write-dummy operations in parallel. At the same time, it will modify the write cycle threshold corresponding to the DIE. The more BLOCKs that are not closed, the larger the write cycle threshold will be. For example, if 32 BLOCKs are not closed in the last 2 seconds, the write-empty data concurrency will be modified to the maximum of 4, and the write cycle threshold will be modified to 0.25 seconds to ensure that all BLOCKs are closed at the last moment when 4 DIEs are writing in parallel.
[0124] In one embodiment, modifying the write periodicity threshold and modifying the write empty data concurrency to a first concurrency threshold includes:
[0125] Determine whether the solid-state drive received a write request from the user during the previous write-empty data cycle;
[0126] If so, the write periodicity threshold is modified to the first write periodicity threshold and the write empty data concurrency is modified to the first concurrency threshold;
[0127] If not, determine whether the solid-state drive received a read request from the user in the previous write-empty data cycle and modify the write-empty data concurrency to the first concurrency threshold.
[0128] Specifically, as mentioned above, when the solid-state drive (SSD) detects a write request sent by the user within the previous minute, the write periodicity threshold for all DIEs is modified to the first write periodicity threshold to ensure that all DIEs complete their write dummy operations as quickly as possible. The first write periodicity threshold can be set by the user in the background. For example, if the user wants all DIEs to complete their write dummy operations within the first 20 seconds, the first write periodicity threshold can be set to 0.625 seconds, requiring each DIE to complete its write dummy operation within 0.625 seconds. After modifying the write empty data concurrency to 1 (the first concurrency threshold of 1 is optimal), only one DIE is performing its write dummy operation at any given time. The remaining DIEs can be preempted by user write requests, thus ensuring that the SSD does not affect the user's write requests during random reads. In existing technologies, the write empty data concurrency is often set relatively high, meaning that multiple DIEs may be working at the same time. In this case, if a user write request hits a working DIE, it will delay the SSD from executing the user's write operation.
[0129] In one embodiment, determining whether the solid-state drive received a read request from the user during the previous write-empty data cycle and modifying the write-empty data concurrency to a first concurrency threshold includes:
[0130] If so, the write periodicity threshold is modified to the second write periodicity threshold;
[0131] If not, the write periodicity threshold is modified to the first write periodicity threshold.
[0132] Specifically, as mentioned above, when it is determined that the SSD has not received any user write requests in the previous minute, it is then determined whether user read requests have been received. If only user read requests are received, it means that, while still modifying the write-empty data concurrency to 1, the DIE within the SSD can be controlled to complete its write dummy operation with a longer second write cycle threshold. For example, setting the second write cycle threshold to 1.25s means controlling all DIE write dummy operations to be completed within the first 40s of a 1-minute write-empty data cycle. If no user read requests are received, to prevent the completion of user writes from being affected by a sudden user write request received during the current write-empty data cycle, the write cycle threshold is also set to the first cycle threshold, i.e., the aforementioned 0.625s.
[0133] In one embodiment, modifying the write periodicity threshold to a first write periodicity threshold and modifying the write empty data concurrency to a first concurrency threshold includes:
[0134] The wafer write cycle corresponding to the wafer is generated based on the wafer number and the first write periodicity threshold;
[0135] The wafer is controlled to perform a write-empty data operation based on the wafer write cycle and the first concurrency threshold.
[0136] Specifically, as described above, the DIEs within the SSD are sequentially ordered from 0 to 31. Based on the pre-set 0.625s interval and the wafer number of DIE0, a wafer write cycle of 0-0.625s is generated, corresponding to the timer cycle for that DIE. Then, DIE0 is controlled to begin dummy writing to generate PAGE0. After PAGE0 is written, based on the calculated wafer write cycle of 0.626s-1.25s, a timer is started to control DIE1 to perform dummy writing to generate PAGE1, and so on, until all 32 PAGEs are written. This ensures that only one DIE is performing write operations at any given time, while also guaranteeing the closing time of the openBLOCK block (the currently active data block).
[0137] In one embodiment, modifying the scanning periodicity threshold of the temperature sensor and modifying the processor's read temperature concurrency to a second concurrency threshold includes:
[0138] Determine whether the temperature of the temperature sensor reached the high temperature threshold during the previous temperature reading cycle;
[0139] If so, then the temperature sensor that has not reached the high temperature threshold is identified as the target sensor, and the target scan periodic threshold of the target sensor is modified to the long scan periodic threshold;
[0140] If not, then modify the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modify the temperature reading concurrency to the second concurrency threshold.
[0141] Specifically, when the processor in the solid-state drive reaches the temperature reading cycle, taking a 15-second temperature reading cycle as an example, it is determined whether the temperatures of all temperature sensors in the solid-state drive have reached the high temperature threshold in the previous 15 seconds. If they have all reached the high temperature threshold, no operation is required. In the existing solution, the CPU itself will modify the scanning periodic threshold of each sensor to a short scanning periodic threshold, such as 1 second (which can be set by the user). That is, every second within 15 seconds, the CPU will simultaneously acquire the temperatures of 5 sensors, and the time to acquire the temperature of 1 sensor is 1ms. That is, every second, due to the parallel acquisition of 5 sensors, a jitter of 5ms will be generated. If the solid-state drive receives a read from the user at this time, the read operation will inevitably be affected by 5ms. However, if only two sensors reach the high temperature threshold within the previous 15 seconds, the scan periodicity threshold for these two sensors is modified to 1 second, and the scan periodicity threshold for the other three sensors is modified to a long scan periodicity threshold, such as 3 seconds. In this case, within a 15-second temperature reading cycle, when a user read is generated, there are only five instances where the user read may be affected by 5ms.
[0142] In one embodiment, modifying the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modifying the temperature reading concurrency to the second concurrency threshold includes:
[0143] Determine whether the solid-state drive received a read request from the user during the previous temperature reading cycle;
[0144] If so, the temperature reading concurrency level is modified to the second concurrency threshold.
[0145] Specifically, if none of the sensors in the SSD have reached the high-temperature threshold, it checks whether a random read from the user was received within the previous 15 seconds. If so, the scan periodicity threshold for all sensors is modified to 3 seconds, and the CPU's corresponding read temperature concurrency is modified to 1 (the second concurrency threshold of 1 provides the best effect). This ensures that each random read from the user is affected by at most one sensor's scan temperature (1ms) within a 300ms timeframe. If no random reads are received, only the scan periodicity threshold for all sensors is modified to 3 seconds, but the read temperature concurrency is not modified, meaning the temperatures of all five sensors are still acquired in parallel.
[0146] In one embodiment, modifying the temperature reading concurrency to a second concurrency threshold includes:
[0147] The scanning temperature period for all temperature sensors is generated based on the temperature reading period and the long scan period threshold.
[0148] The processor is controlled to read all temperature sensors based on the scanning temperature cycle and the second concurrency threshold.
[0149] Specifically, when the scan periodicity threshold for all sensors is modified to 3 seconds and the CPU's corresponding read temperature concurrency is modified to 1, a 0-3 second scan temperature cycle is generated based on the 3-second scan periodicity threshold and the 15-second temperature read cycle. Within this cycle, the CPU is controlled to read only one sensor. After the read is completed, the next sensor temperature is read in the next scan temperature cycle. That is, when there is a user read in the previous 15 seconds, and when there is no abnormality in the sensor in the solid-state drive, in order to reduce the impact of the CPU read temperature in the current 15 seconds on the user read, the CPU is controlled to serially acquire the sensor temperature in a long cycle.
[0150] The proposed solution has the following beneficial effects:
[0151] 1) By changing the method of writing empty data to the wafer serially, the performance of the solid-state drive was improved;
[0152] 2) The temperature of the temperature sensor is obtained by discretization to reduce the impact on the solid-state drive when processing user read and write requests.
[0153] It should be understood that, although Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0154] In one embodiment, such as Figure 3 As shown, a solid-state drive performance optimization device is provided, the device comprising:
[0155] The time determination module 301 is used to determine whether the working time of the data block corresponding to the data block in the solid-state drive exceeds the end time threshold of the write empty data cycle when the wafer in the solid-state drive is detected to have reached the write empty data cycle.
[0156] The write modification module 302, if not, is used to modify the write periodicity threshold and modify the write empty data concurrency to the first concurrency threshold;
[0157] Temperature determination module 303 is used to determine whether the temperature of all temperature sensors in the solid-state drive has reached the high temperature threshold in the previous temperature reading cycle when the processor in the solid-state drive is detected to have reached the temperature reading cycle.
[0158] If not, the scan modification module 304 is used to modify the scan periodicity threshold of the temperature sensor and modify the read temperature concurrency of the processor to the second concurrency threshold.
[0159] In one embodiment, the write modification module modifies the write periodicity threshold and modifies the write empty data concurrency to include:
[0160] Determine whether the solid-state drive received a write request from the user during the previous write-empty data cycle;
[0161] If so, the write periodicity threshold is modified to the first write periodicity threshold and the write empty data concurrency is modified to the first concurrency threshold;
[0162] If not, determine whether the solid-state drive received a read request from the user in the previous write-empty data cycle and modify the write-empty data concurrency to the first concurrency threshold.
[0163] In one embodiment, the write modification module determines whether the solid-state drive received a read request from the user during the previous write-empty data cycle and modifies the write-empty data concurrency to a first concurrency threshold, including:
[0164] If so, the write periodicity threshold is modified to the second write periodicity threshold;
[0165] If not, the write periodicity threshold is modified to the first write periodicity threshold.
[0166] In one embodiment, the write modification module modifies the write periodicity threshold to a first write periodicity threshold and modifies the write empty data concurrency to a first concurrency threshold, including:
[0167] The wafer write cycle corresponding to the wafer is generated based on the wafer number and the first write periodicity threshold, and the wafer is controlled to perform write empty data operations sequentially according to the wafer write cycle.
[0168] After the previous wafer completes the write-empty data operation, the wafer write cycle corresponding to the next wafer is generated according to the first write periodicity threshold and the wafer number, and the next wafer is controlled to perform the write-empty data operation.
[0169] In one embodiment, the scan modification module modifies the scan periodicity threshold of the modified temperature sensor and modifies the processor's read temperature concurrency to a second concurrency threshold, including:
[0170] Determine whether the temperature of the temperature sensor reached the high temperature threshold during the previous temperature reading cycle;
[0171] If so, then the temperature sensor that has not reached the high temperature threshold is identified as the target sensor, and the target scan periodic threshold of the target sensor is modified to the long scan periodic threshold;
[0172] If not, then modify the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modify the temperature reading concurrency to the second concurrency threshold.
[0173] In one embodiment, the scan modification module modifies the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modifies the temperature reading concurrency to the second concurrency threshold, including:
[0174] Determine whether the solid-state drive received a read request from the user during the previous temperature reading cycle;
[0175] If so, the temperature reading concurrency level is modified to the second concurrency threshold.
[0176] In one embodiment, the scan modification module modifies the read temperature concurrency to a second concurrency threshold by including:
[0177] The scanning temperature period for all temperature sensors is generated based on the temperature reading period and the long scan period threshold.
[0178] The processor is controlled to read all the temperature sensors sequentially according to the scanning temperature cycle.
[0179] Specific limitations regarding the solid-state drive (SSD) performance optimization device can be found in the limitations of SSD performance optimization methods described above, and will not be repeated here. Each module in the aforementioned SSD performance optimization device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independent of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the corresponding operations of each module.
[0180] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an alarm information processing method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0181] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0182] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0183] When the wafer in the solid-state drive is detected to have reached the write empty data cycle, it is determined whether the working time of the data block corresponding to the data block in the wafer exceeds the end time threshold of the write empty data cycle.
[0184] If not, modify the write periodicity threshold and modify the write empty data concurrency to the first concurrency threshold;
[0185] When the processor in the solid-state drive is detected to have reached the temperature reading cycle, it is determined whether the temperature of all temperature sensors in the solid-state drive has reached the high temperature threshold in the previous temperature reading cycle.
[0186] If not, modify the scanning periodicity threshold of the temperature sensor and modify the processor's temperature reading concurrency to the second concurrency threshold.
[0187] In one embodiment, the processor performs the following steps when executing the computer program:
[0188] Modifying the write periodicity threshold and changing the write empty data concurrency to the first concurrency threshold includes:
[0189] Determine whether the solid-state drive received a write request from the user during the previous write-empty data cycle;
[0190] If so, the write periodicity threshold is modified to the first write periodicity threshold and the write empty data concurrency is modified to the first concurrency threshold;
[0191] If not, determine whether the solid-state drive received a read request from the user in the previous write-empty data cycle and modify the write-empty data concurrency to the first concurrency threshold.
[0192] In one embodiment, the processor performs the following steps when executing the computer program:
[0193] The step of determining whether the solid-state drive received a read request from the user during the previous write-empty data cycle and modifying the write-empty data concurrency to the first concurrency threshold includes:
[0194] If so, the write periodicity threshold is modified to the second write periodicity threshold;
[0195] If not, the write periodicity threshold is modified to the first write periodicity threshold.
[0196] In one embodiment, the processor performs the following steps when executing the computer program:
[0197] The step of modifying the write periodicity threshold to a first write periodicity threshold and modifying the write empty data concurrency to a first concurrency threshold includes:
[0198] The wafer write cycle corresponding to the wafer is generated based on the wafer number and the first write periodicity threshold;
[0199] The wafer is controlled to perform a write-empty data operation based on the wafer write cycle and the first concurrency threshold;
[0200] In one embodiment, when the processor executes the computer program, it performs the following steps: modifying the scanning periodicity threshold of the temperature sensor and modifying the processor's temperature reading concurrency to a second concurrency threshold includes:
[0201] Determine whether the temperature of the temperature sensor reached the high temperature threshold during the previous temperature reading cycle;
[0202] If so, then the temperature sensor that has not reached the high temperature threshold is identified as the target sensor, and the target scan periodic threshold of the target sensor is modified to the long scan periodic threshold;
[0203] If not, then modify the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modify the temperature reading concurrency to the second concurrency threshold.
[0204] In one embodiment, the processor performs the following steps when executing the computer program:
[0205] The step of modifying the scanning periodicity threshold of all temperature sensors to the long scanning periodicity threshold and modifying the temperature reading concurrency to the second concurrency threshold includes:
[0206] Determine whether the solid-state drive received a read request from the user during the previous temperature reading cycle;
[0207] If so, the temperature reading concurrency level is modified to the second concurrency threshold.
[0208] In one embodiment, the processor performs the following steps when executing the computer program:
[0209] The step of modifying the temperature reading concurrency to the second concurrency threshold includes:
[0210] The scanning temperature period for all temperature sensors is generated based on the temperature reading period and the long scan period threshold.
[0211] The processor is controlled to read all temperature sensors based on the scanning temperature cycle and the second concurrency threshold.
[0212] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0213] When the wafer in the solid-state drive is detected to have reached the write empty data cycle, it is determined whether the working time of the data block corresponding to the data block in the wafer exceeds the end time threshold of the write empty data cycle.
[0214] If not, modify the write periodicity threshold and modify the write empty data concurrency to the first concurrency threshold;
[0215] When the processor in the solid-state drive is detected to have reached the temperature reading cycle, it is determined whether the temperature of all temperature sensors in the solid-state drive has reached the high temperature threshold in the previous temperature reading cycle.
[0216] If not, modify the scanning periodicity threshold of the temperature sensor and modify the processor's temperature reading concurrency to the second concurrency threshold.
[0217] In one embodiment, modifying the write periodicity threshold and modifying the write empty data concurrency to a first concurrency threshold includes:
[0218] Determine whether the solid-state drive received a write request from the user during the previous write-empty data cycle;
[0219] If so, the write periodicity threshold is modified to the first write periodicity threshold and the write empty data concurrency is modified to the first concurrency threshold;
[0220] If not, determine whether the solid-state drive received a read request from the user in the previous write-empty data cycle and modify the write-empty data concurrency to the first concurrency threshold.
[0221] In one embodiment, determining whether the solid-state drive received a read request from the user during the previous write-empty data cycle and modifying the write-empty data concurrency to a first concurrency threshold includes:
[0222] If so, the write periodicity threshold is modified to the second write periodicity threshold;
[0223] If not, the write periodicity threshold is modified to the first write periodicity threshold.
[0224] In one embodiment, modifying the write periodicity threshold to a first write periodicity threshold and modifying the write empty data concurrency to a first concurrency threshold includes:
[0225] The wafer write cycle corresponding to the wafer is generated based on the wafer number and the first write periodicity threshold;
[0226] The wafer is controlled to perform a write-empty data operation based on the wafer write cycle and the first concurrency threshold;
[0227] In one embodiment, modifying the scanning periodicity threshold of the temperature sensor and modifying the processor's read temperature concurrency to a second concurrency threshold includes:
[0228] Determine whether the temperature of the temperature sensor reached the high temperature threshold during the previous temperature reading cycle;
[0229] If so, then the temperature sensor that has not reached the high temperature threshold is identified as the target sensor, and the target scan periodic threshold of the target sensor is modified to the long scan periodic threshold;
[0230] If not, then modify the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modify the temperature reading concurrency to the second concurrency threshold.
[0231] In one embodiment, modifying the scan periodicity threshold of all temperature sensors to the long scan periodicity threshold and modifying the temperature reading concurrency to the second concurrency threshold includes:
[0232] Determine whether the solid-state drive received a read request from the user during the previous temperature reading cycle;
[0233] If so, the temperature reading concurrency level is modified to the second concurrency threshold.
[0234] In one embodiment, modifying the temperature reading concurrency to a second concurrency threshold includes:
[0235] The scanning temperature period for all temperature sensors is generated based on the temperature reading period and the long scan period threshold.
[0236] The processor is controlled to read all temperature sensors based on the scanning temperature cycle and the second concurrency threshold.
[0237] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0238] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0239] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for optimizing performance of a solid state disk, the method comprising: determining whether a data block working time corresponding to a data block in a wafer exceeds an end time threshold of a write empty data period when detecting that the wafer in the solid state disk reaches the write empty data period; if not, modifying a write periodicity threshold and modifying a write empty data concurrency to a first concurrency threshold; determining whether temperatures of all temperature sensors in the solid state disk all reach a high temperature threshold in a last temperature reading period when detecting that a processor in the solid state disk reaches a temperature reading period; if not, modifying a scanning periodicity threshold of the temperature sensors and modifying a reading temperature concurrency of the processor to a second concurrency threshold.
2. The method of claim 1, wherein, the modifying the write periodicity threshold and modifying the write empty data concurrency to the first concurrency threshold comprises: determining whether the solid state disk receives a write request sent by a user in a last write empty data period; if yes, modifying the write periodicity threshold to a first write periodicity threshold and modifying the write empty data concurrency to the first concurrency threshold; if not, determining whether the solid state disk receives a read request sent by a user in the last write empty data period and modifying the write empty data concurrency to the first concurrency threshold.
3. The method of claim 2, wherein, the determining whether the solid state disk receives the read request sent by the user in the last write empty data period and modifying the write empty data concurrency to the first concurrency threshold comprises: if yes, modifying the write periodicity threshold to a second write periodicity threshold; if not, modifying the write periodicity threshold to the first write periodicity threshold.
4. The method of claim 2, wherein, the modifying the write periodicity threshold to the first write periodicity threshold and modifying the write empty data concurrency to the first concurrency threshold further comprises: generating a wafer write period corresponding to the wafer according to a wafer number and the first write periodicity threshold; controlling the wafer to perform a write empty data operation according to the wafer write period and the first concurrency threshold.
5. The method of claim 1, wherein, the modifying the scanning periodicity threshold of the temperature sensors and modifying the reading temperature concurrency of the processor to the second concurrency threshold comprises: determining whether there is a temperature sensor whose temperature reaches the high temperature threshold in the last temperature reading period; if yes, determining a temperature sensor whose temperature does not reach the high temperature threshold as a target sensor and modifying a target scanning periodicity threshold of the target sensor to a long scanning periodicity threshold; if not, modifying the scanning periodicity threshold of all the temperature sensors to the long scanning periodicity threshold and modifying the reading temperature concurrency to the second concurrency threshold.
6. The method of claim 5, wherein, the modifying the scanning periodicity threshold of all the temperature sensors to the long scanning periodicity threshold and modifying the reading temperature concurrency to the second concurrency threshold comprises: determining whether the solid state disk receives a read request sent by a user in a last temperature reading period; if yes, modifying the reading temperature concurrency to the second concurrency threshold.
7. The method of claim 6, wherein, the modifying the reading temperature concurrency to the second concurrency threshold further comprises: generating a scanning temperature period corresponding to all the temperature sensors according to the temperature reading period and the long scanning periodicity threshold; controlling the processor to read the all temperature sensors according to the scanning temperature period and the second concurrency threshold.
8. A device for optimizing performance of a solid state disk, the device comprising: a time determining module configured to determine whether a data block working time corresponding to a data block in a wafer exceeds an end time threshold of a write empty data period when detecting that the wafer in the solid state disk reaches the write empty data period; a write modifying module configured to modify a write periodic threshold and modify a write empty data concurrency to a first concurrency threshold if not; a temperature determining module configured to determine whether temperatures of all temperature sensors in the solid state disk all reach a high temperature threshold in a last temperature reading period when detecting that a processor in the solid state disk reaches a temperature reading period; a scanning modifying module configured to modify a scanning periodic threshold of the temperature sensors and modify a reading temperature concurrency of the processor to a second concurrency threshold if not.
9. An electronic device, comprising: comprising: one or more processors; and a memory associated with the one or more processors, the memory for storing program instructions that, when read and executed by the one or more processors, perform the method of any one of claims 1-7.
10. A computer storage medium, characterized in that, a computer program stored thereon, wherein the program, when executed by a processor, implements the method of any one of claims 1-7.
Citation Information
Patent Citations
Data storage method and device for solid state disk and solid state disk (SSD)
CN114303123A
Data writing method and system based on solid state disk, storage medium and equipment
CN114527942A