A testing method, apparatus, device, and medium for solid-state drives.

CN117690474BActive Publication Date: 2026-09-18SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311785316.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2026-09-18
Estimated Expiration
2043-12-22

AI Technical Summary

Technical Problem

[0005]本发明的目的是提供一种固态硬盘的测试方法、装置、设备及介质,以解决因未对基于分区管理命名空间的固态硬盘的活动空间的功能的稳定性进行测试,而造成数据的安全性低、固态硬盘的版本质量低、产品的稳定性低的技术问题

Benefits of technology

[0058] In the solid-state drive (SSD) testing method provided by this invention, a random write region mode is pre-activated for the current test space, which is less than the total number of spaces pre-allocated by the partition management namespace to the SSD. This allows random write operations, random write operation verification, random read operations, and random read operation verification to be performed on each of the current test spaces in the activated random write region mode, and the verification results are obtained. The above steps are repeated for the remaining test spaces that have not been verified until all the spaces pre-allocated by the partition management namespace to the SSD have been tested.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117690474B_ABST
    Figure CN117690474B_ABST
Patent Text Reader

Abstract

This invention discloses a testing method, apparatus, device, and medium for solid-state drives (SSDs), relating to the field of storage technology. During testing, a random write region mode is first enabled for the space under test. Then, write operation verification and read operation verification are performed on each current space under test in the enabled random write region mode, thus testing the random write region function of an SSD with a partitioned namespace management system. Testing is first performed on a first preset number of spaces less than the total number of spaces. Since it is impossible for all spaces to perform write and read operations simultaneously in reality, this testing method better reflects actual user scenarios. Random write operation verification and random read operation verification are performed concurrently on the first preset number of current spaces under test. Compared to non-concurrent scenarios, this invention provides a stability test under high pressure, improving the overall quality of the product and enhancing the user experience when using the SSD.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of storage technology, and in particular to a testing method, apparatus, device, and medium for solid-state drives. Background Technology

[0002] With the rapid growth of data services and the continuous improvement of server performance, the input / output per second (IOPS) of servers has also been increasing. The characteristics of hard disk drives (HDDs) limit the number of IOPS, thus limiting the speed of data reading and writing. Therefore, solid-state drives (SSDs), based on solid-state electronic storage chips, have begun to replace HDDs.

[0003] In solid-state drives (SSDs), Zoned Name Space (ZNS)-based SSDs eliminate garbage collection during sequential writes, reducing write amplification to nearly 1 and lowering overall system write amplification. By eliminating garbage collection, different partitions are isolated and stored, improving disk performance. Therefore, ZNS-based SSDs are widely used. ZNS divides storage space into different zones, each with an active zone, which is a sliding random write interval within which random writes can be performed. Since the hard drive stores user data, the stability of the SSD affects the security of that data; therefore, to ensure data security, the stability of the active zone function needs to be tested.

[0004] As can be seen, how to test the stability of the active area function of a solid-state drive (SSD) based on a partitioned namespace management system in order to ensure data security, improve SSD version quality, and enhance product stability are technical problems that urgently need to be solved by those in the field. Summary of the Invention

[0005] The purpose of this invention is to provide a testing method, apparatus, device, and medium for solid-state drives (SSDs) to solve the technical problems of low data security, low SSD version quality, and low product stability caused by the failure to test the stability of the active space function of SSDs based on partition management namespaces.

[0006] To address the aforementioned technical problems, this invention provides a testing method for solid-state drives (SSDs), applied to the testing of SSDs with partitioned namespace management, the method comprising:

[0007] Enable the random write region mode for the current test space of a first preset number; wherein, the current test space is the space pre-allocated by the partition management namespace to the solid-state drive, and the first preset number is less than the total number of spaces pre-allocated by the partition management namespace to the solid-state drive;

[0008] When performing random write operations and / or random read operations on the first preset number of current test spaces, perform random write verification operations and / or random read verification operations concurrently on each of the current test spaces and obtain the verification results;

[0009] If the number of currently tested spaces that have completed verification is less than the total number of spaces, select the first preset number of spaces from the remaining spaces as the new currently tested spaces, and return to the step of enabling the random write region mode of the first preset number of currently tested spaces; wherein, the remaining space is the space remaining after the currently tested spaces that have completed verification are the spaces that the partition management namespace has pre-divided into the solid-state drive.

[0010] The process ends when the number of currently tested spaces that have completed verification is equal to the total number of spaces.

[0011] On one hand, the mode of opening a first preset number of random write regions in the current test space includes:

[0012] Obtain an instruction for querying the number of active areas for parallel processing of the preset solid-state drive;

[0013] The number of active regions for parallel processing is queried according to the instruction used to query the number of active regions for parallel processing of the solid-state drive (SSD).

[0014] Obtain the first preset number of the current test space, which is equal to the number of active regions processed in parallel;

[0015] Enable the random write region mode of the current test space, which is equal to the number of active regions for parallel processing, as a first preset number.

[0016] On the other hand, the mode of opening a first preset number of random write regions in the current test space includes:

[0017] Obtain the preset method for enabling the random write region mode of the space and the number of such methods;

[0018] Obtain the ratio of the first preset quantity to the number of ways to enable the random write region mode in space;

[0019] The first preset number of the current test spaces are grouped according to the ratio;

[0020] For each group of spaces to be tested, the random write region mode is enabled according to the corresponding pre-set method.

[0021] On the other hand, the pre-defined methods for enabling the random write region mode of the space include at least the following:

[0022] Method 1: Obtain the command used to open the space;

[0023] When executing the command to open the space, the space is opened in a random write region mode;

