A steady-state performance adjustment method of a solid state disk and a solid state disk
By using a machine learning model in the solid-state drive to dynamically adjust the front-end control factor, the problem of SSD performance fluctuation under large-capacity storage blocks is solved, and more stable steady-state performance is achieved.
Patent Information
- Application Number
- CN202411920330.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Traditional solid-state drive (SSD) steady-state performance adjustment strategies fail to fully consider the relative importance of each garbage collection (GC) round, resulting in long-term performance fluctuations under large-capacity storage block conditions.
A machine learning model is used to periodically obtain the efficiency values of the SSD's most recent N garbage collections. Combined with the current front-end control factor, the updated front-end control factor is calculated through training optimization to dynamically adjust the SSD's write speed.
It improves the steady-state performance stability of SSD, reduces performance fluctuations, and enhances the market competitiveness of the product.
Smart Images

Figure CN119759287B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to computer storage technology, in particular to a steady-state performance adjustment method of a solid state disk and a solid state disk. BACKGROUND
[0002] The steady-state performance consistency of a solid state disk (SSD) is one of the important indicators for measuring the quality of a product. Good consistency means that the SSD is more stable, more predictable, and is often preferred by enterprise customers.
[0003] Currently, the most commonly used storage medium for SSDs is NAND FLASH. The characteristics of this storage medium are that it can only be erased before writing and does not support direct overwrite. Therefore, when the SSD is working, it needs to first select the used storage block, move the valid data in it to other places, and then erase the storage block before it can be normally read and written. This process is called garbage collection (GC).
[0004] In order to ensure good steady-state performance consistency, a front-end control factor must be calculated based on the efficiency of the last several rounds of GC, and then the speed of the SSD front-end is adjusted to ensure that the host can always write data at a certain speed, and there are always free storage blocks available for use, so that the performance consistency of the SSD will be better.
[0005] The traditional steady-state performance adjustment strategy is to calculate the front-end control factor based on the average efficiency of the last several rounds of garbage collection (GC). However, as the size of the storage block increases, the traditional front-end control factor calculation method will cause the performance of the SSD to fluctuate for a long period of time. SUMMARY
[0006] The embodiments of the present application provide a steady-state performance adjustment method of a solid state disk and a solid state disk, which can improve the stability of the steady-state performance of the SSD.
[0007] One embodiment of the present application provides a steady-state performance adjustment method of a solid state disk, characterized in that it comprises:
[0008] Periodically obtaining the efficiency values of the last N garbage collections of the solid state disk; the efficiency value of the garbage collection is the space released by the garbage collection of the solid state disk in a unit of time; N is an integer greater than 1;
[0009] Inputting the efficiency values of the last N garbage collections and the current front-end control factor of the solid state disk into a pre-trained performance adjustment model to obtain an updated front-end control factor;
[0010] Control the write speed of the front end of the solid state disk according to the updated front end control factor.
[0011] In an example embodiment, the performance adjustment model is trained according to the following method:
[0012] The performance adjustment model is subjected to multiple rounds of parameter optimization until a preset training stop condition is met; wherein the process of each round of parameter optimization includes the following steps:
[0013] Obtain the efficiency value of the last N times of garbage collection of the solid state disk as a first garbage collection efficiency value;
[0014] Input the first garbage collection efficiency value and the current first front end control factor of the solid state disk into the performance adjustment model to obtain an updated first front end control factor;
[0015] Control the write speed of the front end of the solid state disk according to the updated first front end control factor, and detect the user data free space of the solid state disk after a first time period, adjust the updated first front end control factor according to the change of the user data free space to obtain an adjusted first front end control factor;
[0016] According to the updated first front end control factor and the adjusted first front end control factor, the performance adjustment model is subjected to the current round of parameter optimization.
[0017] In an example embodiment, the performance adjustment model is trained according to the following method:
[0018] When the user data free space increases, increase the updated first front end control factor by a first step value to obtain the adjusted first front end control factor; or,
[0019] When the user data free space decreases, decrease the updated first front end control factor by a first step value to obtain the adjusted first front end control factor.
[0020] In an example embodiment, the performance adjustment model is trained according to the following method:
[0021] When the user data free space does not change, the updated first front end control factor is determined as the adjusted first front end control factor.
[0022] In an example embodiment, the performance adjustment model is an SVM machine learning model; and the performance adjustment model is integrated in a master chip of the solid state disk.
[0023] In an example embodiment, before inputting the efficiency values of the last N times of garbage collection and the current front-end control factor of the solid state disk into the performance adjustment model, the method further comprises:
[0024] After the solid state disk is powered on, efficiency values of the last N times of garbage collection are obtained, and an average of the efficiency values of the last N times of garbage collection is taken as an initial front-end control factor.
[0025] In an example embodiment, the controlling of the write speed of the front end of the solid state disk according to the updated front-end control factor comprises:
[0026] The front-end write delay factor of the solid state disk is calculated according to the updated front-end control factor, and the write speed of the front end of the solid state disk is controlled according to the front-end write delay factor.
[0027] In an example embodiment, the controlling of the write speed of the front end of the solid state disk according to the front-end write delay factor comprises:
[0028] The front end of the solid state disk performs data writing at the time interval of the front-end write delay factor, so as to write one data page to the flash memory of the solid state disk each time.
[0029] In yet another example embodiment, a solid state disk is provided, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method described above when executing the computer program.
[0030] The technical solution provided by the example embodiments can improve the stability of the steady-state performance of the SSD, thereby improving the market competitiveness of the product.
[0031] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. Other advantages of the present application can be realized and obtained by means of the instrumentalities and combinations described in the description and appended claims. BRIEF DESCRIPTION OF DRAWINGS
[0032] The accompanying drawings are included to provide an understanding of the present application, and constitute a part of the specification, together with the embodiments of the present application, to explain the technical solution of the present application, and do not constitute a limitation on the technical solution of the present application.
[0033] Figure 1 A flowchart of a steady-state performance adjustment method of a solid state disk is provided for the example embodiments of the present application.
[0034] Figure 2 A solid-state hard disk steady-state performance adjustment overall scheme structure schematic diagram provided by an embodiment of the present application;
[0035] Figure 3 A solid-state hard disk structure schematic diagram provided by an embodiment of the present application. DETAILED DESCRIPTION
[0036] The present application describes a plurality of embodiments, but the description is exemplary rather than limiting, and it is obvious to those skilled in the art that there can be more embodiments and implementation schemes within the scope of the embodiments described in the present application. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are possible. Unless specifically limited, any feature or element of any embodiment can be used in combination with any other feature or element of any other embodiment, or can replace any other feature or element of any other embodiment.
[0037] The present application includes and contemplates combinations of features and elements known to those skilled in the art. The embodiments, features and elements disclosed in the present application can also be combined with any conventional features or elements to form a unique inventive scheme. Any feature or element of any embodiment can also be combined with features or elements from other inventive schemes to form another unique inventive scheme. Therefore, it should be understood that any feature shown and / or discussed in the present application can be implemented alone or in any appropriate combination. Therefore, the embodiments are not limited other than as set forth in the claims and their equivalents. In addition, various modifications and changes can be made within the scope of protection of the appended claims.
[0038] Furthermore, in describing representative embodiments, the specification can have presented the method and / or process as a particular sequence of steps. However, to the extent that the method or process depends on more than one step, the method or process should not be limited to the particular sequence of steps described. Other sequences of steps can be possible, depending on the implementation, and the particular sequence of steps described should not limit the scope of the claims. In addition, the claims should not be limited to the steps of the method and / or process in the order written, as the steps of the method and / or process can be varied, and still remain within the spirit and scope of the present application.
[0039] The traditional steady-state performance adjustment strategy is to calculate the front-end control factor according to the average efficiency of the last several rounds of garbage collection (GC). The traditional front-end control factor calculation method simply takes the average of the efficiency of each round of GC, without fully considering the relative importance or weight of each round of GC. When the capacity of the storage block is small, this calculation method is acceptable, however, with the development of semiconductor technology, the storage density of NAND FLASH is constantly improving, and the capacity of the storage block is also increasing. With the increase of the capacity of the storage block, the time required for a single round of GC is longer, and the reference value of the round of GC farthest from the current time for calculating the front-end control factor is lower, and its weight should also be correspondingly reduced. If the traditional steady-state performance adjustment method is continued to be used, since it gives the same weight to each round of GC, the adjustment mechanism will deviate, and then cause unstable fluctuations in the steady-state performance.
[0040] The present application proposes a steady-state performance adjustment method of a solid state disk using a machine learning model to calculate the value of the front-end control factor, aiming at the shortcomings of the traditional steady-state performance adjustment method.
[0041] Figure 1 An embodiment of the present application provides a flowchart of a steady-state performance adjustment method of a solid state disk, as shown in Figure 1 The method comprises the following steps:
[0042] Step 100: periodically obtaining the efficiency value of the last N times of garbage collection of the solid state disk;
[0043] Step 101: inputting the efficiency value of the last N times of garbage collection and the current front-end control factor of the solid state disk into a pre-trained performance adjustment model to obtain an updated front-end control factor;
[0044] Step 102: controlling the write speed of the front end of the solid state disk according to the updated front-end control factor.
[0045] In the embodiment, N is an integer greater than 1; the efficiency value of the garbage collection is the space released by the garbage collection of the solid state disk in unit time; the period can be set according to actual needs, for example, Figure 2As shown, the timer triggers the calculation of the updated front-end control factor every 0.5 seconds, and the updated front-end control factor is applied to the front end of the solid state disk to control the write speed of the SSD, that is, the write speed of the SSD is adjusted every 0.5 seconds, and the adjustment result can include increasing, decreasing, or remaining unchanged. The pre-trained performance adjustment model belongs to a machine learning model, the input of the model is the efficiency value of the last N times of GC and the current front-end control factor, and the output is the updated front-end control factor. When the SSD performs steady-state random write, the internal GC operation is performed at the same time. Through the GC operation, the free space of the user data area can be produced. The write operation on the SSD consumes the free space of the user data area. After each round of GC, the SSD firmware will record the efficiency-related information of the round of GC, and the GC efficiency values of the last several rounds will be retained.
[0046] The steady-state performance adjustment method of the solid state disk provided in the embodiment uses a machine learning model, which can assign nonlinear weights to different GC efficiency values and current control factors to calculate the updated front-end control factor of the SSD. Compared with the traditional front-end control factor calculation method, the steady-state performance adjustment method of the solid state disk provided in the embodiment can calculate a more accurate front-end control factor, and thus the steady-state performance of the solid state disk (SSD) is more stable.
[0047] In an example embodiment, the performance adjustment model is trained according to the following method:
[0048] The performance adjustment model is subjected to multiple rounds of parameter optimization until a preset training stop condition is met; wherein the process of each round of parameter optimization includes the following steps:
[0049] Obtain the efficiency value of the last N times of garbage collection of the solid state disk as the first garbage collection efficiency value;
[0050] Input the first garbage collection efficiency value and the current first front-end control factor of the solid state disk into the performance adjustment model to obtain an updated first front-end control factor;
[0051] Control the write speed of the front end of the solid state disk according to the updated first front-end control factor, and detect the user data free space of the solid state disk after a first time period. According to the change of the user data free space, the updated first front-end control factor is adjusted to obtain an adjusted first front-end control factor;
[0052] According to the updated first front-end control factor and the adjusted first front-end control factor, the performance adjustment model is subjected to this round of parameter optimization.
[0053] In this embodiment, the training stop condition can be reaching a predetermined number of rounds; or can be that the difference between the updated first front-end control factor and the adjusted first front-end control factor is within a predetermined range in one round or a plurality of consecutive rounds; or can be other preset training stop conditions.
[0054] In this embodiment, a trainable neural network module can be integrated inside the SSD host chip, and firmware code related to the training mode can be developed.
[0055] When the training mode is turned on, the neural network module takes the efficiency of the last several rounds of GC and the current front-end control factor as input, outputs an updated first front-end control factor, and applies it to the front-end module. Then, according to whether the free space of the user data area is getting larger or smaller in a period of time after the application, it is determined whether the updated first front-end control factor is too large, too small, or appropriate, and the updated front-end control factor is adjusted accordingly to obtain an adjusted first front-end control factor. The performance adjustment model is optimized according to the updated first front-end control factor and the adjusted first front-end control factor in this round. Specifically, the input last several rounds of GC efficiency and the current front-end control factor are taken as sample data, the adjusted first front-end control factor is taken as the label of the sample data (i.e. the training target value), and the updated first front-end control factor is taken as the actual output result of the performance adjustment model for parameter optimization. This repeated training is performed several times until the preset training stop condition is met and the appropriate model parameters are obtained. After the training is completed, the performance adjustment model can be used to calculate the front-end control factor of the SSD.
[0056] In the training process of the above performance adjustment model, the number of training rounds is usually between 12 and 36. Generally, the larger the capacity of the SSD, the more training rounds are required.
[0057] In an exemplary embodiment, the adjusting the updated first front-end control factor according to the change of the user data free space to obtain an adjusted first front-end control factor comprises:
[0058] When the user data free space increases, the updated first front-end control factor is increased by a first step value to obtain the adjusted first front-end control factor; or,
[0059] When the user data free space decreases, the updated first front-end control factor is decreased by a first step value to obtain the adjusted first front-end control factor.
[0060] In this embodiment, if the free space of the user data area is significantly increased, it indicates that the speed of GC in producing free space is greater than the speed of the front end in consuming free space, and thus the write speed of the front end can be appropriately increased, i.e., the first front end control factor should be adjusted to a value greater than the current output. At this time, the adjusted first front end control factor is obtained by adding a proper step value to the updated first front end control factor, and is used as the training target value of the neural network model parameters in this round of training.
[0061] Conversely, if the free space of the user data area is significantly decreased, it indicates that the speed of GC in producing free space is less than the speed of the front end in consuming free space, and thus the adjusted first front end control factor is obtained by subtracting a proper step value from the updated first front end control factor, and is used as the training target value of the neural network model parameters in this round of training.
[0062] The step value can be determined by step-by-step trial. If the step value is too small, the model training convergence period will be too long; conversely, if the step value is too large, it will easily cause oscillation.
[0063] In an example embodiment, the adjusting of the updated first front end control factor according to the change of the free space of the user data area to obtain an adjusted first front end control factor further includes:
[0064] When the free space of the user data area does not change, the updated first front end control factor is determined as the adjusted first front end control factor.
[0065] In an example embodiment, the performance adjustment model is an SVM machine learning model; and the performance adjustment model is integrated in a master control chip of the solid state disk.
[0066] In an example embodiment, before the efficiency values of the last N times of garbage collection and the current front end control factor of the solid state disk are input into the performance adjustment model, the method further includes:
[0067] After the solid state disk is powered on, the efficiency values of the first N times of garbage collection are obtained, and the average of the efficiency values of the first N times of garbage collection is used as an initial front end control factor.
[0068] In this embodiment, taking N=5 as an example, the calculation of the initial front end control factor after power-on includes:
[0069] After the solid state disk is powered on, the efficiency values of the first 5 times of garbage collection after power-on are obtained and averaged to obtain an initial front end control factor C1.
[0070] In the calculation of the third front-end control factor, the efficiency values of the 11th to 15th GCs after power-on are obtained, and the performance adjustment model is inputted together with C2 to calculate the updated front-end control factor C3; at this time, C3 replaces C2 to become the "current front-end control factor"; and the subsequent "current front-end control factor" is calculated in the same way.
[0071] In the calculation of the third front-end control factor, the efficiency values of the 11th to 15th GCs after power-on are obtained, and the performance adjustment model is inputted together with C2 to calculate the updated front-end control factor C3; at this time, C3 replaces C2 to become the "current front-end control factor"; and the subsequent "current front-end control factor" is calculated in the same way.
[0072] In an example embodiment, the method further comprises:
[0073] According to the updated front-end control factor, the front-end write delay factor of the solid state disk is calculated, and the front-end write delay factor is used to control the write speed of the front end of the solid state disk.
[0074] In this embodiment, the SSD master control chip calculates the front-end write delay factor according to the updated front-end control factor, and configures the front-end write delay factor into a register to control the write speed of the front end of the hard disk, so as to achieve the purpose of adjusting the steady-state performance. The front-end write delay factor is calculated according to the following formula:
[0075] The front-end write delay factor = 1000000 / updated front-end control factor. Wherein 1000000 means 1s = 1000000us.
[0076] As can be seen from the above formula, the larger the front-end control factor, the smaller the front-end write delay factor, the faster the frequency of transmitting write commands, and the faster the SSD speed; on the contrary, the larger the front-end control factor, the larger the delay factor, the slower the frequency of transmitting write commands, and the slower the SSD speed.
[0077] In an example embodiment, the method further comprises:
[0078] The front end of the solid state disk performs data writing with the front-end write delay factor as the time interval, so as to write one data page to the flash memory of the solid state disk at a time.
[0079] In this embodiment, as Figure 2As shown, the user data write commands transmitted from the host will not be written directly to the flash memory of the SSD, but will be intercepted by the front-end of the SSD. After the valid front-end write latency factor is configured to the front-end register, the front-end will deliver a 16KB page write command to the back-end of the SSD every one latency factor time, and then the firmware executes the write command.
[0080] Figure 3 Fig. 6 shows a structure diagram of a solid state disk according to another embodiment of the present application. Figure 3 As shown, the solid state disk comprises a memory 300, a processor 301 and a computer program stored in the memory and capable of running on the processor, and the processor 301 implements the steps of the method as described above when executing the computer program.
[0081] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the functions of the modules / units in the system and the device can be implemented as software, firmware, hardware and appropriate combinations thereof. In the hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components in cooperation. Some or all of the components can be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on computer-readable media, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those skilled in the art, the term "computer storage media" includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and that can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and can include any information delivery media.
Claims
1. A method for adjusting the steady-state performance of a solid-state hard disk, characterized in that: include: Periodically obtaining the efficiency values of the most recent N garbage collections of the solid-state drive; the garbage collection efficiency value is the space freed by the garbage collection performed by the solid-state drive per unit time; N is an integer greater than 1; Inputting the efficiency values of the most recent N garbage collections and the current front-end control factor of the solid-state drive into a pre-trained performance adjustment model to obtain an updated front-end control factor; controlling the writing speed of the solid state drive front end according to the updated front end control factor; The performance adjustment model is trained according to the following method: Perform multiple rounds of parameter optimization on the performance adjustment model until a preset training stop condition is met; wherein each round of parameter optimization process includes the following steps: Obtaining efficiency values of the most recent N garbage collections of the solid-state drive as a first garbage collection efficiency value; Inputting the first garbage collection efficiency value and the current first front-end control factor of the solid-state drive into the performance adjustment model to obtain an updated first front-end control factor; controlling a write speed of the solid-state drive front end according to the updated first front-end control factor, detecting a user data free space of the solid-state drive after a first period of time, and adjusting the updated first front-end control factor according to a change in the user data free space to obtain an adjusted first front-end control factor; The performance adjustment model is optimized for parameters of this round according to the updated first front-end control factor and the adjusted first front-end control factor.
2. The method for adjusting the steady-state performance of a solid-state drive according to claim 1, wherein: The adjusting the updated first front-end control factor according to the change in the user data free space to obtain the adjusted first front-end control factor includes: When the user data free space becomes larger, the updated first front-end control factor is increased by a first step value to obtain the adjusted first front-end control factor; or When the user data free space becomes smaller, the updated first front-end control factor is reduced by a first step value to obtain the adjusted first front-end control factor.
3. The method for adjusting the steady-state performance of a solid-state drive according to claim 1, wherein: The step of adjusting the updated first front-end control factor according to the change in the user data free space to obtain an adjusted first front-end control factor further includes: When the user data free space does not change, the updated first front end control factor is determined as the adjusted first front end control factor.
4. The method for adjusting the steady-state performance of a solid-state drive according to any one of claims 1 to 3, wherein: The performance adjustment model is an SVM machine learning model; the performance adjustment model is integrated in the main control chip of the solid state drive.
5. The method for adjusting the steady-state performance of a solid-state drive according to claim 1, wherein: Before inputting the efficiency values of the most recent N garbage collections and the current front-end control factor of the solid-state drive into the performance adjustment model, the method further includes: After the solid state drive is powered on, efficiency values of the first N garbage collections are obtained, and an average value of the efficiency values of the first N garbage collections is used as an initial front-end control factor.
6. The method for adjusting the steady-state performance of a solid-state drive according to claim 5, wherein: The controlling the writing speed of the solid state drive front end according to the updated front end control factor includes: The front-end write delay factor of the solid-state drive is calculated according to the updated front-end control factor, and the write speed of the front-end of the solid-state drive is controlled according to the front-end write delay factor.
7. The method for adjusting the steady-state performance of a solid-state drive according to claim 6, wherein: The controlling the writing speed of the solid state drive front end according to the front end writing delay factor includes: The front end of the solid state drive performs data writing with the front end write delay factor as a time interval, so as to write one data page each time to the flash memory of the solid state drive.
8. A solid state drive, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
Citation Information
Patent Citations
Writing speed control method, system and device and readable storage medium
CN109857337A
User write-in speed control method and device, equipment and medium
CN112416255A