A method for automatically calibrating SSD steady-state random write performance
By using NVMe custom management commands in the SSD to automatically calculate and adjust the IOPS value, the problem of low efficiency in SSD steady-state random write performance calibration is solved, and automated calibration is achieved, saving manpower and time and improving calibration efficiency.
Patent Information
- Application Number
- CN202211161239.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-09-22
AI Technical Summary
In the prior art, SSD steady-state random write performance calibration is inefficient, requires manual testing and is time-consuming, and cannot be efficiently automated.
By implementing NVMe custom management commands on the host computer and SSD side, using the 0xD0 operation code and Byte40-Byte43 configuration fields, the steady-state IOPS is automatically calculated and adjusted. The initial value and sample set records are calculated by combining the formula to dynamically adjust the IOPS value to achieve automatic calibration.
It realizes automatic calibration of SSD steady-state random write performance, saving manpower and time, improving calibration efficiency, reducing repeated testing, and enhancing the automation level of performance calibration.
Smart Images

Figure CN115458026B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of solid-state storage, and in particular to an automatic calibration method for the steady-state random write performance of an SSD. Background Art
[0002] Solid-state drives (SSDs) have been widely used in enterprise storage due to their high bandwidth and low power consumption. When writing to an SSD, blocks in its Nand Flash are continuously consumed. When block consumption reaches a certain threshold, garbage collection (GC) is initiated to reclaim blocks with a high amount of invalid data. After a certain period of random writes from a host computer to the SSD, the SSD simultaneously performs GC operations while writing data to the host computer. This involves reading valid data from the blocks to be reclaimed and writing it to new blocks. Therefore, after GC operations enter a stable state, it is necessary to set an appropriate host computer random write performance (i.e., steady-state random write performance) to ensure that the host computer data write speed matches the GC operation speed.
[0003] SSD steady-state random write performance is determined by two factors:
[0004] 1. The ratio of the SSD's logical capacity to its physical capacity, i.e., the theoretical effective data rate of blocks to be recycled;
[0005] 2. GC operation efficiency, that is, the read and write speed of Nand Flash.
[0006] Based on the above two factors, a preliminary calculation of steady-state random write performance can be made. However, in actual testing, the average effective data rate of blocks awaiting collection during garbage collection (GC) is often less than the ratio of the SSD's logical capacity to its physical capacity. Furthermore, the actual read and write bandwidth when performing simultaneous read and write operations on the Nand Flash is less than the bandwidth of either read or write operation alone. Therefore, SSD developers need to accurately calibrate steady-state random write performance based on actual test results. Performance calibration requires first setting the SSD's steady-state random write IOPS (IO per Second) target and then performing a steady-state random write performance test. This test typically involves two full-drive sequential writes, followed by at least four hours of random writes to ensure the SSD enters a steady state, and finally, at least one hour of random write testing to determine the stability of the SSD's steady-state random write IOPS (hereafter referred to as steady-state IOPS). Each test is lengthy and only measures the pre-set steady-state IOPS, making performance calibration extremely inefficient. Summary of the Invention
[0007] In view of the defects of the prior art, the present invention provides a method for automatically calibrating the steady-state write performance of an SSD, which can not only automatically calibrate the steady-state random write performance, but also improve the performance calibration efficiency.
[0008] In order to solve the technical problem, the technical solution adopted by the present invention is: in order to realize the automatic calibration of the steady-state random write performance of the SSD, it is first necessary to implement the NVMe custom management command for configuring the SSD steady-state random write IOPS on the host computer side and the SSD side. Use 0xD0 as the opcode of the steady-state IOPS configuration command, and use the 4 bytes between Byte40-Byte43 in the command as the steady-state IOPS configuration field. The host computer sends the steady-state IOPS configuration command to the SSD, and stores the IOPS value to be configured in the steady-state IOPS configuration field in the command; after receiving the command, the SSD parses the steady-state IOPS configuration field, and sets the value in the field to the current steady-state IOPS, using Indicates the current steady-state IOPS, thereby completing the host computer's configuration operation on steady-state IOPS.
[0009] Before performing automatic calibration, you first need to calculate the initial value of steady-state IOPS using The specific calculation formula is as follows:
[0010] (1),
[0011] Indicates the ratio of SSD logical capacity to physical capacity;
[0012] Indicates the Nand write operation bandwidth in the SSD;
[0013] Indicates the Nand read operation bandwidth in the SSD;
[0014] Indicates the amount of data per IO transaction.
[0015] During the automated calibration process, it is necessary to record the IOPS value per second during the steady-state random write process. This patent uses a sample set To perform related records, the specific definitions are as follows:
[0016] (2),
[0017] in Indicates the Random write IOPS in seconds, Indicates the test time in hours. Greater than or equal to 1 and less than or equal to ,and is a natural number.
[0018] During the automated calibration process, you also need to set Increment The initial value of the increment is .
[0019] Based on the above conditions, the steady-state IOPS automatic calibration operation process is as follows:
[0020] 1) Calculated based on formula 1 And will be configured through the steady-state IOPS command Configured as ;
[0021] 2) Perform two full disk sequential write operations;
[0022] 3) Perform random write operations for m hours, where m is a positive number, to ensure that the SSD enters a steady state.
[0023] 4) Perform random write operations for n hours, where n is a positive number and n is less than m, using Records the random write IOPS performed by the SSD per second;
[0024] 5) PC statistics Smaller than If the sample proportion is less than , proceed to 6); otherwise proceed to 7);
[0025] 6) Use the steady-state IOPS configuration command to Configured as , and returns 4);
[0026] 7) Update , ;if Non-zero, through the steady-state IOPS configuration command Configured as , and returns 4); otherwise, This is the final calibrated steady-state IOPS, ending the automated calibration operation.
[0027] Specifically, take m=4, n=1.
[0028] From the above process, we can see that the steady-state IOPS automatic calibration operation is based on the steady-state random write test after each execution. Smaller than Dynamic adjustment of sample ratio , and enter the next round of test calibration until Adjust to the highest setting; the calibration process only performs two full-disk sequential write operations and four hours of random write operations as a preparatory operation during the first test calibration to ensure that the SSD enters a steady state. Since the SSD has entered a steady state, subsequent tests and calibrations no longer perform preparatory operations and only perform a one-hour random write sampling operation, greatly improving calibration efficiency.
[0029] Beneficial effects of the invention: This patent provides an automatic calibration method for SSD steady-state random write performance. On the one hand, it can automatically calibrate steady-state random write performance, eliminating the need for developers to manually test and verify candidate steady-state random write performance indicators, further saving development manpower; on the other hand, it saves steady-state random write performance calibration time. Only when the steady-state random write IOPS sample set is collected for the first time, a time-consuming pre-test is performed. The pre-test is omitted for each subsequent test calibration, greatly improving the performance calibration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a flow chart of the automatic calibration method described in Example 1. DETAILED DESCRIPTION
[0031] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0032] Example 1
[0033] This embodiment discloses a method for automatically calibrating the steady-state random write performance of an SSD. Figure 1 As shown, the host computer first calculates the initial steady-state IOPS of the SSD and configures the initial increment for each steady-state IOPS calibration based on this value; configures the current steady-state IOPS of the SSD based on a custom command; when testing and calibrating the steady-state IOPS for the first time, performs two full-disk sequential writes and four hours of random write operations; performs a one-hour steady-state random write test, and counts the random write IOPS sample values per second in the test results. The current steady-state IOPS is dynamically adjusted according to the test results until the steady-state IOPS indicator is adjusted to the highest.
[0034] In this embodiment, custom NVMe management commands are pre-implemented on the host computer and the SSD side, so that the host computer can actively adjust the steady-state IOPS value. Specifically, 0xD0 is used as the opcode of the steady-state IOPS configuration command, and the 4 bytes between Byte40 and Byte43 in the command are used as the steady-state IOPS configuration field. The host computer sends the steady-state IOPS configuration command to the SSD, and stores the IOPS value to be configured in the steady-state IOPS configuration field in the command; after receiving the command, the SSD parses the steady-state IOPS configuration field and sets the value in the field to the current steady-state IOPS, thereby completing the host computer's configuration operation on the steady-state IOPS.
[0035] Use 0xD0 as the opcode of the steady-state IOPS configuration command, and use the 4 bytes between Byte40 and Byte43 in the command as the steady-state IOPS configuration field. The host computer sends the steady-state IOPS configuration command to the SSD, and stores the IOPS value to be configured in the steady-state IOPS configuration field in the command; after receiving the command, the SSD parses the steady-state IOPS configuration field and sets the value in the field to the current steady-state IOPS. This indicates that the host computer has completed the configuration operation of steady-state IOPS.
[0036] Specifically, the implementation process of this method is:
[0037] S01) Calculate the initial value of steady-state IOPS based on formula 1 , and configure the steady-state IOPS command Configured as , Indicates the current steady-state IOPS;
[0038] (1),
[0039] in Indicates the ratio of SSD logical capacity to physical capacity. Indicates the Nand write operation bandwidth in the SSD. Indicates the Nand read operation bandwidth in the SSD. Indicates the amount of data per IO;
[0040] S02), perform two full disk sequential write operations;
[0041] S03) Perform random write operations for 4 hours to ensure that the SSD enters a steady state;
[0042] S04), perform 1 hour of random write operation, use Record the random write IOPS performed by the SSD per second, (2);
[0043] in Indicates the Random write IOPS in seconds, Greater than or equal to 1 and less than or equal to ,and is a natural number;
[0044] S05) Statistics of host computer Smaller than If the sample proportion is less than , proceed to step S06); otherwise proceed to step S07);
[0045] S06) Use the steady-state IOPS configuration command to Configured as , and returns to step S04), Indicates each adjustment increment;
[0046] S07), Update , ;if Non-zero, through the steady-state IOPS configuration command Configured as , and return to step S04); otherwise, This is the final calibrated steady-state IOPS, ending the automated calibration operation.
[0047] On the one hand, the present invention can automatically calibrate the steady-state random write performance, eliminating the need for developers to manually test and verify candidate steady-state random write performance indicators, further saving development manpower; on the other hand, it saves the time for steady-state random write performance calibration. Only when the steady-state random write IOPS sample set is collected for the first time, a time-consuming pre-test is performed. The pre-test is omitted for each subsequent test calibration, greatly improving the performance calibration efficiency.
[0048] What has been described above are only the basic principles and preferred embodiments of the present invention. Improvements and substitutions made by those skilled in the art based on the present invention fall within the protection scope of the present invention.
Claims
1. A method for automatically calibrating the steady-state random write performance of an SSD, characterized by: The following steps are involved: S01) Calculate the initial value of steady-state IOPS based on formula 1 , and use the steady-state IOPS configuration command to Configured as , Indicates the current steady-state IOPS; (1), in Indicates the ratio of SSD logical capacity to physical capacity. Indicates the Nand write operation bandwidth in the SSD. Indicates the Nand read operation bandwidth in the SSD. Indicates the amount of data per IO; S02), perform two full disk sequential write operations; S03) Perform random write operations for m hours to ensure that the SSD enters a steady state, where m is a positive number; S04) Perform random write operations for n hours, where n is a positive number and is less than m. Record the random write IOPS performed by the SSD per second, (2); in Indicates the Random write IOPS in seconds, Greater than or equal to 1 and less than or equal to ,and is a natural number; S05) Statistics of host computer Smaller than If the sample proportion is less than , proceed to step S06); otherwise proceed to step S07); S06) Use the steady-state IOPS configuration command to Configured as , and returns to step S04), Indicates each adjustment the increment; S07), Update , ;if Non-zero, through the steady-state IOPS configuration command Configured as , and return to step S04); otherwise, This is the final calibrated steady-state IOPS, ending the automated calibration operation.
2. The method for automatically calibrating the SSD steady-state random write performance according to claim 1, wherein: The host computer sends the steady-state IOPS configuration command using 0xD0 as the opcode and the 4 bytes between Byte 40 and Byte 43 as the steady-state IOPS configuration field. The host computer stores the IOPS value to be configured in the steady-state IOPS configuration field in the command. After receiving the command, the SSD parses the steady-state IOPS configuration field and sets the value in the field to the current steady-state IOPS, thus completing the host computer's steady-state IOPS configuration operation.
3. The method for automatically calibrating the SSD steady-state random write performance according to claim 1, wherein: The initial value is .
4. The method for automatically calibrating the SSD steady-state random write performance according to claim 1, wherein: m=4。 5. The method for automatically calibrating the SSD steady-state random write performance according to claim 1, wherein: n=1。
Citation Information
Patent Citations
NVMe solid state disk IOPS test method, system and device
CN110111835A
Random write performance adjusting method and device, electronic equipment and storage medium
CN113590050A