[0024] Method 2: Obtain the command for opening the space; when executing the command for opening the space, open the space random write region mode, and execute the operation for setting the descriptor extension command to enable the space random write region mode;

[0025] Method 3: Execute the operation used to set the descriptor expansion command;

[0026] After detecting that the operation for setting the descriptor expansion command has been executed, obtain the command for opening the space;

[0027] When the command for opening the space is executed, the space is opened in a random write region mode.

[0028] On the other hand, when performing random write operations and / or random read operations on the first preset number of current test spaces, concurrently performing random write verification operations and / or random read verification operations on each of the current test spaces and obtaining verification results includes:

[0029] Obtain testing tools for stress testing solid-state drives;

[0030] The testing tool is used to obtain the sliding granularity of the random write region of each current test space and the size of the random write region.

[0031] Random write operations are performed on each of the current test spaces according to the data size of the sliding granularity, and a second preset number of jobs are concurrently executed to perform random write operation verification and obtain a first verification result; wherein, the second preset number is determined according to the preset parallel processing job volume of the solid-state drive;

[0032] During the process of performing random write operations on each of the current test spaces according to the data size of the sliding granularity, it is verified whether the write pointer updates the value of the sliding granularity when each data size of the sliding granularity is flushed, and a second verification result is obtained.

[0033] Determine whether the amount of data in each of the current test spaces is equal to the size of the random write region of the space;

[0034] If not, return to the step of performing random write operations on each of the current test spaces according to the data size of the sliding granularity;

[0035] If so, obtain the data volume status of the current test space; verify that the data volume of the current test space is equal to the size of the corresponding random write area of ​​the space according to the data volume status, and obtain the third verification result; perform random read verification operation on each of the current test spaces, and obtain the fourth verification result;

[0036] Obtain the current space state of each of the spaces to be tested;

[0037] The current space status is verified according to the preset current space status, and the fifth verification result is obtained.

[0038] On the other hand, after performing random write verification operations and / or random read verification operations concurrently on each of the current test spaces and obtaining the verification results, the method further includes: when the following preset requirements are met, the stability test result of the solid-state drive is determined to be passed;

[0039] The preset requirements include:

[0040] The first verification result indicates that the testing tool did not issue a notification indicating an error in the verification of the random write operation.

[0041] The second verification result is that when the data volume of each sliding granularity is refreshed, the write pointer updates the value of each sliding granularity accordingly;

[0042] The third verification result is that when the amount of data in the current space to be tested is equal to the size of the corresponding random write area of ​​the space, the data volume status is full of data.

[0043] The fourth verification result indicates that the data format is correct;

[0044] The fifth verification result is that the preset state of each current space to be tested is the same as the state of the corresponding current space.

[0045] On the other hand, before activating the spatial random write region mode of the first preset number of current test spaces, the method further includes:

[0046] Upon receiving an instruction to characterize testing the solid-state drive, determine whether the random write region mode of the first preset number of the current test space has been enabled;

[0047] If so, proceed to the step of opening the first preset number of random write regions in the current test space;

[0048] If not, the state of the solid-state drive is detected by an instruction used to characterize the detection of the state of the solid-state drive; if the state result is normal, the solid-state drive is formatted and initialized.

[0049] To address the aforementioned technical problems, the present invention also provides a testing apparatus for solid-state drives (SSDs), applied to the testing of SSDs with partitioned namespace management, the testing apparatus comprising:

[0050] The module is used to enable a random write region mode for a first preset number of current test spaces; wherein, the current test space is the space pre-allocated by the partition management namespace to the solid-state drive, and the first preset number is less than the total number of spaces pre-allocated by the partition management namespace to the solid-state drive.

[0051] The execution module is configured to concurrently perform random write verification operations and / or random read verification operations on each of the current test spaces and obtain verification results when performing random write operations and / or random read operations on the first preset number of the current test spaces;

[0052] The judgment module is used to determine whether the number of currently tested spaces that have completed verification is less than the total number of spaces; if yes, the selection module is triggered; otherwise, the process ends.

[0053] The selection module is used to select the first preset number of spaces from the remaining space as the new current test space and return to trigger the start module; wherein, the remaining space is the space remaining after the current test space has been verified, excluding all the spaces that the partition management namespace has pre-divided into the solid-state drive.

[0054] To address the aforementioned technical problems, the present invention also provides a testing device for solid-state drives, comprising:

[0055] Memory, used to store computer programs;

[0056] The processor is used to implement the steps of the above-described solid-state drive testing method when executing the computer program.

[0057] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned solid-state drive testing method.

[0058] In the solid-state drive (SSD) testing method provided by this invention, a random write region mode is pre-activated for the current test space, which is less than the total number of spaces pre-allocated by the partition management namespace to the SSD. This allows random write operations, random write operation verification, random read operations, and random read operation verification to be performed on each of the current test spaces in the activated random write region mode, and the verification results are obtained. The above steps are repeated for the remaining test spaces that have not been verified until all the spaces pre-allocated by the partition management namespace to the SSD have been tested.

[0059] The beneficial effects of this invention are as follows: First, the testing method is used to test solid-state drives (SSDs) with partitioned namespace management. During testing, the random write region mode of the space to be tested is first enabled, and then write operation verification and read operation verification are performed on each current space to be tested in the enabled random write region mode. Therefore, this method achieves the testing of the random write region function of SSDs with partitioned namespace management. Second, during testing, a first preset number of spaces less than the total number of spaces are tested first. Since it is impossible for all spaces to perform write and read operations simultaneously in reality, this method tests a portion of the spaces each time, which is more in line with actual user scenarios. Third, random write operation verification and random read operation verification are performed concurrently on the first preset number of current spaces to be tested. Compared with non-concurrent scenarios, this invention is a stability test under high pressure, which improves the overall quality of the product and enhances the user experience when using the SSD through stability testing under high pressure.

