Test method, test device and test apparatus of an nvme-based test device
By setting sub-thread status flag values and performance monitoring in the testing device, the problem of decreased test performance caused by memory interface mismatch was solved, and system-level read and write speed monitoring and allocation were realized, improving testing efficiency and stability.
Patent Information
- Application Number
- CN202410783474.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2044-06-17
AI Technical Summary
In existing testing equipment, memory interface mismatch leads to decreased testing efficiency, especially when a short-interface memory is inserted into a long-interface slot. This can easily cause the multi-threaded processing interface to become blocked or stuck, affecting testing efficiency.
By setting sub-thread status flag values in the testing device, the read and write speed of each sub-thread is monitored, and the flag values are rewritten in real time to avoid blocking of the multi-threaded processing interface. A unified scheduling method for the multi-threaded processing interface is adopted to stop sending new sub-thread tasks until the performance is improved, thereby achieving system-level read and write speed monitoring and scheduling.
This improves testing efficiency, avoids blocking or freezing of multi-threaded processing interfaces, and ensures the stability and performance improvement of read and write speeds.
Smart Images

Figure CN118796577B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of testing storage devices, and more particularly to a testing method, testing apparatus, and testing equipment based on an NVMe testing device. Background Technology
[0002] The motherboards in the current test setup typically have four types of PCI-E slots: PCI-E x1, x4, x8, and x16. Hardware such as dedicated sound cards, dedicated network cards, USB 3.0 / 3.1 expansion cards, RAID array cards, PCI-E SSDs, mSATA SSDs, m.2 SSDs, M.2 wireless network cards, or other M.2 interface devices can all be plugged into PCI-E slots. Therefore, manufacturers will install enough PCI-E slots to ensure the expansion capabilities of their products.
[0003] The four types of PCI-E slots (x1, x4, x8, and x16) have different lengths. To ensure compatibility between long and short slots (physical length compatibility and version compatibility, including 1.0, 2.0, and 3.0 compatibility), short slots can naturally be inserted into long slots, but it is not easy to insert long slots into short slots. Generally, x1 slots maintain their original length, while x4, x8, and x16 slots are all standardized to x16 in actual motherboards. When testing, it is possible to test x16 memory. If x4 memory is tested, most pins will be unusable, and the test results will be significantly reduced. Summary of the Invention
[0004] The purpose of this application is to provide a test method, test apparatus, and test equipment based on NVMe testing devices to improve testing efficiency.
[0005] This application discloses a test method based on an NVMe test apparatus, the test apparatus including multiple slots for inserting memory. When the number of read / write pins of a slot is greater than the number of read / write pins of the memory inserted into that slot, the following steps are performed: S1: Obtain the command received by each slot, parse the command into multiple sub-thread tasks, and send the sub-thread tasks to the sub-thread queue to be executed; S2: Determine if the number of child thread tasks in the queue to be executed is zero; if yes, end; otherwise, execute step S3. S3: Get the child thread status flag value; S4: Determine if the child thread's state flag value is the first state value; if yes, proceed to step S3; if no, proceed to step S5. S5: Send at least one child thread task from the queue of child threads to be executed to the operating system's multithreading processing interface; S6: The operating system's multi-threaded processing interface executes sub-thread tasks according to a preset program; S7: Calculate the performance value of the currently completed sub-thread task. If the performance value is less than the threshold, set the sub-thread status flag value to the first status value; otherwise, set the sub-thread status flag value to the second status value and re-execute step S2.
[0006] Optionally, before executing step S1, the sub-thread state flag value is initialized and set to the second state value; The first state value indicates low efficiency, and the second state value indicates high efficiency.
[0007] Optionally, step S0 is included before step S1, and step S0 is as follows: Determine if the number of memory modules inserted into the slot is zero. If it is not zero, proceed to step S1.
[0008] Optionally, step S5 includes: Send at least one sub-thread task from the queue of sub-threads to be executed to the multi-threaded processing interface of the operating system, and record the sending time T1 of each sub-thread task; Step S7 includes: Record the completion time T2 of each sub-thread task; Calculate the performance value of the current child thread based on T1 and T2; The performance value of the current child thread is compared with a preset threshold. If the performance value is less than the threshold, the child thread status flag value is set to the first status value. Otherwise, the child thread status flag value is set to the second status value, and step S2 is re-executed.
[0009] Optionally, step S4 includes the following steps: If the child thread's status flag is the first status value, then wait for a preset time and re-execute step S3. The preset time is the maximum time among the completion times of all the sub-threads.
[0010] Optionally, step S7 further includes the step: The performance of each child thread is monitored in real time to obtain a performance value, and the status flag value of the child thread is rewritten based on the performance value.
[0011] Optionally, step S5 includes: Send at least one sub-thread task from the queue of sub-threads to be executed to the multi-threaded processing interface of the operating system, and record the sending time T1 of each sub-thread task; Step S7 includes: Record the completion time T2 of each sub-thread task; Calculate the read speed value of the current child thread based on T1 and T2; The current child thread's read speed value is compared with a preset threshold. If the read speed value is less than the threshold, the child thread's status flag value is set to the first status value; otherwise, the child thread's status flag value is set to the second status value, and step S2 is re-executed.
[0012] Optionally, step S1 includes: S11: Each slot executes the received command, parses the command into multiple read sub-thread tasks or write sub-thread tasks, sends the read sub-thread tasks to the read sub-thread queue to be executed, and sends the write sub-thread tasks to the write sub-thread queue to be executed. Step S2 includes: S21: Determine if the number of read sub-thread tasks in the queue to be executed is zero; if yes, end; otherwise, execute step S31. S22: Determine if the number of write child thread tasks in the queue to be executed is zero; if yes, end; otherwise, execute step S32. Step S3 includes: S31: Get the read sub-thread status flag value; S32: Get the status flag value of the write child thread; Step S4 includes: S41: Determine whether the status flag value of the child thread is the first status value; if yes, proceed to step S3; if no, proceed to step S51. S42: Determine whether the status flag value of the writing child thread is the first status value; if yes, proceed to step S3; if no, proceed to step S52. Step S5 includes: S51: Send at least one read sub-thread task from the queue of read sub-threads to the operating system's multi-threaded processing interface, and record the sending time T1 of each sub-thread task; S52: Send at least one read sub-thread task from the queue of read sub-threads to the operating system's multi-threaded processing interface, and record the sending time T1' of each sub-thread task; Step S6 includes: S61: The operating system's multi-threaded processing interface executes the read sub-thread task according to a preset program; S62: The operating system's multithreading interface executes write sub-thread tasks according to a preset program; Step S7 includes: S71: Record the completion time T2 of each read sub-thread task; calculate the read speed value of the current sub-thread based on T1 and T2; compare the read speed value of the current sub-thread task with a preset threshold. When the read speed value is less than the threshold, set the read sub-thread status flag value to the first status value; otherwise, set the read sub-thread status flag value to the second status value and re-execute step S21. S72: Record the completion time T2' of each write sub-thread task; calculate the write speed value of the current sub-thread based on T1' and T2'; compare the write speed value of the current sub-thread task with a preset threshold. When the write speed value is less than the threshold, set the write sub-thread status flag value to the first status value; otherwise, set the write sub-thread status flag value to the second status value and re-execute step S22.
[0013] This application also discloses a testing apparatus for testing using any of the testing methods described above, the testing apparatus comprising a plurality of slots for inserting memory.
[0014] This application also discloses a testing device, which includes a testing apparatus as described above and a testing host that drives the testing apparatus; the testing host includes an operating system, a tag storage module, a control module and a sub-thread energy efficiency monitoring module, and the operating system includes a command receiving module, a sub-thread queue storage module, a command parsing module and a multi-thread processing interface; The command receiving module is used to receive commands from the script; the sub-thread queue storage module is used to store the sub-thread queue to be executed; the command parsing module is connected to the command receiving module, parses the script commands into multiple sub-thread tasks, and sends them to the sub-thread queue of the sub-thread queue storage module; the multi-thread processing interface is connected to the slot of the test device, receives sub-thread tasks, and executes sub-thread tasks according to a preset program. The tag storage module is used to store sub-thread status tag values; the control module is connected to the tag storage module and determines whether the sub-thread status tag value is a first status value. If it is, it waits; if not, it sends at least one sub-thread task from the queue of sub-threads to be executed to the multi-thread processing interface of the operating system; the sub-thread energy efficiency monitoring module is connected to the tag storage module and the multi-thread interface respectively, calculates the efficiency value of the currently completed sub-thread, and sets the sub-thread status tag value to the first status value when the efficiency value is less than a threshold, otherwise sets the sub-thread status tag value to the second status value.
[0015] Compared to current testing methods for NVMe-based testing devices, this application sets up a separate sub-thread status flag value. By monitoring the read and write speed of each sub-thread and rewriting the sub-thread status flag value in real time based on the read and write speed, we can understand whether there is congestion at the multi-threaded processing interface. When congestion occurs, we can stop sending new sub-thread tasks to the multi-threaded processing interface until we monitor that the read and write speed of each sub-thread has improved, and then continue to send new sub-thread tasks. This is equivalent to adding additional read and write speed monitoring and allocation on the basis of system-level unified allocation, thereby avoiding blockage or freezing at the multi-threaded processing interface and improving the testing efficiency of NVMe-based testing devices. Attached Figure Description
[0016] The accompanying drawings, which form part of the specification, are used to provide a further understanding of the embodiments of this application and illustrate the implementation methods of this application, together with the textual description, to explain the principles of this application. Obviously, the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any creative effort. In the drawings: Figure 1 This is a schematic diagram of the test method steps of the first embodiment of this application; Figure 2 This is a schematic diagram of the test method flow of the second embodiment of this application; Figure 3 This is a schematic diagram of the test method flow according to the third embodiment of this application; Figure 4 This is a schematic diagram of the test method flow according to the fourth embodiment of this application; Figure 5 This is a schematic diagram of the test method flow according to the fifth embodiment of this application; Figure 6 This is a schematic diagram of the test device structure according to the sixth embodiment of this application; Figure 7 This is a schematic diagram of the test device structure according to the seventh embodiment of this application.
[0017] Among them, 100 is the testing device; 110 is the slot; 200 is the memory; 300 is the testing equipment; 310 is the testing host; 320 is the operating system; 321 is the command receiving module; 322 is the command parsing module; 323 is the sub-thread queue storage module; 324 is the multi-thread processing interface; 330 is the tag storage module; 340 is the control module; and 350 is the sub-thread energy efficiency monitoring module. Detailed Implementation
[0018] It should be understood that the terminology, specific structural and functional details used herein are merely for describing particular embodiments and are representative. However, this application may be implemented in many alternative forms and should not be construed as being limited to the embodiments set forth herein.
[0019] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating relative importance or implying the number of technical features indicated. Therefore, unless otherwise stated, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature; "multiple" means two or more. The term "comprising" and any variations thereof mean non-exclusive inclusion, where one or more other features, integers, steps, operations, units, components, and / or combinations thereof may be present or added.
[0020] In addition, terms such as “center,” “horizontal,” “up,” “down,” “left,” “right,” “vertical,” “horizontal,” “top,” “bottom,” “inner,” and “outer” that indicate orientation or positional relationship are based on the orientation or relative positional relationship shown in the accompanying drawings. They are only for the purpose of simplifying the description of this application and do not indicate that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0021] Furthermore, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0022] The present application will now be described in detail with reference to the accompanying drawings and optional embodiments.
[0023] Currently, the commonly used test boards on testing equipment have 16x interfaces, while the objects we test have 16x, 4x, and 8x interfaces. We found that when the number of interfaces of the memory being tested is the same as the number of interfaces on the test board, even if four memory devices are placed in four slots and tested simultaneously, the performance (taking read and write speeds as an example) does not decrease significantly. However, once the number of interfaces of the memory being tested is less than the number of interfaces on the test board, if only one memory is tested, the read and write speeds do not decrease significantly. But once multiple memory devices are tested simultaneously, a sharp drop in read and write speeds occurs. For details, please refer to Table 1 below for testing memory devices in different numbers of slots, where the number of tests corresponds to the number of slots:
[0024] Table 1: Memory Performance Test Table Based on the above test results, a test method based on an NVMe test device is disclosed as the first embodiment of this application. Figure 1 As shown, the testing device includes multiple slots for inserting memory. When the number of read / write pins of a slot is greater than the number of read / write pins of the memory inserted into that slot, the following steps are performed: S1: Obtain the command received by each slot, parse the command into multiple sub-thread tasks, and send the sub-thread tasks to the sub-thread queue to be executed; S2: Determine if the number of child thread tasks in the queue to be executed is zero; if yes, end; otherwise, execute step S3. S3: Get the child thread status flag value; S4: Determine if the child thread's state flag value is the first state value; if yes, proceed to step S3; if no, proceed to step S5. S5: Send at least one child thread task from the queue of child threads to be executed to the operating system's multithreading processing interface; S6: The operating system's multi-threaded processing interface executes sub-thread tasks according to a preset program; S7: Calculate the performance value of the currently completed sub-thread task. If the performance value is less than the threshold, set the sub-thread status flag value to the first status value; otherwise, set the sub-thread status flag value to the second status value and re-execute step S2.
[0025] It should be noted that before this embodiment was completed, several speculations were made regarding the issue of decreased test speed. The final speculation was that the test board was working with multiple test objects, which would call the OS's underlying multi-port (multi-thread) allocation and control functions. The OS's underlying allocation function is based on a 16x design. When we only use 4x storage (SSD) as the test object, some ports are actually not used. However, the OS will still include the unused ports in the unified allocation, which may cause the multi-thread processing interface to be blocked, resulting in each sub-thread being very slow. However, the OS will still send new sub-thread tasks, causing further congestion or even freezing. The OS itself is unaware of the problem. The OS continuously parses commands into multiple sub-thread tasks and sends the sub-thread tasks to the sub-thread queue to be executed.
[0026] In this embodiment, a separate sub-thread status flag value is set. By monitoring the performance (read and write speed) of each sub-thread, the sub-thread status flag value is rewritten in real time based on the performance value. This allows us to understand whether there is congestion at the multi-threaded processing interface. When congestion occurs, we can stop sending new sub-thread tasks to the multi-threaded processing interface until the performance of each sub-thread is monitored to improve, and then continue sending new sub-thread tasks. This is equivalent to adding additional read and write speed monitoring and allocation on the basis of system-level unified allocation, thereby avoiding blockage or freezing at the multi-threaded processing interface.
[0027] Correspondingly, after making the above improvements, we conducted tests, and the test comparison results are shown in Table 2 below:
[0028] Table 2: Memory Performance Test Table In summary, the test results show that the test method of the first embodiment of this application can effectively improve performance issues, increase test efficiency, and improve read and write speeds while ensuring that the average read or write speeds are the same at the thread processing interface under different numbers of NVMe SSDs.
[0029] Inserting four 4x interface storage devices, such as NVMe SSDs, into a 16x interface slot, the system checks for successful insertion. If successful, initialization occurs, setting the sub-thread status flag to idle (second state value). The test host then parses the received script command, breaking it down into multiple sub-thread tasks and sending them to the sub-thread queue. The system checks if the number of sub-thread tasks in the queue is zero; if it is, the process ends and program execution stops. If it's not zero, the sub-thread status flag is retrieved, and further checked against the first state value. If the sub-thread status flag is the first state value, it is retrieved again and checked against the first state value. The process involves checking if the status flag of a child thread is the first state value, repeating this process until the status flag is the first state value. Then, at least one child thread task is sent from the queue of child threads to be executed to the operating system's multithreading processing interface. The operating system's multithreading processing interface executes the child thread task according to a preset program. Finally, the performance value of the currently executed child thread is calculated. If the performance value is less than a threshold, the child thread status flag is set to the first state value; otherwise, the child thread status flag is set to the second state value. The system then checks again whether the number of child thread tasks in the queue of child threads to be executed is zero, until it is not zero, and then retrieves the child thread status flag value again.
[0030] like Figure 2As shown, as a second embodiment of this application, it is a further refinement and improvement of the first embodiment described above. Before executing step S1, the sub-thread state flag value is initialized so that the sub-thread state flag value is a second state value. The first state value represents low efficiency or a busy state, which can be represented by the number 1. The second state value represents high efficiency or a ready state, which can be represented by the number 0. This allows the corresponding program to obtain the judgment result more quickly when it is making a judgment.
[0031] Typically, step S0 precedes step S1, and step S0 is as follows: Determine if the actual number of memory modules inserted into the slot is zero. If it is zero, end the process; otherwise, proceed to step S1.
[0032] The testing method of this application generally starts from step S1. However, considering that no memory may be inserted before the test, even if each slot receives the command and runs all the steps, no real test is achieved in the end. Therefore, before step S1, it is necessary to determine whether the number of memory actually inserted in the slot is zero. If it is zero, the test ends. If it is not zero, step S1 is executed to achieve efficient testing of the memory.
[0033] like Figure 3 As shown, this third embodiment of the present application is a further improvement on the first or second embodiment described above. This embodiment mainly focuses on refining the performance calculation capabilities. Specifically, step S5 includes: Send at least one sub-thread task from the queue of sub-threads to be executed to the multi-threaded processing interface of the operating system, and record the sending time T1 of each sub-thread task; Step S7 includes: Detect the child threads that have sent child thread tasks, and record the completion time T2 of each child thread task; Calculate the performance value of the current child thread based on T1 and T2; Compare the current sub-thread's performance value with a preset threshold. If the performance value is less than the threshold, determine that the current sub-thread is in a busy state and set the sub-thread's status flag value to the first status value. Otherwise, determine that the current sub-thread is in an idle state, set the sub-thread's status flag value to the second status value, and re-execute step S2. The performance value is generally the read or write speed value; performance (MB / s) = test capacity / test time (T2 - T1); Threshold ≥ Performance (unit: MB / s).
[0034] In this embodiment, the performance value of the current sub-thread is compared with a preset threshold. When the performance value is less than the threshold, the sub-thread status flag is set to the first status value; otherwise, the sub-thread status flag is set to the second status value. In the corresponding step S4, the real-time obtained first status value can be judged, thereby adjusting the running speed in real time. When congestion occurs, new sub-thread tasks are stopped from being sent to the multi-threaded processing interface until the performance of each sub-thread is monitored to improve before new sub-thread tasks are sent. The performance of each sub-thread is monitored in real time to obtain the performance value, and the sub-thread status flag value is rewritten based on the performance value. This is equivalent to adding performance monitoring and allocation on the basis of unified allocation at the system level, thereby avoiding blockage or freezing at the multi-threaded processing interface and improving testing efficiency.
[0035] Additionally, it should be noted that step S4 includes the following steps: Determine if the child thread's status flag value is the first status value; if yes, wait for a preset time and then re-execute step S3; if no, execute step S5. The preset time is the longest time required to complete the corresponding sub-thread task among all sub-threads.
[0036] like Figure 4 As shown, this is the fourth embodiment of the present application, and a further improvement on the first or second embodiment described above. This embodiment mainly focuses on refining the performance calculation capabilities. Unlike the third embodiment described above, step S5 includes: Send at least one read sub-thread task from the queue of read sub-threads to the operating system's multi-threaded processing interface, and record the sending time T1 of each read sub-thread task; Step S7 includes: Detect the read sub-threads that have sent sub-thread tasks, and record the completion time T2 of each read sub-thread task; Calculate the read speed value of the current child thread based on T1 and T2; The current read speed value of the child thread is compared with the preset threshold. When the read speed value is less than the threshold, the child thread status flag value is set to the first status value; otherwise, the child thread status flag value is set to the second status value, and step S0 is re-executed.
[0037] In this embodiment, when calculating performance, since the read speed is much greater than the write speed, if the read speed is not restricted, the write speed is generally not restricted either. Therefore, only the performance of the read instruction can be calculated, reducing the calculation time and thus further reducing the total time of the entire test process and improving the test efficiency.
[0038] like Figure 5As shown, this fifth embodiment of the present application is a further improvement on the first or second embodiment described above. Unlike the third and fourth embodiments, this embodiment calculates both read and write speeds separately and sets corresponding status flag values. Specifically, step S1 includes: S11: Each slot executes the received command, parses the command into multiple read sub-thread tasks or write sub-thread tasks, sends the read sub-thread tasks to the read sub-thread queue to be executed, and sends the write sub-thread tasks to the write sub-thread queue to be executed. Step S2 includes: S21: Determine if the number of read child threads in the queue to be executed is zero; if yes, end; otherwise, execute step S31. S22: Determine if the number of write child threads in the queue to be executed is zero; if yes, end; otherwise, execute step S32. Step S3 includes: S31: Get the read sub-thread status flag value; S32: Get the status flag value of the write child thread; Step S4 includes: S41: Determine whether the status flag value of the child thread is the first status value; if yes, proceed to step S3; if no, proceed to step S51. S42: Determine whether the status flag value of the writing child thread is the first status value; if yes, proceed to step S3; if no, proceed to step S52. Step S5 includes: S51: Send at least one read sub-thread task from the queue of read sub-threads to the operating system's multi-threaded processing interface, and record the sending time T1 of each sub-thread task; S52: Send at least one read sub-thread task from the queue of read sub-threads to the operating system's multi-threaded processing interface, and record the sending time T1' of each sub-thread task; Step S6 includes: S61: The operating system's multi-threaded processing interface executes the read sub-thread task according to a preset program; S62: The operating system's multithreading interface executes write sub-thread tasks according to a preset program; Step S7 includes: S71: Detect the child threads that have sent read child thread tasks, and record the completion time T2 of each read child thread task; calculate the read speed value of the current child thread based on T1 and T2; compare the read speed value of the current child thread with a preset threshold. When the read speed value is less than the threshold, set the read child thread status flag value to the first status value; otherwise, set the read child thread status flag value to the second status value and re-execute step S21. S72: Detect the child threads that have sent write child thread tasks, and record the completion time T2' of each write child thread task; calculate the write speed value of the current child thread based on T1' and T2'; compare the write speed value of the current child thread with a preset threshold. When the write speed value is less than the threshold, set the write child thread status flag value to the first status value; otherwise, set the write child thread status flag value to the second status value and re-execute step S22.
[0039] In this embodiment, the performance calculation separates the read speed and write speed and makes corresponding judgments for each. This allows for a more accurate determination of the current state, improves the accuracy of command execution, and avoids the situation where an idle state occurs when the system is busy.
[0040] like Figure 6 As shown in the sixth embodiment of this application, a testing device 100 is disclosed. The testing device 100 is an NVMe SSD-based testing device. The testing device 100 performs testing using the testing method described in any of the above embodiments. The testing device 100 includes multiple slots 110 for inserting memory 200. The number of read / write pins in each slot 110 is greater than the number of read / write pins in the memory 200 inserted in that slot 110. When the number of read / write pins in the slot 110 is greater than the number of read / write pins in the memory 200 inserted in that slot 110, the steps of the testing method in the above embodiments are executed. This can increase the testing volume without reducing performance, achieve synchronous testing of multiple memory devices, and reduce costs. It can be performed using a regular personal computer, without the need for a high-end or server-level personal computer. It can provide relatively complete test data, and this testing device can test four NVMe SSDs simultaneously without affecting the test results due to the performance degradation of the personal computer.
[0041] like Figure 7As shown in the seventh embodiment of this application, a test device 300 is disclosed. The test device includes the test apparatus 100 as described in the above embodiment and a test host 310 that drives the test apparatus 100. The test host 310 includes an operating system 320, a tag storage module 330, a control module 340, and a sub-thread energy efficiency monitoring module 350. The operating system 320 includes a command receiving module 321, a sub-thread queue storage module 323, a command parsing module 322, and a multi-thread processing interface 324. The command receiving module 321 is used to receive commands from the script; the sub-thread queue storage module 323 is used to store the sub-thread queue to be executed; the command parsing module 322 is connected to the command receiving module 321, parses the script commands into multiple sub-thread tasks, and sends them to the sub-thread queue of the sub-thread queue storage module 323; the multi-thread processing interface 324 is connected to the slot 110 of the test device 100, receives sub-thread tasks, and executes the sub-thread tasks according to a preset program; The tag storage module 330 is used to store the sub-thread status tag value; the control module 340 is connected to the tag storage module 330, and determines whether the sub-thread status tag value is the first status value. If it is, it waits; if not, it sends at least one sub-thread task from the sub-thread queue to the operating system's multi-thread processing interface 324; the sub-thread energy efficiency monitoring module 350 is connected to the tag storage module 330 and the multi-thread processing interface 324 respectively, calculates the efficiency value of the currently completed sub-thread, and sets the sub-thread status tag value to the first status value when the efficiency value is less than the threshold, otherwise it sets the sub-thread status tag value to the second status value.
[0042] By setting a separate sub-thread status flag value in the tag storage module 330, and then monitoring the performance (read / write speed) of each sub-thread through the sub-thread energy efficiency monitoring module 350, the sub-thread status flag value is rewritten in real time based on the performance value. This allows us to understand whether there is congestion at the multi-thread processing interface. When congestion occurs, we can stop sending new sub-thread tasks to the multi-thread processing interface, thereby avoiding blockage or freezing at the multi-thread processing interface. Furthermore, this application increases the testing volume without reducing performance, enabling synchronous testing of multiple storage devices without the need for high-end or server-level personal computers. It can provide relatively complete test data, and the test results will not be affected by the performance degradation of personal computers.
[0043] Generally, we will use a 2TB NVMe SSD (MAP1602+WDS) as an example to test read and write performance: The test verifies full-capacity write / read performance, starting with the test script: Insert at least two NVMe SSDs into the slots and check if an NVMe SSD is present in the slot; check the module name / serial number corresponding to the slot; check the PCIe Gen4x4 lane width; run performance write for approximately 45 minutes; check the status and flags of the two threads, setting the flag to busy when write performance is below the threshold. This thread status will be set in the function, with busy corresponding to the number 1 and idle corresponding to the number 0. Each thread function will check if the flag is ready; run performance read for approximately 20 minutes; check if the write / read values meet the specifications; if the value is below the specifications, it should fail; otherwise, it passes; save the test log; the test is complete. Additionally, for some special cases, such as when thread function performance is below the threshold, a 100-millisecond delay will be added to the slot number; if there is only one slot number, the flag will always be zero.
[0044] It should be noted that the limitations on each step involved in this solution are not considered as limiting the order of steps, provided that they do not affect the implementation of the specific solution. The steps listed first can be executed first, later, or even simultaneously. As long as this solution can be implemented, it should be considered to fall within the scope of protection of this application.
[0045] It should be noted that the inventive concept of this application can form many embodiments, but due to the limited space of the application documents, they cannot all be listed. Therefore, without conflict, the embodiments described above or the technical features can be arbitrarily combined to form new embodiments. After the embodiments or technical features are combined, the original technical effect will be enhanced.
[0046] The above description is a further detailed explanation of this application in conjunction with specific optional embodiments. It should not be considered that the specific implementation of this application is limited to these descriptions. For those skilled in the art to which this application pertains, several simple deductions or substitutions can be made without departing from the concept of this application, and all of these should be considered to fall within the protection scope of this application.
Claims
1. A test method based on an NVMe test device, characterized in that, The testing device includes multiple slots for inserting memory. When the number of read / write pins of a slot is greater than the number of read / write pins of the memory inserted into that slot, the following steps are performed: S0: Determine if the number of memory modules inserted into the slot is zero. If it is not zero, proceed to step S1. S1: Obtain the command received by each slot, parse the command into multiple sub-thread tasks, and send the sub-thread tasks to the sub-thread queue to be executed; S2: Determine if the number of child thread tasks in the queue to be executed is zero; if yes, end; otherwise, execute step S3. S3: Get the child thread status flag value; S4: Determine if the child thread's state flag value is the first state value; if yes, proceed to step S3; if no, proceed to step S5. S5: Send at least one sub-thread task from the queue of sub-threads to be executed to the multi-threaded processing interface of the operating system, and record the sending time T1 of each sub-thread task; S6: The operating system's multi-threaded processing interface executes sub-thread tasks according to a preset program; S7: Record the completion time T2 of each sub-thread task. Based on T1 and T2, calculate the efficiency value of the currently completed sub-thread task. The first state value indicates low efficiency or busy state, and the second state value indicates high efficiency or idle state. When the efficiency value is less than the threshold, set the sub-thread state flag value to the first state value; otherwise, set the sub-thread state flag value to the second state value and re-execute step S2.
2. The test method as described in claim 1, characterized in that, Before executing step S1, the sub-thread state flag value is initialized and set to the second state value; The first state value indicates low efficiency, and the second state value indicates high efficiency.
3. The test method as described in any one of claims 1-2, characterized in that, Step S5 includes: Send at least one sub-thread task from the queue of sub-threads to be executed to the multi-threaded processing interface of the operating system, and record the sending time T1 of each sub-thread task; Step S7 includes: Record the completion time T2 of each sub-thread task; Calculate the performance value of the current child thread based on T1 and T2; The performance value of the current child thread is compared with a preset threshold. If the performance value is less than the threshold, the child thread status flag value is set to the first status value. Otherwise, the child thread status flag value is set to the second status value, and step S2 is re-executed.
4. The test method as described in claim 1, characterized in that, Step S4 includes the following steps: If the child thread's status flag is the first status value, then wait for the preset time and re-execute step S3; The preset time is the maximum time among the completion times of all the sub-threads.
5. The test method as described in claim 3, characterized in that, Step S7 further includes the following step: The performance of each child thread is monitored in real time to obtain a performance value, and the status flag value of the child thread is rewritten based on the performance value.
6. The test method as described in claim 1, characterized in that, Step S5 includes: Send at least one read sub-thread task from the queue of read sub-threads to the operating system's multi-threaded processing interface, and record the sending time T1 of each read sub-thread task; Step S7 includes: Record the completion time T2 of each read sub-thread task; Calculate the read speed value of the current child thread based on T1 and T2; The current child thread's read speed value is compared with a preset threshold. If the read speed value is less than the threshold, the child thread's status flag value is set to the first status value; otherwise, the child thread's status flag value is set to the second status value, and step S2 is re-executed.
7. The test method as described in claim 1, characterized in that, Step S1 includes: S11: Obtain the command received by each slot, parse the command into multiple read sub-thread tasks or write sub-thread tasks, send the read sub-thread tasks to the read sub-thread queue to be executed, and send the write sub-thread tasks to the write sub-thread queue to be executed. Step S2 includes: S21: Determine whether the number of read sub-thread tasks in the queue of read sub-threads to be executed is zero. If not, proceed to step S31. S22: Determine whether the number of write child thread tasks in the queue to be executed is zero. If not, proceed to step S32. Step S3 includes: S31: Get the read sub-thread status flag value; S32: Get the status flag value of the write child thread; Step S4 includes: S41: Determine whether the status flag value of the child thread is the first status value; if yes, proceed to step S3; if no, proceed to step S51. S42: Determine whether the status flag value of the writing child thread is the first status value; if yes, proceed to step S3; if no, proceed to step S52. Step S5 includes: S51: Send at least one read sub-thread task from the queue of read sub-threads to the operating system's multi-threaded processing interface, and record the sending time T1 of each sub-thread task; S52: Send at least one read sub-thread task from the queue of read sub-threads to the operating system's multi-threaded processing interface, and record the sending time T1' of each sub-thread task; Step S6 includes: S61: The operating system's multi-threaded processing interface executes the read sub-thread task according to a preset program; S62: The operating system's multithreading interface executes write sub-thread tasks according to a preset program; Step S7 includes: S71: Record the completion time T2 of each read sub-thread task; calculate the read speed value of the current sub-thread based on T1 and T2; compare the read speed value of the current sub-thread task with a preset threshold. When the read speed value is less than the threshold, set the read sub-thread status flag value to the first status value; otherwise, set the read sub-thread status flag value to the second status value and re-execute step S21. S72: Record the completion time T2' of each write sub-thread task; calculate the write speed value of the current sub-thread task based on T1' and T2'; compare the write speed value of the current sub-thread with a preset threshold. When the write speed value is less than the threshold, set the write sub-thread status flag value to the first status value; otherwise, set the write sub-thread status flag value to the second status value and re-execute step S22.
8. A testing apparatus, characterized in that, The test is performed using the test method as described in any one of claims 1-7, wherein the test apparatus includes a plurality of slots for inserting memory.
9. A testing device, characterized in that, The test device includes the test apparatus as described in claim 8 and a test host that drives the test apparatus; the test host includes an operating system, a tag storage module, a control module and a sub-thread energy efficiency monitoring module, and the operating system includes a command receiving module, a sub-thread queue storage module, a command parsing module and a multi-thread processing interface; The command receiving module is used to receive commands from the script; the sub-thread queue storage module is used to store the sub-thread queue to be executed; the command parsing module is connected to the command receiving module, parses the script commands into multiple sub-thread tasks, and sends them to the sub-thread queue of the sub-thread queue storage module. The multi-threaded processing interface is connected to the slot of the test device, receives sub-thread tasks, and executes the sub-thread tasks according to a preset program. The system records the sending time T1 and completion time T2 of each read sub-thread task. Based on T1 and T2, it calculates the efficiency value of the currently completed sub-thread task. The tag storage module stores sub-thread status tag values. In the sub-thread status tag values, the first status value indicates low efficiency or a busy state, and the second status value indicates high efficiency or an idle state. The control module is connected to the tag storage module and determines whether the sub-thread status tag value is the first status value. If it is, it waits; if not, it sends at least one sub-thread task from the queue of sub-threads to be executed to the operating system's multi-threaded processing interface. The sub-thread efficiency monitoring module is connected to both the tag storage module and the multi-threaded interface. It calculates the efficiency value of the currently completed sub-thread. When the efficiency value is less than a threshold, it sets the sub-thread status tag value to the first status value; otherwise, it sets the sub-thread status tag value to the second status value.
Citation Information
Patent Citations
Storage hard disk performance test method and device, equipment and storage medium
CN117971575A
Batch test system and method for NVMe SSD abnormal power-off read-write on Linux PC
CN118152300A
