SSD performance optimization method based on time control
By analyzing the proportion of read and write operation time of SSD, we can determine the low frequency points to perform garbage collection during these time periods, which solves the problem of GC recycling timing affecting SSD performance, achieves smooth garbage collection without affecting performance, and reduces write time. Entry delay.
Patent Information
- Application Number
- CN202410757293.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-10-01
AI Technical Summary
In the existing technology, GC recycling timing affects SSD performance and increases write latency.
By recording the start, end and duration of SSD read and write operations, analyze the proportion of daily working hours and determine low-frequency points. If it is lower than 60 low-frequency points, data will be collected repeatedly. If it is higher than 60 low-frequency points, data will be collected during these time periods. The SSD performs garbage collection and other performance-impacting operations, periodically refreshing and overwriting time data.
It realizes garbage collection outside the peak period of SSD usage to avoid affecting performance, and at the same time ensures that garbage collection proceeds smoothly without affecting read and write performance.
Smart Images

Figure CN118732947A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of SSD performance optimization, and in particular to a SSD performance optimization method based on time control. Background Art
[0002] Some background tasks are running inside the SSD, such as garbage collection and recording SSD operation logs. The execution of these background tasks will affect the performance of the SSD and make the SSD latency unpredictable.
[0003] In addition to the SSD itself controlling the timing of garbage collection, some SSDs also support the host to control them to do GC.
[0004] On August 15, 2015, OCZ released a SATA interface enterprise-level SSD - Saber 1000HMS, which is the first SSD with the "Host Managed SSD" (HMS) function. The so-called HMS is that the host obtains the operating status of the SSD through the application software, and then controls some behaviors of the SSD. HMS technology enables the host to control the background tasks of the SSD. The host can control whether the background tasks are executed or not, when they are executed, and when they are not executed. For a single SSD, the user can use the HMS software to let it perform garbage collection tasks when the SSD is idle. In this way, in the subsequent writing process, there are enough free blocks inside the SSD to write, and there is no need to temporarily perform garbage collection, thereby improving SSD performance and reducing write latency.
[0005] Host management of SSD has its advantages, but it needs to interact with the SSD and have supporting upper computer software. In some respects, this is not an easy task. However, inspired by the host's control of SSD behavior and combining it with its own control of garbage collection timing, the present invention provides a method of time-controlled SSD behavior to improve SSD performance and reduce write latency, and it is relatively less complicated. Summary of the invention
[0006] The purpose of the present invention is to solve the shortcomings existing in the prior art and propose a SSD performance optimization method based on time control. The technical problem to be solved by the present invention is the problem that the existing GC recovery timing affects SSD performance and increases write latency.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions: A method for optimizing SSD performance based on time control, the optimization method comprising the following steps: S01: From the moment the SSD is powered on, the start time, end time, and duration of reading and writing are recorded respectively; S02: Collect data for N days, analyze the proportion of the SSD working time every day, and record the low frequency point; S03: The system determines whether 60 low frequency points are generated. If it is lower than 60 low frequency points, S02 is repeated. If it is higher than 60 low frequency points, the next step is performed. S04: During the first 60 low-frequency points, the SSD is allowed to perform GC and WL operations that may affect the SSD read and write performance; S05: For the 60 low-frequency points, refresh them regularly, and from the N+1th day onwards, record the time data for the next N days and calculate the proportion.
[0008] Preferably, in S01, statistics of short-duration and scattered read and write operations may be ignored.
[0009] Preferably, in S01, the read and write operations with a short duration and concentrated duration are recorded as the entire duration, with the interval time in between ignored.
[0010] Preferably, in S01, if the read and write operations alternate frequently, then the separate statistics are ignored and recorded as the SSD is working.
[0011] Preferably, in S01, the SSD running time proportion, i.e., the low frequency point statistical rule is as follows: a. The minimum recording time is minutes. 24*60=1440 time points are set in one day. When the SSD is performing a read or write operation at all points in an N-day cycle, the frequency value of the point is increased by 1. b. Added 20 special points to enable GC and WL operations in any situation to prevent abnormal SSD operation caused by abnormalities; c. If there is no time weight data, the collection time is abnormal, or the time weight calculation is abnormal, GC and WL operations need to be performed according to the SSD general solution.
[0012] Compared with the prior art, the beneficial effects of the present invention are: the present invention can realize the working time of the collection device, and analyze the time periods when users frequently use the SSD through a certain amount of data, thereby avoiding the peak period of SSD use and performing garbage collection in the time period when the SSD works infrequently, which neither affects the SSD performance nor ensures smooth garbage collection. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more specifically and intuitively illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0014] Figure 1 A flow chart of the time control SSD behavior of the present invention; Figure 2 This is an example diagram produced according to the frequency value of 30 days within 60 minutes of the present invention. DETAILED DESCRIPTION
[0015] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0016] Reference Figure 1-2 , a SSD performance optimization method based on time control, the optimization method comprises the following steps: S01: From the moment the SSD is powered on, the start time, end time, and duration of reading and writing are recorded respectively; S02: Collect data for N days, analyze the proportion of the SSD working time every day, and record the low frequency point; S03: The system determines whether 60 low frequency points are generated. If it is lower than 60 low frequency points, S02 is repeated. If it is higher than 60 low frequency points, the next step is performed. S04: During the first 60 low-frequency points, the SSD is allowed to perform GC and WL operations that may affect the SSD read and write performance; S05: For the 60 low-frequency points, refresh them regularly, and from the N+1th day onwards, record the time data for the next N days and calculate the proportion.
[0017] In this implementation, in S01, statistics of short-duration and sporadic read and write operations may be ignored.
[0018] In this implementation scheme, in S01, for the read and write operations with short duration and concentrated time, the interval time in between is ignored and the operations are recorded as the entire duration.
[0019] In this implementation scheme, in S01, if the read and write operations alternate frequently, the separate statistics are ignored and recorded as the SSD is working.
[0020] In this implementation scheme, in S01, the SSD running time proportion, i.e., the low frequency point statistical rule is as follows: a. The minimum recording time is minutes. 24*60=1440 time points are set in one day. When the SSD is performing a read or write operation at all points in an N-day cycle, the frequency value of the point is increased by 1. b. Added 20 special points to enable GC and WL operations in any situation to prevent abnormal SSD operation caused by abnormalities; c. If there is no time weight data, the collection time is abnormal, or the time weight calculation is abnormal, GC and WL operations need to be performed according to the SSD general solution.
[0021] Based on the collected 30-day time data, the daily working time ratio of the SSD is analyzed, which can be referred to as follows: Figure 2 There is no chart in the actual situation, it is obtained by sorting inside the firmware code.
[0022] Figure 2 As shown in the figure, an example chart is made within 60 minutes according to the 30-day frequency value. It can be seen from the example chart that the 5, 12, 26, 39, and 55 points are obviously lower, which means that the probability of SSD working at these points in the 30 days is very small. Therefore, you can choose these time points to start GC, WL and other operations that may affect SSD performance.
[0023] If 60 low-frequency points are generated normally, the SSD is arranged to perform GC, WL and other operations according to these 60 low-frequency points, and the normal operating performance in other situations will not be affected.
[0024] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for optimizing SSD performance based on time control, characterized in that: The optimization method comprises the following steps: S01: From the moment the SSD is powered on, the start time, end time, and duration of reading and writing are recorded respectively; S02: Collect data for N days, analyze the proportion of the SSD working time every day, and record the low frequency point; S03: The system determines whether 60 low frequency points are generated. If it is lower than 60 low frequency points, S02 is repeated. If it is higher than 60 low frequency points, the next step is performed. S04: During the first 60 low-frequency points, the SSD is allowed to perform GC and WL operations that may affect the SSD read and write performance; S05: For the 60 low-frequency points, refresh them regularly, and from the N+1th day onwards, record the time data for the next N days and calculate the proportion.
2. The SSD performance optimization method based on time control according to claim 1, characterized in that: In S01, for short-duration and scattered read and write operations, statistics can be ignored.
3. The SSD performance optimization method based on time control according to claim 2, characterized in that: In S01, the read and write operations with short duration and concentration are recorded as the entire duration, ignoring the interval time in between.
4. The SSD performance optimization method based on time control according to claim 3, characterized in that: In S01, if the read and write operations alternate frequently, the separate statistics are ignored and the SSD is recorded as working.
5. The SSD performance optimization method based on time control according to claim 4, characterized in that: In S01, the SSD running time proportion, i.e. the statistical rules of low frequency points, are as follows: a. The minimum recording time is minutes. 24*60=1440 time points are set in one day. When the SSD is performing a read or write operation at all points in an N-day cycle, the frequency value of the point is increased by 1. b. Added 20 special points to enable GC and WL operations in any situation to prevent abnormal SSD operation caused by abnormalities; c. If there is no time weight data, the collection time is abnormal, or the time weight calculation is abnormal, GC and WL operations need to be performed according to the SSD general solution.