[0060] In addition, when the random write area mode of the current test space is enabled for the first preset number, the first preset number is determined based on the preset number of active areas for parallel processing of the solid-state drive. Since the preset number of active areas for parallel processing of the solid-state drive can reflect the upper limit of the solid-state drive's capabilities, it ensures that the current test space enabled at one time can complete the test as much as possible.

[0061] When the first preset number of current test spaces are enabled to use the random write region mode, the first preset number of test spaces are grouped according to the number of preset ways to enable the random write region mode. The random write region mode is enabled for different groups in different ways, so that all spaces can enable different modes of random write region mode, covering various scenarios for full testing.

[0062] Multiple verifications were performed under random write and read operations to ensure a more comprehensive test. Only after all multiple verifications passed was the SSD's stability test result confirmed as passed, significantly improving the reliability of the test results. Furthermore, the first verification involved concurrently executing a second preset number of jobs to perform random write operations. This second preset number was determined based on the preset parallel processing workload of the SSD. Since the preset parallel processing workload of the SSD reflects one of the upper limits of the SSD's capabilities, this method can be seen as a high-stress testing approach.

[0063] Before activating the random write zone mode for the first preset number of spaces to be tested, the solid-state drive is first checked for status, formatted, and initialized. This minimizes the impact of data on the disk before testing on the accuracy of the test results, thus improving the accuracy of the test.

[0064] In addition, the present invention also provides a solid-state drive testing device, a solid-state drive testing equipment, and a computer-readable storage medium, which have the same or corresponding technical features as the solid-state drive testing method mentioned above, and have the same effect. Attached Figure Description

[0065] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0066] Figure 1 A flowchart illustrating a testing method for a solid-state drive (SSD) with a partitioned namespace management system, provided as an embodiment of the present invention;

[0067] Figure 2 A schematic diagram illustrating the change of the write pointer in a space, provided as an embodiment of the present invention;

[0068] Figure 3 A structural diagram of a solid-state drive testing apparatus provided according to an embodiment of the present invention;

[0069] Figure 4This is a structural diagram of a solid-state drive testing device provided in another embodiment of the present invention. Detailed Implementation

[0070] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.

[0071] The core of this invention is to provide a testing method, apparatus, device, and medium for solid-state drives (SSDs) to solve the technical problems of low data security, low SSD version quality, and low product stability caused by the failure to test the stability of the active space function of SSDs based on partition management namespaces.

[0072] Solid-state drives (SSDs) based on partitioned namespace architecture aim to reduce overall system write amplification, increase SSD lifespan, and improve performance. The sequential write operation of storage systems based on partitioned namespace architecture eliminates intra-disk garbage collection, reducing intra-disk write amplification to nearly 1, a significant optimization compared to the standard disk's write amplification of 2.5 or 4.3, thus extending SSD lifespan. Eliminating intra-disk garbage collection and isolating different partitions significantly improves overall disk performance, providing good performance isolation between different partitions. Partitioned namespace-based SSDs can continuously provide the maximum write bandwidth of the entire disk, offering a performance improvement of over 200% compared to standard disks. Furthermore, the metadata usage of Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM) in partitioned namespace-based SSDs breaks the 1‰ requirement, reducing DRAM demand. Additionally, metadata storage uses NAND (Not Integer)... Solid-state drives with NAND flash memory have a significantly reduced size, providing more physical space for users and increasing overall user capacity by 10% to 30%, while also offering a cost advantage.

[0073] Solid-state drives (SSDs) based on partitioned namespaces are primarily suitable for log-structured systems, where random-to-sequential writes have already been implemented in the storage or file system. Partitioned namespaces divide storage space into different zones, each containing the same number of Logical Block Addressings (LBAs). Data within a zone cannot be overwritten, and only sequential writes are allowed. Therefore, a Zone Random Write Area (ZRWA) feature was developed. The ZRWA targets writes to the active zone and has a sliding random write interval within which random writes can be performed. To improve version quality and product stability, and to better reflect user scenarios, the stability of the ZRWA feature needs to be tested. A comprehensive test of the ZRWA feature on partitioned namespace-based SSDs will be conducted to enhance drive stability.

[0074] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Figure 1 A flowchart illustrating a testing method for a solid-state drive (SSD) with a partitioned namespace management system, provided as an embodiment of the present invention, is shown below. Figure 1 As shown, the method includes:

[0075] S10: Enable the random write region mode for the first preset number of current test spaces;

[0076] The space to be tested is the space pre-allocated by the solid-state drive in the partition management namespace, and the first preset number is less than the total number of spaces pre-allocated by the solid-state drive in the partition management namespace.

[0077] S11: When performing random write operations and / or random read operations on a first preset number of current test spaces, perform random write verification operations and / or random read verification operations concurrently on each current test space and obtain the verification results;

[0078] S12: Determine whether the number of currently tested spaces that have completed verification is less than the total number of spaces; if yes, proceed to step S13; if no, end.

[0079] S13: Select a first preset number of spaces from the remaining space as the new current space to be tested, and return to step S10;

[0080] The remaining space is the space remaining after the current test space has been verified, which is the space pre-allocated by the partition management namespace to the solid-state drive.

[0081] Partition management namespaces divide storage space into different spaces, each containing the same number of logical block addresses; data within a space cannot be overwritten, each space has a write pointer (WP), and only sequential writing is allowed within a space; new data can only be written to each space after a reset; partition management namespaces delegate the control of space open, close, reset, etc., to upper-layer applications.

