Testing method and device for testing performance of solid state disk, storage medium and electronic equipment
By obtaining the specification parameters and status marks of the solid-state drive, determining the test unit and applying maximum read and write erase pressure, the problems of low efficiency and inaccurate SSD performance testing in the prior art are solved, and comprehensive testing and higher efficiency are achieved. accuracy.
Patent Information
- Application Number
- CN202411487583.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-23
AI Technical Summary
When performing performance testing of solid state hard disks (SSDs), the test efficiency is inefficient and inaccurate, and the storage space of the entire SSD cannot be covered, resulting in incomplete testing.
By obtaining the set of specification parameters that match the nonvolatile storage module on the solid state drive, the number of test units and targets that perform target test operations, and according to the status identification of the test resource, it is determined that read, write or erase data operations are performed on the test unit. Make full use of the idle computing power of the CPU core and the multi-channel concurrency characteristics of NAND particles to apply maximum read and write rub pressure.
A comprehensive test of NAND particles is achieved, the efficiency and accuracy of aging tests are improved, and the storage space of all NAND particles is covered, ensuring the maximum stability and reliability of SSD.
Smart Images

Figure CN119446235A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the computer field, and specifically, to a testing method and device for testing the performance of a solid-state hard disk, a storage medium, and an electronic device. Background Art
[0002] For SSD disks, the aging test is mainly conducted on the stability of nand, including the read, write and erase operations on nand particles. The traditional aging test method mainly uses the FIO tool to issue read, write and erase commands for a long time to perform long-term stability stress tests on SSD disks. On the one hand, the operating efficiency of this test method is affected by the performance of the host. According to the general conventional storage server fully equipped with 24 SSD disks, it is unlikely that each disk FIO runs to the maximum performance, because the server resources and performance cannot meet the requirements of FIO testing of these disks at the same time. On the other hand, the host sends read, write and erase data, and its maximum pressure can only reach the maximum performance point of the SSD disk, which is difficult to produce greater pressure on nand. In order to ensure the quality of enterprise-level SSDs, it is often necessary to test the SSD with a greater pressure than the standard value to ensure its maximum stability and reliability.
[0003] Because of the characteristics of SSD, it improves write performance, reduces write amplification, increases flash memory life and data protection. Not all of its internal persistent storage space is provided to users, but a portion of it is reserved. This portion is called reserved space. Excluding the reserved space, the remaining space is for users to use, called user space. When using the FIO tool to perform an aging test on an SSD, you can only read, write and erase the user space of the SSD, and cannot cover the entire SSD storage space. Therefore, this test also has the problem of incomplete testing. In other words, the related technology has the technical problem of low efficiency and inaccurate testing of hard disks.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a testing method and device, a storage medium and an electronic device for testing the performance of a solid-state hard disk, so as to at least solve the technical problems of low efficiency and inaccurate testing of hard disks in the related art.
[0006] According to one embodiment of the present application, a test method for solid-state hard disk performance test is provided, including: obtaining a set of specification parameters matching a non-volatile storage module on the solid-state hard disk, wherein the specification parameter set includes a channel number parameter, a core number parameter and a logic unit number parameter, the channel number parameter is used to indicate the number of data channels used for data transmission on the non-volatile storage module, the core number parameter is used to indicate the number of chips that receive and execute commands, and the logic unit number parameter is used to indicate the number of logic units used to perform logic operations; determining a test unit that performs a target test operation in the non-volatile storage module and a target number of test units according to the specification parameter set, wherein the target test operation includes at least one of the following: a read data operation, a write data operation, and an erase data operation; obtaining a state identifier of a test resource from a test resource set, and determining to perform a target test operation on the test unit according to the state identifier, wherein the number of test resources in the test resource set is equal to the target number of test units.
[0007] According to another aspect of an embodiment of the present application, a testing device for testing the performance of a solid-state hard disk is also provided, including: an acquisition unit, which acquires a set of specification parameters matching a non-volatile storage module on the solid-state hard disk, wherein the specification parameter set includes a channel number parameter, a core number parameter and a logic unit number parameter, the channel number parameter is used to indicate the number of data channels used for data transmission on the non-volatile storage module, the core number parameter is used to indicate the number of chips for receiving and executing commands, and the logic unit number parameter is used to indicate the number of logic units used to perform logic operations; a determination unit, which determines the test unit that performs a target test operation in the non-volatile storage module and the target number of test units according to the specification parameter set, wherein the target test operation includes at least one of the following: a read data operation, a write data operation, and an erase data operation; an execution unit, which acquires a status identifier of a test resource from a test resource set, and determines to perform a target test operation on the test unit according to the status identifier, wherein the number of test resources in the test resource set is equal to the target number of test units.
[0008] Optionally, the above-mentioned execution unit includes: a first execution module, which is used to obtain test resources from the task processing set when the task processing set is not empty, and obtain a status identifier that matches the test resources; when the status identifier is a data erase request identifier, perform a data erase operation on the test unit according to the test unit address and the test resource, and modify the status identifier of the test resource to data erase completion, wherein the test unit address is determined according to a specification parameter set; when the status identifier is a data write request identifier, perform a data write operation on the test unit according to the test unit address and the test resource, and modify the status identifier of the test resource to data write completion; when the status identifier is a data read request identifier, perform a data read operation on the test unit according to the test unit address and the test resource, and modify the status identifier of the test resource to data read completion.
[0009] Optionally, the above-mentioned first execution module is also used to: when the current number of erase blocks is equal to the maximum number of erase blocks and the current number of test rounds meets the target number of test rounds, modify the state identifier of the test resource to a waiting state identifier, wherein the current number of erase blocks is the number of blocks in the test unit that have been erased, the maximum number of erase blocks is determined according to the physical characteristics of the non-volatile storage module, and the waiting state identifier is used to indicate that the test resource is in a low-power waiting state; when the current number of erase blocks is equal to the maximum number of erase blocks and the current number of test rounds is less than the target number of test rounds, modify the state identifier of the test resource to a write data request identifier; when the current number of erase blocks is less than the maximum number of erase blocks, add 1 to the current number of erase blocks and modify the state identifier of the test resource to a data erase request identifier.
[0010] Optionally, the above-mentioned first execution module is also used to: when the current number of write pages is equal to the maximum number of write pages, and the current number of write blocks is equal to the maximum number of write blocks, modify the status identifier of the test resource to a read data request identifier, wherein the current number of write pages is the number of pages on which write data operations have been performed in the current write block that matches the current write page, the maximum number of write pages and the maximum number of write blocks are determined according to the physical characteristics of the non-volatile storage module, and the current number of write blocks is the number of blocks on which write data operations have been performed in the test unit; when the current number of write pages is equal to the maximum number of write pages, and the current number of write blocks is less than the maximum number of write blocks, modify the status identifier of the test resource to a write data request identifier, increase the current number of write blocks by 1, and set the current number of write pages to 0; when the current number of write pages is less than the maximum number of write pages, increase the current number of write pages by 1, and modify the status identifier of the test resource to a write data request identifier.
[0011] Optionally, the first execution module is also used to: when the current number of read pages is equal to the maximum number of read pages, the current number of read blocks is equal to the maximum number of read blocks, and the current number of test rounds is less than the target number of test rounds, add 1 to the current number of test rounds, wherein the current number of read pages is the number of pages on which read data operations have been performed in the blocks matching the current read page, the maximum number of read pages and the maximum number of read blocks are determined according to the physical characteristics of the non-volatile storage module, and the current number of read blocks is the number of blocks on which read data operations have been performed in the test unit; when the current number of read pages is equal to the maximum number of read pages, the current number of read blocks is equal to the maximum number of read blocks, and the current number of test rounds reaches the target number of test rounds, modify the status identifier of the test resource to the data erase request identifier; when the current number of read pages is equal to the maximum number of read pages, and the current number of read blocks is less than the maximum number of read blocks, modify the status identifier of the test resource to the read data request identifier, add 1 to the current number of read blocks, and set the current number of pages to 0; when the current number of read pages is less than the maximum number of read pages, add 1 to the current number of read pages, and modify the status identifier of the test resource to the read data request identifier.
[0012] Optionally, the above-mentioned execution unit is also used to: traverse the test resource set, obtain the state identifier and current test round number of each test resource; when the state identifier of each test resource set is a waiting state identifier, and the current test round number corresponding to the test resource is equal to the target test round number, determine that the test is completed, wherein the waiting state identifier is used to indicate that the test resource is in a low-power waiting state.
[0013] Optionally, the above-mentioned execution unit is also used to: perform initialization operations on test resources in the test resource set, wherein the initialization operation is used to set the state identifier of the test resource to a waiting state identifier, wherein the waiting state matching the waiting state identifier is a low power consumption state; perform timed detection of the CPU utilization through a timer, and when the CPU utilization is less than a target threshold, apply for test resources from the test resource set, and create a task processing set based on the applied test resources, wherein the CPU utilization is used to determine the CPU idle state, and the test resources in the task processing set are used to execute the target test operation.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned test method for solid-state hard disk performance testing when running.
[0015] According to another aspect of the embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above test method for testing the performance of a solid-state hard disk.
[0016] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned test method for solid state drive performance testing through the computer program.
[0017] Through the present application, firstly, a set of specification parameters matching the non-volatile storage module on the solid-state hard disk is obtained, wherein the specification parameter set includes a channel number parameter, a core number parameter and a logic unit number parameter, the channel number parameter is used to indicate the number of data channels used for data transmission on the non-volatile storage module, the core number parameter is used to indicate the number of chips for receiving and executing commands, and the logic unit number parameter is used to indicate the number of logic units used to perform logic operations; since in this embodiment, the test unit that performs the target test operation in the non-volatile storage module and the target number of the test unit are determined according to the specification parameter set; then, the state identifier of the test resource is obtained from the test resource set, and the target test operation is performed on the test unit according to the state identifier. During the test execution process, the target test operation is performed on each test unit on the NAND particle, and the idle computing power of each CPU core is fully utilized to achieve the maximum concurrency of reading, writing and erasing of the NAND particle. At the same time, the multi-channel concurrency characteristics of the NAND particle are fully utilized to exert the maximum read, write and erase pressure on the NAND, thereby solving the technical problems of low efficiency and inaccurate testing of the hard disk in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 It is a hardware structure block diagram of a server device of a test method for solid state hard disk performance test in an embodiment of the present application;
[0020] Figure 2 is a flow chart of a method for testing the performance of a solid state drive according to an embodiment of the present application;
[0021] Figure 3is a schematic diagram of a method for testing the performance of a solid state drive according to an embodiment of the present application;
[0022] Figure 4 is a flow chart of another method for testing the performance of a solid state drive according to an embodiment of the present application;
[0023] Figure 5 is a flow chart of another method for testing the performance of a solid state drive according to an embodiment of the present application;
[0024] Figure 6 is a flow chart of another method for testing the performance of a solid state drive according to an embodiment of the present application;
[0025] Figure 7 is a flow chart of another method for testing the performance of a solid state drive according to an embodiment of the present application;
[0026] Figure 8 is a flow chart of another method for testing the performance of a solid state drive according to an embodiment of the present application;
[0027] Fig. 9 is a flow chart of another method for testing the performance of a solid state drive according to an embodiment of the present application;
[0028] Fig.10 is a flow chart of another method for testing the performance of a solid state drive according to an embodiment of the present application;
[0029] Fig.11 is a structural schematic diagram of a testing device for testing the performance of a solid-state hard disk according to an embodiment of the present application;
[0030] Fig.12 It is a structural schematic diagram of a test electronic device for testing the performance of a solid-state hard disk according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0033] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device for testing the performance of a solid state drive according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 The server device includes a processor 102 (only one is shown) (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. The server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0034] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the test method for the solid state hard disk performance test in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0035] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0036] As an optional implementation, Figure 2 As shown, the above-mentioned test method for the solid state drive performance test includes:
[0037] S202, obtaining a specification parameter set matching a non-volatile storage module on the solid state drive, wherein the specification parameter set includes a channel number parameter, a core number parameter, and a logic unit number parameter, the channel number parameter is used to indicate the number of data channels used for data transmission on the non-volatile storage module, the core number parameter is used to indicate the number of chips that receive and execute commands, and the logic unit number parameter is used to indicate the number of logic units used to perform logic operations;
[0038] S204, determining the test unit that performs the target test operation and the target number of the test units in the non-volatile storage module according to the specification parameter set, wherein the target test operation includes at least one of the following: a read data operation, a write data operation, and an erase data operation;
[0039] S206, obtaining a state identifier of a test resource from the test resource set, and determining to perform a target test operation on the test unit according to the state identifier, wherein the number of test resources in the test resource set is equal to the target number of test units.
[0040] In an optional embodiment, it should be noted that, in the above step S202, a set of specification parameters matching the non-volatile storage module on the solid state drive is obtained, wherein the specification parameter set includes a channel number parameter, a core number parameter and a logic unit number parameter, the channel number parameter is used to indicate the number of data channels used for data transmission on the non-volatile storage module, the core number parameter is used to indicate the number of chips that receive and execute commands, and the logic unit number parameter is used to indicate the number of logic units used to perform logic operations.
[0041] As an optional implementation, this solution uses a 4-core CPU and 8channel-2target-21un NAND particle specifications as an example to illustrate the solution. Each core of the 4-core CPU is defined as {core0, core1, core2, core3}, and the total number of cores corenum is 4; the NAND particles operate in units of LUNs, with one resource unit per LUN for task allocation.
[0042] Specifically, in this embodiment, the channel number parameter corresponds to 8channel in the NAND particle specification, the core number parameter corresponds to 2target in the NAND particle specification, and the logic unit number parameter corresponds to 21un in the NAND particle specification.
[0043] In the above step S204, the test units that perform the target test operation and the target number of the test units in the non-volatile storage module are determined according to the specification parameter set, wherein the target test operation includes at least one of the following: read data operation, write data operation, erase data operation.
[0044] It should be noted that NAND operations are performed in units of luns, so the total number of luns must be calculated first to create a test task pool. In the example specification of this solution, the total number of luns is lun_all_num;
[0045] The calculation formula of lun_all_num is: lun_all_num=channel×target×lun=8×2×2=32;
[0046] 32 resources need to be tested for the target. Specifically, each test unit performs a target test on a context. Each lun is used as a unit, and a context is requested for each lun. Through the context, the computing power of each core is maximized. According to the lun_all_num calculated above, a total of 32 context resources are required. The context is a piece of memory resource, which can be requested from the heap space using malloc and released after the test is completed.
[0047] It is understandable that a unique identifier, namely the context key value, needs to be defined for each test resource. The context states include: idle, erase request (erase_req), write request (write_req), read request (read_req), erase return (erase_cpl), write return (read_cpl), and read return (read_cp1).
[0048] The context is saved in the global variable. The test unit for the nand aging test can confirm the nand address to be operated by the corresponding context and whether the operation to be performed is a read operation, an erase operation or a write operation according to the task object resources and the context status. It should be noted that the nand address is called flashAddr, which is composed of channel, target, lun, block, and page information. The address initialization of the Nand operation needs to be arranged according to channel-target-lun. b1ock and page are set to 0 by default. For example, you can refer to Figure 3 Arranged as shown.
[0049] Then, step S206 is executed to obtain a state identifier of a test resource from the test resource set, and determine to perform the target test operation on the test unit according to the state identifier, wherein the number of test resources in the test resource set is equal to the target number of test units.
[0050] In some optional implementations, a global linked list pointer g_test_poll_list is first created, and through the listAddTail operation, which is a linked list operation, each context resource is linked together with a linked list, and added to the linked list from the end of the linked list, so as to manage all applied context resources. After initialization, all lun context resources are included by default, and the context status is set to idle by default, thereby obtaining the above-mentioned resource test set.
[0051] Determine to execute the target test operation on the test unit according to the status identifier. For example, if the status identifier of the resource to be tested obtained from the test resource set is erase_req (write data request identifier), then execute the write data operation and update the status identifier to erase_cpl (write data completion identifier).
[0052] Through the present application, firstly, a set of specification parameters matching the non-volatile storage module on the solid-state hard disk is obtained, wherein the specification parameter set includes a channel number parameter, a core number parameter and a logic unit number parameter, the channel number parameter is used to indicate the number of data channels used for data transmission on the non-volatile storage module, the core number parameter is used to indicate the number of chips receiving and executing commands, and the logic unit number parameter is used to indicate the number of logic units used to perform logic operations; since in this embodiment, the test unit performing the target test operation in the non-volatile storage module and the target number of the test unit are determined according to the specification parameter set; then, the state identifier of the test resource is obtained from the test resource set, and the target test operation is performed on the test unit according to the state identifier. During the test execution process, the target test operation is performed on each test unit on the NAND particle, so that the idle computing power of each CPU core is fully utilized, and the maximum concurrency of reading, writing and erasing of the NAND particle is realized. At the same time, the multi-channel concurrency characteristics of the NAND particle are fully utilized to exert the maximum read, write and erase pressure on the NAND, so as to solve the technical problems of low efficiency and inaccurate testing of the hard disk in the related technology.
[0053] In an optional implementation, determining to perform a target test operation on the test unit according to the state identifier includes:
[0054] S1, when the task processing set is not empty, obtain the test resource from the task processing set, and obtain the state identifier that matches the test resource;
[0055] S2, when the status identifier is a data erase request identifier, performing a data erase operation on the test unit according to the test unit address and the test resource, and changing the status identifier of the test resource to data erase completion, wherein the test unit address is determined according to the specification parameter set;
[0056] S3, when the status flag is a write data request flag, perform a write data operation on the test unit according to the test unit address and the test resource, and modify the status flag of the test resource to write data completion;
[0057] S4, when the status flag is a read data request flag, performing a read data operation on the test unit according to the test unit address and the test resource, and modifying the status flag of the test resource to read data completion.
[0058] Optionally, in this embodiment, S1 is executed first, and when the task processing set is not empty, a test resource is obtained from the task processing set, and a state identifier matching the test resource is obtained.
[0059] It should be noted that it can be managed by creating an empty linked list header of core_test_process_list and adding the context to the g_test_po1l_1ist linked list. Specifically, a context resource is taken from the head of the g_test_poll_list linked list and added to the tail of the test linked list core_test_process_list of this core, and resources are applied to obtain a non-empty task processing set, and then the target test operation is executed according to the status identifier of the test resource in the above task processing set.
[0060] Then, S2-S4 are executed. In step S2, when the status identifier is the erase request identifier, the erase operation is performed on the test unit according to the test unit address and the test resource, and the status identifier of the test resource is changed to erase completion, wherein the test unit address is determined according to the specification parameter set; that is, if the context state is erase_req, the state is changed to erase_cpl, and according to the nand addr information, the nand addr information is as follows: Figure 3 As shown, the nand erase operation is sent to the FCC controller, where FCC stands for flash channel control, a nand flash control module.
[0061] Step S3, when the status identifier is a write data request identifier, perform a write data operation on the test unit according to the test unit address and the test resource, and modify the status identifier of the test resource to write data completion; that is, if the context status is write_req, change the status to write_cpl, and send a nand write page operation to the FCC controller according to the nand addr information.
[0062] Step S4, when the status flag is a read data request flag, a read data operation is performed on the test unit according to the test unit address and the test resource, and the status flag of the test resource is modified to read data completion; that is, if the context state is read_req, the state is changed to read_cpl, and according to the nand addr information, a nand read page operation is sent to the FCC controller. It should also be noted that if it is the initial default state, the context state is idle, the state is changed to erase_cpl, and according to the nand addr information, a nand erase operation is sent to the FCC controller.
[0063] Through the above implementation of the present application, the corresponding target test operation is executed according to the status identifier of the acquired test resource. Without relying on the host FIO tool and resources, the target test of each test unit is realized inside the SSD, and all spaces of all NAND particles are covered. The aging test is more comprehensive and the efficiency of the aging test is improved.
[0064] In an optional implementation, the step of modifying the state flag of the test resource to after data erasure is completed includes:
[0065] S1, when the current number of erased blocks is equal to the maximum number of erased blocks and the current number of test rounds meets the target number of test rounds, the state flag of the test resource is changed to a waiting state flag, wherein the current number of erased blocks is the number of blocks in the test unit that have been erased, the maximum number of erased blocks is determined according to the physical characteristics of the non-volatile storage module, and the waiting state flag is used to indicate that the test resource is in a low-power waiting state;
[0066] S2, when the current number of erased blocks is equal to the maximum number of erased blocks and the current number of test rounds is less than the target number of test rounds, the state identifier of the test resource is changed to a write data request identifier;
[0067] S3: When the current number of erased blocks is less than the maximum number of erased blocks, the current number of erased blocks is increased by 1, and the state flag of the test resource is modified to the data erase request flag.
[0068] As an optional implementation, the above-mentioned current number of test rounds is the corresponding number of rounds recorded for the current test resource to execute the target test operation, and the target number of test rounds is the preset number of rounds required to test the test resource. It should be noted that in solid-state drives (SSDs) and flash memory storage devices, the number of blocks and pages is usually fixed and determined by the manufacturer based on the capacity and performance requirements of the device. In traditional hard disk drives (HDDs), the number of blocks and pages is usually determined by the number of tracks and sectors. For example, the above-mentioned maximum number of erase blocks can be determined by querying the management software or operating system of the device.
[0069] In this application, FCC returns the nand operation completion message. According to the key value Key matching in the FCC return message, the corresponding context is traversed in the core_test_process_list of the current core. If the context state is erase_cp1, it is further determined that if the block number of the current erase is equal to the maximum block number of the lun, and the test round number record in the context is equal to the user-preset round, the state is changed to idle, and the resource release method, namely test_free, is called;
[0070] If the number of blocks currently erased is equal to the maximum number of blocks of the lun, and the number of test rounds recorded in the context is less than the user-preset round, the state is changed to write_req, and the resource release method test_free is called;
[0071] If the current number of erased blocks is less than the maximum number of blocks for the lun, the block in the nand addr in the context is increased by 1, the state is changed to erase_req, and the resource release method test_free is called.
[0072] Through the above implementation mode of the present application, after the data is erased, when the current number of erased blocks is equal to the maximum number of erased blocks and the current number of test rounds meets the target number of test rounds, the state identifier of the test resource is modified to the waiting state identifier; when the current number of erased blocks is equal to the maximum number of erased blocks and the current number of test rounds is less than the target number of test rounds, the state identifier of the test resource is modified to the write data request identifier; when the current number of erased blocks is less than the maximum number of erased blocks, the current number of erased blocks is increased by 1, and the state identifier of the test resource is modified to the erase data request identifier, thereby realizing the testing of complete read, write and erase operations of each test resource, improving the accuracy of the aging test, and automatically completing the modification of the state identifier according to the corresponding state, thereby improving the efficiency of the aging test.
[0073] In an optional implementation manner, modifying the state flag of the test resource to after data writing is completed includes:
[0074] S1, when the current number of write pages is equal to the maximum number of write pages, and the current number of write blocks is equal to the maximum number of write blocks, the state identifier of the test resource is modified to the read data request identifier, wherein the current number of write pages is the number of pages that have been written to the current write block that matches the current write page, the maximum number of write pages and the maximum number of write blocks are determined according to the physical characteristics of the non-volatile storage module, and the current number of write blocks is the number of blocks that have been written to the test unit;
[0075] S2, when the current number of written pages is equal to the maximum number of written pages and the current number of written blocks is less than the maximum number of written blocks, the state flag of the test resource is changed to the write data request flag, the current number of written blocks is increased by 1, and the current number of written pages is set to 0;
[0076] S3, when the current number of written pages is less than the maximum number of written pages, the current number of written pages is increased by 1, and the state identifier of the test resource is modified to a write data request identifier.
[0077] In this application, FCC returns the nand operation completion message. According to the key value Key matching in the FCC return message, the corresponding context is traversed in the core_test_process_list of the current core. If the context state is write_cp1, it is further determined that if the number of pages currently written is equal to the maximum number of pages in a block, and the number of blocks is equal to the maximum number of blocks of the 1un, the state is changed to read_req, and test_free is called;
[0078] If the number of pages currently being written is equal to the maximum number of pages in a block, and the number of blocks is less than the maximum number of blocks in a 1un, the state is changed to write_req, the block in nand addr is increased by 1, the page configuration is 0, and test_free is called;
[0079] If the number of pages currently being written is less than the maximum number of pages in a block, the page in nand addr is increased by 1, the state is changed to write_req, and test_free is called.
[0080] Through the above implementation mode of the present application, when the current number of write pages is equal to the maximum number of write pages, and the current number of write blocks is equal to the maximum number of write blocks, the state identifier of the test resource is modified to the read data request identifier; when the current number of write pages is equal to the maximum number of write pages, and the current number of write blocks is less than the maximum number of write blocks, the state identifier of the test resource is modified to the write data request identifier, and the current number of write blocks is increased by 1, and the current number of write pages is set to 0; when the current number of write pages is less than the maximum number of write pages, the current number of write pages is increased by 1, and the state identifier of the test resource is modified to the write data request identifier, thereby realizing the testing of complete read, write, and erase operations of each test resource, improving the accuracy of the aging test, and automatically completing the modification of the state identifier according to the corresponding state, thereby improving the efficiency of the aging test.
[0081] In an optional implementation, modifying the state flag of the test resource to after the data reading is completed includes:
[0082] S 1, when the current number of read pages is equal to the maximum number of read pages, the current number of read blocks is equal to the maximum number of read blocks, and the current number of test rounds is less than the target number of test rounds, the current number of test rounds is increased by 1, wherein the current number of read pages is the number of pages that have been read in the blocks matching the current read pages, the maximum number of read pages and the maximum number of read blocks are determined according to the physical characteristics of the non-volatile storage module, and the current number of read blocks is the number of blocks that have been read in the test unit;
[0083] S2, when the current number of read pages is equal to the maximum number of read pages, the current number of read blocks is equal to the maximum number of read blocks, and the current number of test rounds reaches the target number of test rounds, the state flag of the test resource is changed to the data erase request flag;
[0084] S3, when the current number of read pages is equal to the maximum number of read pages and the current number of read blocks is less than the maximum number of read blocks, the state identifier of the test resource is changed to the read data request identifier, the current number of read blocks is increased by 1, and the current number of pages is set to 0;
[0085] S4, when the current number of read pages is less than the maximum number of read pages, the current number of read pages is increased by 1, and the state identifier of the test resource is modified to the read data request identifier.
[0086] In this application, FCC returns the nand operation completion message. According to the key value Key matching in the FCC return message, the core_test_process_list of the current core is traversed to find the corresponding context. If the context status is read_cp1, it is further determined that if the number of pages currently read is equal to the maximum number of pages in a block, and the number of blocks is equal to the maximum number of blocks of the lun, the number of test rounds in the context needs to be increased by one to indicate that a round of testing is completed.
[0087] If the number of pages currently read is equal to the maximum number of pages in a block, and the number of blocks is less than the maximum number of blocks in a lun, the state is changed to read_req, the block in nand addr is increased by 1, the page configuration is 0, and test_free is called;
[0088] If the number of pages currently read is less than the maximum number of pages in a block, the page in nand addr is increased by 1, the state is changed to read_req, and test_free is called;
[0089] If the test round record is equal to the user-preset round, the state is changed to erase_req and test_free is called.
[0090] The implementation manner of the present application increases the current test round number by 1 when the current read page number is equal to the maximum read page number, the current read block number is equal to the maximum read block number, and the current test round number is less than the target test round number; when the current read page number is equal to the maximum read page number, the current read block number is equal to the maximum read block number, and the current test round number reaches the target test round number, the state identifier of the test resource is modified to be a data erase request identifier; when the current read page number is equal to the maximum read page number, and the current read block number is less than the maximum read block number, the state identifier of the test resource is modified to be a read data request identifier, and the current read block number is increased by 1, and the current page number is set to 0; when the current read page number is less than the maximum read page number, the current read page number is increased by 1, and the state identifier of the test resource is modified to be a read data request identifier, thereby implementing testing of complete read, write, and erase operations on each test resource, thereby improving the accuracy of the aging test, automatically completing the modification of the state identifier according to the corresponding state, and improving the efficiency of the aging test.
[0091] In an optional implementation, after obtaining a state identifier of a test resource from a test resource set and determining to perform a target test operation on a test unit according to the state identifier, the method includes:
[0092] S 1, traverse the test resource set, obtain the status identifier and current test round number of each test resource;
[0093] S2, when the state identifier of each test resource set is a waiting state identifier and the current test round number corresponding to the test resource is equal to the target test round number, determine that the test is completed, wherein the waiting state identifier is used to indicate that the test resource is in a low power waiting state.
[0094] In the above steps S1-S2, the test resource set is traversed to obtain the state identifier and the current test round number of each test resource; when the state identifier of each test resource set is a waiting state identifier, and the current test round number corresponding to the test resource is equal to the target test round number, the test is determined to be completed, wherein the waiting state identifier is used to indicate that the test resource is in a low-power waiting state. Specifically, g_test_poll_list is traversed to count the state of each context in the resource pool, and if the state is idle and the number of test rounds is equal to the user-preset value round, complete_count++. If complete_count is equal to lun_all_num, that is, each test resource has executed the target test operation of the target test round, it means that all tests are completed, and the main core needs to turn off the core timer and notify other cores to turn off the timer.
[0095] Through the above-mentioned implementation mode of the present application, the test resource set is traversed, the state identifier and the current test round number of each test resource are obtained, and when the state identifier of each test resource set is a waiting state identifier and the current test round number corresponding to the test resource is equal to the target test round number, it is determined that the test is completed, thereby realizing the testing of all spaces of the NAND particles and improving the test efficiency.
[0096] In an optional implementation, obtaining a state identifier of a test resource from a test resource set and determining, according to the state identifier, before executing a target test operation on a test unit includes:
[0097] S1, perform an initialization operation on the test resources in the test resource set, wherein the initialization operation is used to set the state identifier of the test resource to a waiting state identifier, wherein the waiting state matching the waiting state identifier is a low power consumption state; S2, perform a timed detection of the CPU utilization through a timer, and when the CPU utilization is less than a target threshold, apply for test resources from the test resource set, and create a task processing set based on the applied test resources, wherein the CPU utilization is used to determine the CPU idle state, and the test resources in the task processing set are used to execute the target test operation.
[0098] Optionally, in the above step S1, an initialization operation is performed on the test resources in the test resource set, wherein the initialization operation is used to set the state flag of the test resource to a waiting state flag, that is, to set the context state to idle, that is, a low-power waiting state.
[0099] Further in step S2, after the test resources are initialized, a timer is started to detect the CPU utilization within the previous 1 second. It should be noted that the timer is not enabled by default during initialization. When the CPU utilization is greater than or equal to the target threshold, that is, when the CPU is in an idle state, for example, when the CPU utilization is less than 80%, it is determined that the CPU is in an idle state, and then a test resource application operation can be performed, that is, a context resource is taken from the head of the global linked list pointer g_test_pol1_list linked list, and added to the tail of the test linked list core_test_process_list of this core, to create the above-mentioned task processing set.
[0100] It should be noted that when the timer accumulates 1 minute, the test progress needs to be updated, that is, this action is triggered once every minute, traversing the g_test_poll_list linked list and the core_test_process_list linked list of each core, and counting the test round value of each context, recorded as ctx_round_count;
[0101] Specifically, test progress = ctx_round_count / (lun_all_num×round);
[0102] In the above-mentioned implementation mode of the present application, an initialization operation is performed on the test resources in the test resource set, wherein the initialization operation is used to set the state identifier of the test resource to a waiting state identifier, wherein the waiting state matching the waiting state identifier is a low power consumption state; a timer is started to detect the CPU utilization, and when the CPU utilization is not less than the target threshold, test resources are applied for from the test resource set, and a task processing set is created based on the applied test resources, and by determining the idle state of the multi-core processor CPU, the idle computing power of each CPU is fully utilized for aging testing, thereby realizing the read, write and erase operations on the NAND particles with maximum pressure.
[0103] The following is an explanation of this application using a complete test method for solid state drive performance testing.
[0104] Before the test phase, first use the nvme cli tool to set the number of rounds for the aging test, and the SSD will save the round number setting internally;
[0105] Use the nvme cli tool to issue the BIST aging mode initialization command. The SSD disk enters the aging mode and initializes internal resources to prepare for the aging test.
[0106] It should be noted that NAND operations are performed in units of luns, so the total number of luns must be calculated first to create a test task pool. In the example specification of this solution, the total number of luns is lun_all_num;
[0107] For example, a 4-core CPU and 8channel-2target-2lun NAND particle specifications are used to illustrate the solution. For a 4-core CPU, each core is defined as {core0, core 1, core2, core3}, and the total number of cores is defined as core_num. NAND particles are operated in LUN units, with one resource unit per LUN for task allocation, lun_all_num = channel × target × 1un = 8 × 2 × 2 = 32;
[0108] In units of lun, a context is requested for each lun, and the computing power of each core is maximized through the context. According to the lun_all_num calculated above, a total of 32 context resources are required. The context is actually a piece of memory resource, which can be requested from the heap space using malloc and released after the test is completed.
[0109] Specifically, the context content definition includes: context key value, which is the unique identifier of the context resource; the address of Nand operation, called flashAddr, which consists of channel, target, lun, block, and page information. The address initialization of Nand operation needs to be arranged according to ch-target-lun. Block and page are set to 0 by default. You can refer to Fig. 9 The figure only shows the corresponding arrangement of the nand addr and key value of 4channel; context status: idle (idle), erase request (erase_req), write request (write_req), read request (read_req), erase return (erase_cp1), write return (read_cpl), read return (read_cpl); test round number record (initialized default value is 0), used to record and calculate the test progress; linked list header, used for context resource management.
[0110] The context is saved in a global variable. When the nand aging test starts, the nand address to be operated by the corresponding context and whether the operation to be performed is a read operation, an erase operation or a write operation can be confirmed according to the task object resources and the context status. The context content initialization requires the context status to be set to idle by default.
[0111] Then, initialize the test task pool;
[0112] S 1. Create a global linked list pointer g_test_po1l_1ist, and manage all applied context resources through listAddTail operation (a linked list operation that connects each context resource with a linked list and adds it to the linked list from the tail of the linked list). After initialization, it contains all lun context resources by default.
[0113] S2, each CPU core creates a test processing linked list pointer core_test_process_list, which is used as the test task linked list being processed by this core. After initialization, it defaults to an empty linked list.
[0114] Further initialize the CPU core utilization interface. Each CPU core has one variable, which identifies the computing power utilization of the current core and is recorded as CPUUsage. It should be noted that if it is an RTOS system, you can directly use the CPU core utilization interface function that comes with the RTOS system to obtain the utilization of the core; if it is a bare metal system, you need to use other methods to calculate the CPU core utilization. For example, get the total number of core runs in a stage CPU_core_all_count, and then count the number of idle branch runs idle_count, you can get the approximate CPUcore utilization, the calculation formula is as follows:
[0115] CPUUsage=(CPU_core_all_count-idle_count) / CPU_core_all_count;
[0116] In addition, each core enables a 1-second timer to periodically detect the CPU utilization within the previous 1 second. During initialization, the timer is not enabled by default;
[0117] During the test phase, core_0 is the main core. In addition to being responsible for the NAND particle aging test, core_0 also has to process the aging test control commands from the host, control the start of the test, progress update, and progress query functions.
[0118] The following is a complete initialization process:
[0119] S 1, the main core first initializes the CPU core utilization interface, creates timers, initializes contexts, creates an empty linked list header for the core_test_process_list of the core, and adds all contexts to the g_test_poll_list linked list for management. Notify other cores to start initializing their respective CPU utilization interfaces, creating timers, and creating an empty linked list header for the core_test_process_list of the core of other cores.
[0120] S2: When the main core detects that all cores have been initialized, it turns on the timer of its own core and notifies other cores to turn on the timers.
[0121] The following Figure 4 A complete description of the main core initialization process:
[0122] S402, applying for context resources according to the total number of NAND LUNs;
[0123] S404, initializing the context structure;
[0124] 406, context plus linked list g_test_poll_list;
[0125] S408, notify other cores to start initialization;
[0126] S41 0, create a timer;
[0127] S4 1 2, create the core list core_test_process_list;
[0128] Determine S414 whether other cores have been initialized.
[0129] If other cores have completed initialization, execute S416, notify other cores, start the timer, and further execute S418 to start the timer of this core.
[0130] If the initialization of other cores is not completed, continue to loop and wait until the initialization of other cores is completed;
[0131] The following Figure 5 A complete description of the initialization process of other cores:
[0132] S502, creating the core to-be-tested linked list core_test_process_list;
[0133] S504, waiting for notification to start the timer;
[0134] 506, start the timer.
[0135] The following Figure 6 A complete description of the timer processing flow:
[0136] S602: Check whether the CPU utilization of this core is less than 50%.
[0137] If the CPU utilization is less than 50%, execute S604, test_alloc; that is, apply for a context for the cpu core in an idle state to perform an aging test. It should be noted that a context resource is taken from the head of the g_test_poll_list linked list and added to the tail of the test linked list core_test_process_1ist of this core. This step is called test resource application. To apply for test resources, it is necessary to determine whether the number of test rounds in the context is less than the round value preset by the user. This action is encapsulated as a test_alloc interface. The interface encapsulation needs to pay attention to the atomicity of the operation to ensure data security.
[0138] Corresponding to the test resource application, there is also a test resource release process, which takes the context from the core_test_process_1ist of the corresponding core and adds it to the end of the g_test_poll_list linked list. This action is encapsulated as the test_free interface, which needs to pay attention to the atomicity of the operation to ensure data security.
[0139] S606, exit the timer processing without performing the test.
[0140] The following Figure 7 A complete test process is described below:
[0141] Determine S702, is core_test_process_list an empty linked list? If it is not an empty linked list, continue to determine the context state for further processing.
[0142] S704, the context state is idle; S704-1, according to the context information, send the corresponding operation instruction to the FCC, that is, if the context state is idle, change the state to erase_cp1, and send the nanderase operation to the FCC controller according to the nand addr information.
[0143] S706, the context has a status of req type; S706-1, according to the context information, send a corresponding operation instruction to the FCC,
[0144] Specifically, if the context state is erase_req, the state is changed to erase_cpl, and the nand erase operation is sent to the FCC controller according to the nandaddr information; if the context state is write_req, the state is changed to write_cp1, and the nand write page operation is sent to the FCC controller according to the nand addr information; if the context state is read_req, the state is changed to read_cpl, and the nand read page operation is sent to the FCC controller according to the nand addr information.
[0145] S708, there is a return message from FCC; S710, enter the cp1 processing flow.
[0146] Specifically, if FCC returns a nand operation completion message, match the key value Key in the message returned by FCC, traverse the core_test_process_list of the current core to find the corresponding context, and process it according to the corresponding rules.
[0147] The following Figures 8 to 10 Explanation of the above rules:
[0148] like Figure 8 The following is the processing flow when the context state is erase_cpl:
[0149] S802, block++, add 1 to the block in the current nand addr, and judge S804, block>max_block? If block is not greater than max_block, it means that there are still blocks that need to perform the erase data operation, and further execute S804-1, and set the context to erase_req.
[0150] If block is greater than max_block, then S806 is executed to determine whether the number of test rounds is equal to round. If the number of test rounds is equal to round, then S808 is executed to set the context to idle; S812, test_free.
[0151] If the number of test rounds is not equal to round (that is, the number of test rounds does not meet the preset number of rounds), execute S810, set the context to write_req; S812, test_free.
[0152] like Fig. 9 The following is the processing flow when the context state is write_cpl:
[0153] Judge S902, page == max_page, if page is not equal to max_page, it means that there are pages that have not been written, and it is necessary to perform a write data operation on the next page, then execute S902-1, page++; S910, set the context to write_req; S912, test_free.
[0154] If page is equal to max_page, execute S902-2, block++, add 1 to the block in the current nand addr, and judge S904, block>max_block? If block is not greater than max_block, it means that the page in the block after adding 1 needs to be written, that is, execute S908, page=0; S910, set the context to write_req; S912, test_free.
[0155] If block is greater than max_block, it means that all blocks have been written, and S906 is further executed, and the context is set to read_req; S912, test_free.
[0156] like Fig.10 The following is the processing flow when the context state is Tead_cpl:
[0157] Judge S1002, page == max_page? If page is not equal to max_page, it means that there are pages that have not been read, and it is necessary to perform a data read operation on the next page, that is, execute S1004-2, page++; S1010, set the context to read_req; S1012, test_free.
[0158] If page is equal to max_page, execute S1004-1, block++, add 1 to the block in the current nand addr, and judge S1006, block>max_block? If block is not greater than max_block, it means that the page in the block after adding 1 needs to be written, that is, execute S1008, page=0; S1010, set the context to read_req; S1012, test_free.
[0159] If block is greater than max_block, it means that all blocks have been read, and S1006-1 is executed, the number of context test rounds is increased by 1, and S1006-2, the context is set to erease_req, that is, a new round of test operation is entered.
[0160] It should also be noted that the main core timer not only extracts the context from the task pool g_test_poll_list to the main core's pending list core_test_process_1ist, but also needs to determine whether the test is completed. When the timer accumulates 1 minute, the test progress needs to be updated.
[0161] The way to determine whether the test is completed is to traverse g_test_poll_list, count the status of each context in the resource pool, and if the status is idle and the number of test rounds is equal to the user-preset value round, complete_count++. If complete_count is equal to lun_all_num, it means that all tests are completed, the main core needs to turn off the core timer and notify other cores to turn off the timer.
[0162] This action is triggered once every minute, and the g_test_poll_list linked list and the core_test_process_list linked list of each core are traversed to count the test round value of each context, recorded as ctx_round_count, so as to calculate the test progress. For example, the test progress is calculated as follows:
[0163] Test progress = ctx_round_count / (lun_all_num×round);
[0164] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0165] According to another aspect of the embodiment of the present application, a testing device for testing the performance of a solid state drive for implementing the above-mentioned testing method for testing the performance of a solid state drive is also provided. Fig.11 As shown, the device comprises:
[0166] The acquisition unit 1102 acquires a specification parameter set matching the non-volatile storage module on the solid state drive, wherein the specification parameter set includes a channel number parameter, a core number parameter, and a logic unit number parameter. The channel number parameter is used to indicate the number of data channels used for data transmission on the non-volatile storage module, the core number parameter is used to indicate the number of chips that receive and execute commands, and the logic unit number parameter is used to indicate the number of logic units used to perform logic operations.
[0167] A determination unit 1104 determines, according to the specification parameter set, a test unit in the non-volatile storage module that performs a target test operation and a target number of test units, wherein the target test operation includes at least one of the following: a read data operation, a write data operation, and an erase data operation;
[0168] The execution unit 1106 obtains a state identifier of a test resource from the test resource set, and determines to execute a target test operation on the test unit according to the state identifier, wherein the number of test resources in the test resource set is equal to the target number of test units.
[0169] Optionally, the above-mentioned execution unit includes: a first execution module, which is used to obtain test resources from the task processing set when the task processing set is not empty, and obtain a status identifier that matches the test resources; when the status identifier is a data erase request identifier, perform a data erase operation on the test unit according to the test unit address and the test resource, and modify the status identifier of the test resource to data erase completion, wherein the test unit address is determined according to a specification parameter set; when the status identifier is a data write request identifier, perform a data write operation on the test unit according to the test unit address and the test resource, and modify the status identifier of the test resource to data write completion; when the status identifier is a data read request identifier, perform a data read operation on the test unit according to the test unit address and the test resource, and modify the status identifier of the test resource to data read completion.
[0170] Optionally, the above-mentioned first execution module is also used to: when the current number of erase blocks is equal to the maximum number of erase blocks and the current number of test rounds meets the target number of test rounds, modify the state identifier of the test resource to a waiting state identifier, wherein the current number of erase blocks is the number of blocks in the test unit that have been erased, the maximum number of erase blocks is determined according to the physical characteristics of the non-volatile storage module, and the waiting state identifier is used to indicate that the test resource is in a low-power waiting state; when the current number of erase blocks is equal to the maximum number of erase blocks and the current number of test rounds is less than the target number of test rounds, modify the state identifier of the test resource to a write data request identifier; when the current number of erase blocks is less than the maximum number of erase blocks, add 1 to the current number of erase blocks and modify the state identifier of the test resource to a data erase request identifier.
[0171] Optionally, the above-mentioned first execution module is also used to: when the current number of write pages is equal to the maximum number of write pages, and the current number of write blocks is equal to the maximum number of write blocks, modify the status identifier of the test resource to a read data request identifier, wherein the current number of write pages is the number of pages on which write data operations have been performed in the current write block that matches the current write page, the maximum number of write pages and the maximum number of write blocks are determined according to the physical characteristics of the non-volatile storage module, and the current number of write blocks is the number of blocks on which write data operations have been performed in the test unit; when the current number of write pages is equal to the maximum number of write pages, and the current number of write blocks is less than the maximum number of write blocks, modify the status identifier of the test resource to a write data request identifier, increase the current number of write blocks by 1, and set the current number of write pages to 0; when the current number of write pages is less than the maximum number of write pages, increase the current number of write pages by 1, and modify the status identifier of the test resource to a write data request identifier.
[0172] Optionally, the first execution module is also used to: when the current number of read pages is equal to the maximum number of read pages, the current number of read blocks is equal to the maximum number of read blocks, and the current number of test rounds is less than the target number of test rounds, add 1 to the current number of test rounds, wherein the current number of read pages is the number of pages on which read data operations have been performed in the blocks matching the current read page, the maximum number of read pages and the maximum number of read blocks are determined according to the physical characteristics of the non-volatile storage module, and the current number of read blocks is the number of blocks on which read data operations have been performed in the test unit; when the current number of read pages is equal to the maximum number of read pages, the current number of read blocks is equal to the maximum number of read blocks, and the current number of test rounds reaches the target number of test rounds, modify the status identifier of the test resource to the data erase request identifier; when the current number of read pages is equal to the maximum number of read pages, and the current number of read blocks is less than the maximum number of read blocks, modify the status identifier of the test resource to the read data request identifier, add 1 to the current number of read blocks, and set the current number of pages to 0; when the current number of read pages is less than the maximum number of read pages, add 1 to the current number of read pages, and modify the status identifier of the test resource to the read data request identifier.
[0173] Optionally, the above-mentioned execution unit is also used to: traverse the test resource set, obtain the state identifier and current test round number of each test resource; when the state identifier of each test resource set is a waiting state identifier, and the current test round number corresponding to the test resource is equal to the target test round number, determine that the test is completed, wherein the waiting state identifier is used to indicate that the test resource is in a low-power waiting state.
[0174] Optionally, the execution unit is also used to: perform initialization operations on the test resources in the test resource set, wherein the initialization operation is used to set the state identifier of the test resource to a waiting state identifier, wherein the waiting state matching the waiting state identifier is a low power consumption state; perform timed detection of the CPU utilization through a timer, and when the CPU utilization is less than a target threshold, apply for test resources from the test resource set, and create a task processing set based on the applied test resources, wherein the CPU utilization is used to determine the CPU idle state, and the test resources in the task processing set are used to perform the target test operation. According to another aspect of an embodiment of the present application, there is also provided an electronic device for implementing the test method for solid-state hard disk performance testing in the above-mentioned memory, and the electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a mobile phone or a computer as an example. Fig.12 As shown, the electronic device includes a memory 1202 and a processor 1204. The memory 1202 stores a computer program, and the processor 1204 is configured to execute the steps in any of the above method embodiments through the computer program.
[0175] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0176] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0177] S1, obtaining a specification parameter set matching a non-volatile storage module on a solid state drive, wherein the specification parameter set includes a channel number parameter, a core number parameter, and a logic unit number parameter, wherein the channel number parameter is used to indicate the number of data channels used for data transmission on the non-volatile storage module, the core number parameter is used to indicate the number of chips for receiving and executing commands, and the logic unit number parameter is used to indicate the number of logic units used for performing logic operations;
[0178] S2, determining the test unit that performs the target test operation and the target number of the test units in the non-volatile storage module according to the specification parameter set, wherein the target test operation includes at least one of the following: a read data operation, a write data operation, and an erase data operation;
[0179] S3, obtaining a state identifier of a test resource from the test resource set, and determining to perform a target test operation on the test unit according to the state identifier, wherein the number of test resources in the test resource set is equal to the target number of test units.
[0180] Alternatively, a person skilled in the art may understand that: Figure 1The structure shown in 2 is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 1 2 does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 1 2 or more or fewer components (such as network interfaces, etc.), or have the same Fig.12 Different configurations are shown.
[0181] Among them, the memory 1202 can be used to store software programs and modules, such as the program instructions / modules corresponding to the test method and device for solid-state hard disk performance testing in the embodiments of the present application. The processor 1204 executes various functional applications and data processing by running the software programs and modules stored in the memory 1202, that is, to implement the above-mentioned test method for solid-state hard disk performance testing. The memory 1202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1202 may further include a memory remotely arranged relative to the processor 1204, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1202 may be specifically, but not limited to, used to store information such as page elements and page styles. As an example, such as Figure 1 2, the memory 1 202 may include, but is not limited to, the acquisition unit 1102, the determination unit 1104, and the execution unit 1108 in the test device for testing the performance of the solid state drive. In addition, other module units in the test device for testing the performance of the solid state drive may also be included but are not limited to, which will not be described in detail in this example.
[0182] Optionally, the transmission device 1206 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1206 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1206 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0183] In addition, the electronic device further includes: a display 1208 for displaying the target page; and a connection bus 1210 for connecting various module components in the electronic device.
[0184] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. The nodes may form a point-to-point network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the point-to-point network.
[0185] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in the above various optional implementations;
[0186] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0187] S1, obtaining a specification parameter set matching a non-volatile storage module on a solid state drive, wherein the specification parameter set includes a channel number parameter, a core number parameter, and a logic unit number parameter, wherein the channel number parameter is used to indicate the number of data channels used for data transmission on the non-volatile storage module, the core number parameter is used to indicate the number of chips for receiving and executing commands, and the logic unit number parameter is used to indicate the number of logic units used for performing logic operations;
[0188] S2, determining the test unit that performs the target test operation and the target number of the test units in the non-volatile storage module according to the specification parameter set, wherein the target test operation includes at least one of the following: a read data operation, a write data operation, and an erase data operation;
[0189] S3, obtaining a state identifier of a test resource from the test resource set, and determining to perform a target test operation on the test unit according to the state identifier, wherein the number of test resources in the test resource set is equal to the target number of test units.
[0190] Optionally, in the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0191] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0192] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.
[0193] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0194] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0195] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0196] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0197] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
[0198] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0199] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0200] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0201] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0202] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0203] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0204] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0205] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.
[0206] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0207] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0208] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for testing the performance of a solid state drive, characterized in that: include: Obtain a set of specification parameters matching a non-volatile storage module on a solid-state drive, wherein the set of specification parameters includes a channel number parameter, a core number parameter, and a logic unit number parameter, wherein the channel number parameter is used to indicate the number of data channels used for data transmission on the non-volatile storage module, the core number parameter is used to indicate the number of chips that receive and execute commands, and the logic unit number parameter is used to indicate the number of logic units used to perform logic operations; determine the test units that perform target test operations in the non-volatile storage module and the target number of the test units according to the set of specification parameters, wherein the target test operation includes at least one of the following: a read data operation, a write data operation, and an erase data operation; A state identifier of a test resource is obtained from a test resource set, and execution of the target test operation on the test unit is determined according to the state identifier, wherein the number of the test resources in the test resource set is equal to the target number of the test unit.
2. The method according to claim 1, characterized in that The step of determining, according to the state identifier, to perform a target test operation on the test unit comprises: When the task processing set is not empty, obtaining the test resource from the task processing set, and obtaining the state identifier matching the test resource; In the case where the status identifier is a data erase request identifier, performing the data erase operation on the test unit according to the test unit address and the test resource, and modifying the status identifier of the test resource to data erase completion, wherein the test unit address is determined according to the specification parameter set; In the case where the status identifier is a write data request identifier, performing the write data operation on the test unit according to the test unit address and the test resource, and modifying the status identifier of the test resource to write data completion; In the case where the status identifier is a read data request identifier, the read data operation is performed on the test unit according to the test unit address and the test resource, and the status identifier of the test resource is modified to read data completion.
3. The method according to claim 2, characterized in that After the state flag of the test resource is modified to the data erasing completion, the method includes: When the current number of erased blocks is equal to the maximum number of erased blocks and the current number of test rounds meets the target number of test rounds, the state flag of the test resource is modified to a waiting state flag, wherein the current number of erased blocks is the number of blocks in the test unit that have been subjected to the data erase operation, the maximum number of erased blocks is determined according to the physical characteristics of the non-volatile storage module, and the waiting state flag is used to indicate that the test resource is in a low-power waiting state; When the current number of erased blocks is equal to the maximum number of erased blocks and the current number of test rounds is less than the target number of test rounds, modifying the state identifier of the test resource to the write data request identifier; In the case that the current number of erased blocks is less than the maximum number of erased blocks, the current number of erased blocks is increased by 1, and the state identifier of the test resource is modified to the data erase request identifier.
4. The method according to claim 2, characterized in that: After the state flag of the test resource is modified to data writing completion, the method includes: In the case where the current number of write pages is equal to the maximum number of write pages, and the current number of write blocks is equal to the maximum number of write blocks, modifying the state identifier of the test resource to the read data request identifier, wherein the current number of write pages is the number of pages on which the write data operation has been performed in the current write block matching the current write page, the maximum number of write pages and the maximum number of write blocks are determined according to the physical characteristics of the non-volatile storage module, and the current number of write blocks is the number of blocks on which the write data operation has been performed in the test unit; When the current number of written pages is equal to the maximum number of written pages and the current number of written blocks is less than the maximum number of written blocks, modify the state identifier of the test resource to the write data request identifier, add 1 to the current number of written blocks, and set the current number of written pages to 0; In the case that the current number of written pages is less than the maximum number of written pages, the current number of written pages is increased by 1, and the state identifier of the test resource is modified to the write data request identifier.
5. The method according to claim 2, characterized in that: After the state flag of the test resource is modified to read data completed, the method includes: In the case where the current number of read pages is equal to the maximum number of read pages, the current number of read blocks is equal to the maximum number of read blocks, and the current number of test rounds is less than the target number of test rounds, the current number of test rounds is increased by 1, wherein the current number of read pages is the number of pages on which the read data operation has been performed in the blocks matching the current read pages, the maximum number of read pages and the maximum number of read blocks are determined according to the physical characteristics of the non-volatile storage module, and the current number of read blocks is the number of blocks on which the read data operation has been performed in the test unit; When the current number of read pages is equal to the maximum number of read pages, the current number of read blocks is equal to the maximum number of read blocks, and the current number of test rounds reaches the target number of test rounds, modifying the state identifier of the test resource to the data erase request identifier; When the current number of read pages is equal to the maximum number of read pages and the current number of read blocks is less than the maximum number of read blocks, modify the state identifier of the test resource to the read data request identifier, add 1 to the current number of read blocks, and set the current number of pages to 0; When the current number of read pages is less than the maximum number of read pages, the current number of read pages is increased by 1, and the state identifier of the test resource is modified to the read data request identifier.
6. The method according to claim 1, characterized in that The step of acquiring a state identifier of a test resource from a test resource set and determining, according to the state identifier, to perform a target test operation on the test unit comprises: Traversing the test resource set, obtaining the state identifier and current test round number of each test resource; When the state identifier of each of the test resource sets is a waiting state identifier and the current test round number corresponding to the test resource is equal to the target test round number, it is determined that the test is completed, wherein the waiting state identifier is used to indicate that the test resource is in a low-power waiting state.
7. The method according to claim 1, characterized in that The acquiring a state identifier of a test resource from a test resource set and determining, according to the state identifier, before executing the target test operation on the test unit comprises: Performing an initialization operation on the test resource in the test resource set, wherein the initialization operation is used to set the state identifier of the test resource to a waiting state identifier, wherein the waiting state matching the waiting state identifier is a low power consumption state; The CPU utilization is periodically detected by a timer. When the CPU utilization is less than a target threshold, the test resources are applied for from the test resource set, and a task processing set is created based on the applied test resources, wherein the CPU utilization is used to determine the CPU idle state, and the test resources in the task processing set are used to execute the target test operation.
8. A testing device for testing the performance of a solid state drive, characterized in that: include: An acquisition unit is configured to acquire a set of specification parameters matching a non-volatile storage module on a solid state drive, wherein the set of specification parameters includes a channel number parameter, a core number parameter, and a logic unit number parameter, wherein the channel number parameter is used to indicate the number of data channels used for data transmission on the non-volatile storage module, the core number parameter is used to indicate the number of chips that receive and execute commands, and the logic unit number parameter is used to indicate the number of logic units used to perform logic operations; A determination unit, which determines, according to the specification parameter set, a test unit in the non-volatile storage module that performs a target test operation and a target number of the test units, wherein the target test operation includes at least one of the following: a read data operation, a write data operation, and an erase data operation; An execution unit obtains a state identifier of a test resource from a test resource set, and determines to execute the target test operation on the test unit according to the state identifier, wherein the number of the test resources in the test resource set is equal to the target number of the test unit.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Multi-test-channel priority adaptive arbitration method and memory access controller
CN112100097A
Power management based on detected voltage parameter levels in memory subsystem
CN115516556A
Method and device for testing Nand Flash of solid state disk and solid state disk
CN118098326A
Solid state disk performance test method and device, equipment and medium
CN118629484A
Computing architecture
US20240256283A1
Cited By
Resource data processing method and device, storage medium and electronic equipment
CN119847450A