[0082] Before testing, to minimize the interference of existing data on the disk with the test data and thus the accuracy of the test results, the following steps are included before enabling the random write area mode for the first preset number of spaces to be tested:

[0083] Upon receiving the instruction used to characterize the testing of the solid-state drive, determine whether the random write area mode of the first preset number of current test spaces has been enabled;

[0084] If so, proceed to the step of enabling the first preset number of random write regions in the current test space;

[0085] If not, the status of the solid-state drive is detected by instructions that characterize the status of the solid-state drive; if the status is detected as normal, the solid-state drive is formatted and initialized.

[0086] Before testing the SSD, ensure the test drive is in good condition, format the entire drive, erase all data, and restore it to its initial state. When testing the SSD, since it's impossible for all spaces to simultaneously perform write and read operations, this embodiment of the invention first tests a first preset number of test spaces (less than the total number of spaces) to reflect actual user scenarios. The value of this first preset number is not limited and is determined based on actual conditions. The test spaces include all spaces on the entire drive. The number of test spaces selected each time is not limited, as long as all spaces can ultimately be tested.

[0087] After determining the first preset number of spaces to be tested, the random write region mode of the selected spaces to be tested needs to be enabled before data can be written to the spaces to be tested, and then subsequent random write verification and random read verification can be performed. There are no restrictions on how the random write region mode is enabled.

[0088] After enabling the random write region mode for the first preset number of current test spaces, random write and / or random read operations are performed on the selected first preset number of current test spaces, along with random write and random read verification operations. The test result for the solid-state drive (SSD) is determined based on the verification results. The verification items are not limited and are determined according to actual testing needs. For example, if the space status is verified after the current test space is filled with data, and the verification result shows that the space status has changed to a full state, then the test result for the SSD status is considered passed. It should be noted that, to ensure high reliability of the stability test results, the random write verification operations are performed concurrently.

[0089] After obtaining the verification results of random write and random read of the first preset number of spaces to be tested, since the testing is performed in batches for a portion of the space, in order to test all spaces on the entire disk, after obtaining the verification results, the number of spaces to be tested that have completed verification is obtained. If it is less than the total number of spaces, the above testing process is repeated for all spaces in the partition management namespace that have been pre-divided into the solid-state drive, excluding the spaces to be tested that have completed verification, until the number of spaces to be tested that have completed verification is equal to the total number of spaces, thus achieving the testing of the entire space on the solid-state drive.

[0090] The solid-state drive (SSD) testing method provided in this invention firstly tests SSDs with partitioned namespaces. During testing, a random write region mode is first enabled for the space under test. Then, write operation verification and read operation verification are performed on each of the currently tested spaces in the enabled random write region mode. This method effectively tests the random write region function of SSDs with partitioned namespaces. Secondly, during testing, a first preset number of test spaces (less than the total number of spaces) are tested first. Since it's impossible for all spaces to perform write and read operations simultaneously in practice, testing a portion of the space each time better reflects actual user scenarios. Thirdly, random write operation verification and random read operation verification are performed concurrently on the first preset number of currently tested spaces. Compared to non-concurrent scenarios, this invention provides a high-stress stability test, improving the overall quality of the product and enhancing the user experience when using the SSD.

[0091] Since the preset number of active regions for parallel processing of the solid-state drive (SSD) can reflect the upper limit of the SSD's capabilities, in order to improve testing efficiency and ensure that all currently opened test spaces can complete the test as much as possible, in some embodiments, the random write region mode for opening a first preset number of currently test spaces includes:

[0092] Retrieves the command to query the number of active regions for parallel processing on a preset solid-state drive;

[0093] The number of active regions for parallel processing is queried based on the command used to query the number of active regions for parallel processing of the preset solid-state drive.

[0094] Obtain a first preset number of current test spaces equal to the number of active regions processed in parallel;

[0095] Enable a first preset number of random write regions for the current test space, equal to the number of active regions for parallel processing.

[0096] Specifically, the command used to query the number of active regions for parallel processing of a preset solid-state drive is to issue the command `nvme zns id -ns / dev / nvme0n1` to the drive, query the maximum number of active regions, and record its value as N. In this method, the first preset number of current test spaces, equal to the number of active regions for parallel processing, is selected. Therefore, the number of selected current test spaces is also N. Before conducting the test, the selected N current test spaces are opened.

[0097] In the method provided by the embodiments of the present invention, since the value of the first preset number is determined based on the preset number of active areas for parallel processing of the solid-state drive, and the preset number of active areas for parallel processing of the solid-state drive can reflect the upper limit of the solid-state drive's capabilities, the maximum number of tests is selected in each test, thereby greatly improving the testing efficiency; and ensuring as much as possible that the current test space opened at one time can complete the test.

[0098] After selecting a first preset number of spaces to be tested, the random write region mode for the current spaces to be tested needs to be enabled. In some embodiments, enabling the random write region mode for the first preset number of spaces to be tested includes:

[0099] Get the pre-defined method for enabling random write region mode and the number of methods for enabling random write region mode;

[0100] Get the ratio of the first preset quantity to the number of ways to enable the random write region mode;

[0101] The first preset number of current test spaces are grouped according to the ratio;

[0102] For each group's current test space, enable the random write region mode according to the corresponding pre-set random write region mode.

[0103] The methods for pre-setting the random write region mode in the space in the embodiments of the present invention include at least the following:

[0104] Method 1: Obtain the command used to open the space;

[0105] When executing the command to open a space, the space's random write region mode is opened.

[0106] The command to be executed is nvme io-passthru-o 0x79--cdw10=XX--cdw11=XX--cdw13=0x0203 / dev / nvme0n1.

[0107] Method 2: Obtain the command used to open the space; when executing the command used to open the space, enable the space's random write region mode, and execute the operation used to set the descriptor extension command to enable the space's random write region mode.

[0108] The command to execute is nvme io-passthru -o 0x79--cdw10=XX--cdw11=XX--cdw13=0x0210 / dev / nvme0n1-i file.

[0109] Method 3: Execute the operation used to set the descriptor expansion command;

[0110] After detecting that the operation for setting the descriptor expansion command has been completed, obtain the command for opening the space;

[0111] When executing the command to open a space, the space is opened in random write region mode.

[0112] The commands to be executed are: ① nvme io-passthru -o 0x79--cdw10=XX--cdw11=XX--cdw13=0x0210 / dev / nvme0n1 -i file ② nvme zns open-zone / dev / nvme0n1 –sXX.

[0113] It should be noted that when grouping the first preset number of current test spaces, they should be distributed as evenly as possible. Combining the three methods for enabling random write regions described above, if the first preset number is 30, then the ratio of the first preset number to the number of methods enabling random write regions is 10. That is, the 30 current test spaces are divided into 3 groups, each containing 10 current test spaces. There is no specific limitation on the number of current test spaces included in each group, as long as each group contains at least 10 current test spaces.

[0114] Randomly select N empty zones and divide them into three parts (as evenly as possible). For the first part, execute the command to open the zone and simultaneously enable ZRWA (random write region) mode. The command is: `nvme io-passthru -o 0x79--cdw10=XX--cdw11=XX--cdw13=0x0203 / dev / nvme0n1`. For the second empty zone, execute the `Set Zone Descriptor Extension` operation (opening the zone and enabling random write region mode, while adding valid bits to the extended description information; after `Set Zone Descriptor Extension`, the zone becomes closed). The command is: `nvme io-passthru -o 0x79--cdw10=XX--cdw11=XX--cdw13=0x0210 / dev / nvme0n1 -i file`. For the third empty zone, execute `Set Zone Descriptor Extension` and then execute `open`. The commands to execute for zone are: ① nvme io-passthru -o 0x79 --cdw10=XX --cdw11=XX --cdw13=0x0210 / dev / nvme0n1 -i file ② nvme zns open-zone / dev / nvme0n1 –s XX.

[0115] In the method provided by the embodiments of the present invention, when the random write region mode of the first preset number of current test spaces is enabled, the first preset number of current test spaces are grouped according to the number of preset ways to enable the random write region mode. The random write region mode of the space is enabled in different ways for different groups, so that all spaces can enable different modes of the random write region mode to cover various scenarios for full testing.

[0116] To test solid-state drives (SSDs), in some embodiments, when performing random write and / or random read operations on a first preset number of current test spaces, concurrently performing random write verification operations and / or random read verification operations on each current test space and obtaining the verification results includes:

[0117] Obtain testing tools for stress testing solid-state drives;

[0118] Use testing tools to obtain the sliding granularity and size of the random write region in each current test space.

[0119] Random write operations are performed on each current test space according to the data size of the sliding granularity, and a second preset number of jobs are executed concurrently to perform random write operation verification and obtain the first verification result; wherein, the second preset number is determined according to the preset number of jobs for parallel processing of solid-state drives;

[0120] During the process of performing random write operations on each current test space according to the data size of the sliding granularity, it is verified whether the write pointer updates the value of a sliding granularity when the data size of a sliding granularity is flushed each time, and the second verification result is obtained.

[0121] Determine whether the amount of data in each current test space is equal to the size of the space's random write region;

[0122] If not, return to the steps of performing random write operations on each current test space according to the data size of the sliding granularity;

[0123] If so, obtain the data volume status of the current test space; verify that the data volume of the current test space is equal to the size of the corresponding random write area based on the data volume status, and obtain the third verification result; perform random read verification operation on each current test space, and obtain the fourth verification result;

[0124] Obtain the current space state of each space to be tested;

[0125] The state of each current space is verified according to the preset state of each current space to be tested, and the fifth verification result is obtained.

[0126] The testing tool used for stress testing of solid-state drives is not limited, as long as it can perform the test. In this embodiment of the invention, the selected testing tool is fio. fio is an input / output (I / O) tool used for stress testing and verification of hardware, supporting 13 different I / O engines, including: sync, mmap, libaio, posixaio, SG v3, splice, null, network, syslet, guasi, solarisaio, etc., as well as I / O priorities (for newer Linux kernels), rate I / O, and forked or threaded jobs.

[0127] Figure 2 This is a schematic diagram illustrating the change of the write pointer in a space, as provided in an embodiment of the present invention. Figure 2The text demonstrates that the write pointer slid through four granularities. Using the fio testing tool and a full disk of 1465 spaces as an example, this test method primarily targets SSDs in partitioned namespace mode with random write zone mode enabled. It performs a stress and stability test by concurrently writing 4k bytes of data to the maximum resource limit across all spaces, followed by data verification. The detailed test steps are as follows:

[0128] a. Issue the zns id-ns command to obtain the value of the sliding granularity (ZRWA Flush Granularity, ZRWAFG) of the random write region as the sliding granularity (Flush Granularity, FG), and at the same time obtain the value of the size of the random write region in space;

[0129] b. For the selected N spaces, each space concurrently performs a 4k random write verification operation with a total job volume of 4*32. The size of each fio write operation is the data of FG logical block addresses. The execution command is as follows: fio--name=zrwa--rw=randwrite--offset=$offset--size=$FG--loop=2--verify=md5--do_verify=1--numjob=4--iodepth=32--bs=4k;

[0130] c. Execute Flush Explicit ZRWA Range, flushing the data size of 1 FG and refreshing the write pointer value;

[0131] d. Repeat steps b and c, increasing the fio offset by 1 FG each time, until the entire space is filled;

[0132] e. After the selected N spaces are filled, perform random read verification for each space; the execution command is fio--name=zrwa--rw=randread--offset=$ZONE_SLBA--size=$ZONE_CAP--verify=md5--do_verify=1;

[0133] f. To query the status of a space, execute `nvme zns report -zones / dev / nvme0n1 -s XXXX -d1` to query information about all spaces.

[0134] g. Select N new spaces, repeat the preset conditions and execution steps until all 1465 spaces on the disk are filled.

[0135] After verification, in order to improve the reliability of the test, in some embodiments, after performing random write verification operations and / or random read verification operations concurrently on each current space to be tested and obtaining the verification results, the method further includes: when the following preset requirements are met, the stability test result of the solid-state drive is determined to be passed;

[0136] The preset requirements include:

[0137] The first verification result detected was that the testing tool did not issue a notification indicating an error in the verification of random write operations;

[0138] The second verification result is that when the data volume of each sliding granularity is refreshed, the write pointer updates the value of one sliding granularity accordingly.

[0139] The third verification result is that when the amount of data in the current test space is equal to the size of the corresponding random write area, the data status is full of data.

[0140] The fourth verification result indicates that the data format is correct;

[0141] The fifth verification result is that the preset state of each current space to be tested is the same as the state of the corresponding current space.

[0142] Based on the above testing steps, the expected test results are as follows:

[0143] (a) Step b was executed successfully, and fio reported no error messages.

[0144] (b) Step c was executed successfully, zone flush was successful, and the write pointer information was updated to update the value of FG.

[0145] (c) Step d was executed successfully, the selected space was filled, and it became a Full state.

[0146] (d) Step e: The MD5 format data verification was successful, and no error messages were reported.

[0147] (e) In step f, each space is in full state, the space capacity (zone capacity) is a preset value (this preset value is related to the project threshold), the Zone Start Logical Block Address is A, the Write Pointer is A+zonecap, the zone type is sequential write required, and bit 3 of the zone Attributes is 1 (indicating that the space random write zone mode is enabled).

[0148] (f) No errors are reported during step g, and the entire data verification passes.

[0149] In the method provided by this invention, multiple verifications are performed during random write and read operations, making the testing more comprehensive. Only when all multiple verifications pass is the stability test result of the solid-state drive (SSD) confirmed as passed, significantly improving the reliability of the test results. Furthermore, the first verification concurrently executes a second preset number of jobs to perform random write operation verification. This second preset number is determined based on the preset parallel processing workload of the SSD. Since the preset parallel processing workload of the SSD reflects one of the upper limit parameters of the SSD's capabilities, this method can be seen as a high-stress testing approach. By simulating real-world customer scenarios, significant stress and stability testing is conducted on the random write area function of the SSD space based on partition management namespaces, improving the overall quality of the product.

[0150] In the above embodiments, the testing method for solid-state drives (SSDs) has been described in detail. This invention also provides embodiments of SSD testing apparatus and SSD testing equipment. It should be noted that this invention describes the apparatus embodiments from two perspectives: one based on functional modules, and the other based on hardware.

[0151] Figure 3 This is a structural diagram of a solid-state drive testing apparatus provided according to an embodiment of the present invention. This embodiment, based on functional modules, includes:

[0152] Module 10 is enabled to enable a random write region mode for a first preset number of spaces to be tested; wherein, the space to be tested is the space pre-allocated by the partition management namespace to the solid-state drive, and the first preset number is less than the total number of spaces pre-allocated by the partition management namespace to the solid-state drive.

[0153] Execution module 11 is used to concurrently perform random write verification operations and / or random read verification operations on each current space to be tested and obtain verification results when performing random write operations and / or random read operations on a first preset number of current spaces to be tested.

[0154] The judgment module 12 is used to determine whether the number of currently tested spaces that have completed verification is less than the total number of spaces; if yes, the selection module 13 is triggered; otherwise, the process ends.

[0155] The selection module 13 is used to select a first preset number of spaces from the remaining space as the new current test space and return to trigger the start module 10; wherein, the remaining space is the space remaining in all the spaces that the solid-state drive has been pre-divided by the partition management namespace, excluding the current test space that has been verified.

[0156] In one embodiment, the activation module 10 specifically includes:

[0157] The first acquisition module is used to acquire instructions for querying the number of active areas for parallel processing of a preset solid-state drive;

[0158] The query module is used to query the number of active regions for parallel processing based on the command used to query the number of active regions for parallel processing of the preset solid-state drive.

[0159] The second acquisition module is used to acquire a first preset number of current test spaces that are equal to the number of active areas processed in parallel.

[0160] The first activation module is used to activate a spatial random write region mode for the current test space, which is equal to the number of active regions for parallel processing.

[0161] In one embodiment, the activation module 10 specifically includes:

[0162] The third acquisition module is used to acquire the preset method of enabling random write region mode and the number of methods of enabling random write region mode.

[0163] The fourth acquisition module is used to acquire the ratio of the first preset quantity to the number of methods for enabling the random write region mode.

[0164] The grouping module is used to group the current test space into a first preset number based on the ratio.

[0165] The second enabling module is used to enable the random write region mode for the current test space of each group according to the corresponding pre-set random write region mode.

[0166] In one embodiment, the execution module 11 specifically includes:

[0167] The fifth acquisition module is used to acquire testing tools for stress testing solid-state drives;

[0168] The sixth acquisition module is used to obtain the sliding granularity and size of the random write region of each current test space using testing tools;

[0169] The first verification module is used to perform random write operations on each current test space according to the data size of the sliding granularity, and concurrently execute a second preset number of jobs to perform random write operation verification and obtain the first verification result; wherein, the second preset number is determined according to the preset number of jobs for parallel processing of solid-state drives;

[0170] The second verification module is used to verify whether the write pointer updates the value of a sliding granularity when performing random write operations on each current test space according to the data volume of the sliding granularity, and to obtain the second verification result.

[0171] The first judgment module is used to determine whether the amount of data in each current test space is equal to the size of the random write area of ​​the space; if not, it returns to trigger the first verification module; if yes, it triggers the third verification module.

[0172] The third verification module is used to obtain the data volume status of the current test space; to verify that the data volume of the current test space is equal to the size of the corresponding random write area based on the data volume status, and to obtain the third verification result.

[0173] The fourth verification module is used to perform random read verification operations on each current space to be tested and obtain the fourth verification result;

[0174] The seventh acquisition module is used to acquire the current space status of each space to be tested;

[0175] The fifth verification module is used to verify the status of each current space according to the preset status of each current space to be tested, and to obtain the fifth verification result.

[0176] In one embodiment, the solid-state drive testing apparatus further includes:

[0177] The determination module is used to determine that the stability test result of the solid-state drive passes when the following preset requirements are met;

[0178] The preset requirements include: the first verification result is that the test tool does not issue a notification indicating an error in the verification of random write operations;

[0179] The second verification result is that when the data volume of each sliding granularity is refreshed, the write pointer updates the value of one sliding granularity accordingly.

[0180] The third verification result is that when the amount of data in the current test space is equal to the size of the corresponding random write area, the data status is full of data.

[0181] The fourth verification result indicates that the data format is correct;

[0182] The fifth verification result is that the preset state of each current space to be tested is the same as the state of the corresponding current space.

[0183] In one embodiment, the solid-state drive testing apparatus further includes:

[0184] The second judgment module is used to determine whether the random write area mode of the first preset number of current test spaces is enabled after receiving the instruction used to characterize the test of the solid-state drive; if yes, the enabling module 10 is triggered; if no, the detection module is triggered.

[0185] The detection module is used to detect the status of the solid-state drive (SSD) using instructions that characterize the status of the SSD; if the detected status is normal, the SSD is formatted and initialized.

[0186] Since the embodiments of the apparatus and the method correspond to each other, please refer to the description of the embodiments in the method section for the apparatus embodiments, which will not be repeated here. Furthermore, it has the same beneficial effects as the solid-state drive testing method mentioned above.

[0187] Figure 4 This is a structural diagram of a solid-state drive testing device provided according to another embodiment of the present invention. This embodiment is based on a hardware perspective, such as... Figure 4 As shown, the testing equipment for solid-state drives includes:

[0188] Memory 20 is used to store computer programs;

[0189] The processor 21 is used to execute computer programs to implement the steps of the solid-state drive testing method mentioned in the above embodiments.

[0190] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.

[0191] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the solid-state drive testing method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the aforementioned solid-state drive testing method.

[0192] In some embodiments, the solid-state drive testing equipment may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.

[0193] Those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on the testing equipment for solid-state drives and may include more or fewer components than shown.

[0194] The solid-state drive testing device provided in this embodiment of the invention includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: the solid-state drive testing method, with the same effect as above.

[0195] Finally, the present invention also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, performs the steps described in the above method embodiments.

[0196] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0197] The computer-readable storage medium provided by this invention includes the aforementioned test method for solid-state drives, and the effect is the same as above.

[0198] The foregoing has provided a detailed description of a testing method, apparatus, device, and medium for a solid-state drive provided by the present invention. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

[0199] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A testing method for a solid-state drive, characterized in that, The method, applied to testing solid-state drives (SSDs) with partitioned namespace management, includes: Enable the random write region mode for the current test space of a first preset number; wherein, the current test space is the space pre-allocated by the partition management namespace to the solid-state drive, and the first preset number is less than the total number of spaces pre-allocated by the partition management namespace to the solid-state drive; When performing random write operations and / or random read operations on the first preset number of current test spaces, perform random write verification operations and / or random read verification operations concurrently on each of the current test spaces and obtain the verification results; If the number of currently tested spaces that have completed verification is less than the total number of spaces, select the first preset number of spaces from the remaining spaces as the new currently tested spaces, and return to the step of enabling the random write region mode of the first preset number of currently tested spaces; wherein, the remaining space is the space remaining after the currently tested spaces that have completed verification are the spaces that the partition management namespace has pre-divided into the solid-state drive. The process ends when the number of currently tested spaces that have completed verification equals the total number of spaces. The step of performing random write operations and / or random read operations on the first preset number of current test spaces, concurrently performing random write verification operations and / or random read verification operations on each of the current test spaces and obtaining the verification results includes: Obtain testing tools for stress testing solid-state drives; The testing tool is used to obtain the sliding granularity of the random write region of each current test space and the size of the random write region. Random write operations are performed on each of the current test spaces according to the data size of the sliding granularity, and a second preset number of jobs are concurrently executed to perform random write operation verification and obtain a first verification result; wherein, the second preset number is determined according to the preset parallel processing job volume of the solid-state drive; During the process of performing random write operations on each of the current test spaces according to the data size of the sliding granularity, it is verified whether the write pointer updates the value of the sliding granularity when each data size of the sliding granularity is flushed, and a second verification result is obtained. Determine whether the amount of data in each of the current test spaces is equal to the size of the random write region of the space; If not, return to the step of performing random write operations on each of the current test spaces according to the data size of the sliding granularity; If so, obtain the data volume status of the current test space; verify that the data volume of the current test space is equal to the size of the corresponding random write area of ​​the space according to the data volume status, and obtain the third verification result; perform random read verification operation on each of the current test spaces, and obtain the fourth verification result; Obtain the current space state of each of the spaces to be tested; The current space status is verified according to the preset current space status, and the fifth verification result is obtained.

2. The testing method for a solid-state drive according to claim 1, characterized in that, The mode for opening a first preset number of random write regions in the current test space includes: Obtain an instruction for querying the number of active areas for parallel processing of the preset solid-state drive; The number of active regions for parallel processing is queried according to the instruction used to query the number of active regions for parallel processing of the solid-state drive (SSD). Obtain the first preset number of the current test space, which is equal to the number of active regions processed in parallel; Enable the random write region mode of the current test space, which is equal to the number of active regions for parallel processing, as a first preset number.

3. The testing method for a solid-state drive according to claim 1 or 2, characterized in that, The mode for opening a first preset number of random write regions in the current test space includes: Obtain the preset method for enabling the random write region mode of the space and the number of such methods; Obtain the ratio of the first preset quantity to the number of ways to enable the random write region mode in space; The first preset number of the current test spaces are grouped according to the ratio; For each group of spaces to be tested, the random write region mode is enabled according to the corresponding pre-set method.

4. The testing method for a solid-state drive according to claim 3, characterized in that, The pre-defined methods for enabling the random write region mode of the space include at least the following: Method 1: Obtain the command used to open the space; When executing the command to open the space, the space is opened in a random write region mode; Method 2: Obtain the command for opening the space; when executing the command for opening the space, open the space random write region mode, and execute the operation for setting the descriptor extension command to enable the space random write region mode; Method 3: Execute the operation used to set the descriptor expansion command; After detecting that the operation for setting the descriptor expansion command has been executed, obtain the command for opening the space; When the command for opening the space is executed, the space is opened in a random write region mode.

5. The testing method for a solid-state drive according to claim 1, characterized in that, After performing random write verification operations and / or random read verification operations concurrently on each of the current test spaces and obtaining the verification results, the method further includes: when the following preset requirements are met, the stability test result of the solid-state drive is determined to be passed; The preset requirements include: The first verification result indicates that the testing tool did not issue a notification indicating an error in the verification of the random write operation. The second verification result is that when the data volume of each sliding granularity is refreshed, the write pointer updates the value of each sliding granularity accordingly; The third verification result is that when the amount of data in the current space to be tested is equal to the size of the corresponding random write area of ​​the space, the data volume status is full of data. The fourth verification result indicates that the data format is correct; The fifth verification result is that the preset state of each current space to be tested is the same as the state of the corresponding current space.

6. The testing method for a solid-state drive according to claim 1, characterized in that, Before activating the random write region mode for the first preset number of current test spaces, the method further includes: Upon receiving an instruction to characterize testing the solid-state drive, determine whether the random write region mode of the first preset number of the current test space has been enabled; If so, proceed to the step of opening the first preset number of random write regions in the current test space; If not, the state of the solid-state drive is detected by an instruction used to characterize the detection of the state of the solid-state drive; if the state result is normal, the solid-state drive is formatted and initialized.

7. A testing device for solid-state drives, characterized in that, The testing apparatus, used for testing solid-state drives (SSDs) with partitioned namespace management, includes: The module is used to enable a random write region mode for a first preset number of current test spaces; wherein, the current test space is the space pre-allocated by the partition management namespace to the solid-state drive, and the first preset number is less than the total number of spaces pre-allocated by the partition management namespace to the solid-state drive. The execution module is configured to concurrently perform random write verification operations and / or random read verification operations on each of the current test spaces and obtain verification results when performing random write operations and / or random read operations on the first preset number of the current test spaces; The judgment module is used to determine whether the number of currently tested spaces that have completed verification is less than the total number of spaces; if yes, the selection module is triggered; otherwise, the process ends. The selection module is used to select the first preset number of spaces from the remaining space as the new current test space, and return to trigger the start module; wherein, the remaining space is the space remaining after the current test space has been verified, excluding all the spaces that the partition management namespace has pre-divided into the solid-state drive. The execution module is used for: Obtain testing tools for stress testing solid-state drives; The testing tool is used to obtain the sliding granularity of the random write region of each current test space and the size of the random write region. Random write operations are performed on each of the current test spaces according to the data size of the sliding granularity, and a second preset number of jobs are concurrently executed to perform random write operation verification and obtain a first verification result; wherein, the second preset number is determined according to the preset parallel processing job volume of the solid-state drive; During the process of performing random write operations on each of the current test spaces according to the data size of the sliding granularity, it is verified whether the write pointer updates the value of the sliding granularity when each data size of the sliding granularity is flushed, and a second verification result is obtained. Determine whether the amount of data in each of the current test spaces is equal to the size of the random write region of the space; If not, return to the step of performing random write operations on each of the current test spaces according to the data size of the sliding granularity; If so, obtain the data volume status of the current test space; verify that the data volume of the current test space is equal to the size of the corresponding random write area of ​​the space according to the data volume status, and obtain the third verification result; perform random read verification operation on each of the current test spaces, and obtain the fourth verification result; Obtain the current space state of each of the spaces to be tested; The current space status is verified according to the preset current space status, and the fifth verification result is obtained.

8. A testing device for solid-state drives, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the test method for a solid-state drive as described in any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the test method for a solid-state drive as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • System and method for parallel automatic testing of partitioned namespace solid state drives

    CN115408212A

  • Methods for SMR hard disk-based raid creation, data writing for raid, and raid recovery

    WO2023284753A1