CN115579047A - NVMe event testing method, device and equipment - Google Patents

NVMe event testing method, device and equipment Download PDF

Info

Publication number
CN115579047A
CN115579047A CN202211337904.4A CN202211337904A CN115579047A CN 115579047 A CN115579047 A CN 115579047A CN 202211337904 A CN202211337904 A CN 202211337904A CN 115579047 A CN115579047 A CN 115579047A
Authority
CN
China
Prior art keywords
nvme
hard disk
event
data
nvme hard
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211337904.4A
Other languages
Chinese (zh)
Inventor
邵盟
潘霖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211337904.4A priority Critical patent/CN115579047A/en
Publication of CN115579047A publication Critical patent/CN115579047A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/56External testing equipment for static stores, e.g. automatic test equipment [ATE]; Interfaces therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The embodiment of the application provides a method, a device and equipment for testing NVMe events, wherein the method comprises the following steps: recording Fio performance data during operation in an NVMe hard disk pressure test environment; determining a testing method corresponding to each NVMe event type, and testing all NVMe events according to the corresponding testing method; and analyzing the performance of the NVMe hard disk according to the Fio performance data and the test results of all NVMe events. In the embodiment of the application, a test method is designed for each NVMe event type, the functions of all the NVMe events are tested in a pressure test environment, the performance of the NVMe hard disk is analyzed after the test is finished, and the relevant influence on the NVMe hard disk in the operation process of the NVMe events in the pressure test environment is identified again.

Description

NVMe event testing method, device and equipment
Technical Field
The application relates to the technical field of NVMe hard disk testing, in particular to a method, a device and equipment for testing NVMe events.
Background
NVMe (Non-Volatile Memory Express, nonvolatile Memory standard) is a specification of SSD using PCI-E channel, and the main advantages of NVMe hard disk are lower latency, higher transmission performance, and lower power consumption control. The NVMe event is used to notify the host end system of error reporting status and operating status information (status, error reporting, health information) when a corresponding event occurs. In order for the NVMe controller to accurately feed back the asynchronous events, the host system needs to submit one or more event request commands to the NVMe controller, and the controller assigns an event to the host system by completing the event request command.
The existing NVMe event testing method is generally used for determining whether an event function is normal or not by issuing an instruction according to a single event type, and due to the fact that factors influencing the event function, the event type and influences among disk body background actions are complicated, the single testing method cannot guarantee whether the NVMe event is normal or not in an NVMe hard disk limit pressure scene.
Disclosure of Invention
In view of the above problems, embodiments of the present application provide an NVMe event testing method, apparatus, and device, so as to overcome the above problems or at least partially solve the above problems.
In a first aspect of the embodiments of the present application, a NVMe event testing method is disclosed, the method including:
recording Fio performance data during the operation period of the NVMe hard disk under a pressure test environment;
determining a testing method corresponding to each NVMe event type, and testing all NVMe events according to the corresponding testing method;
and analyzing the performance of the NVMe hard disk according to the Fio performance data and the test results of all NVMe events.
Optionally, the method further comprises:
deploying a test environment of an NVMe hard disk, and dividing the NVMe hard disk into a data verification partition and a Fio pressure test partition;
and issuing working parameters of the NVMe hard disk through Fio so that the NVMe hard disk runs in a pressure test environment.
Optionally, the deploying the test environment of the NVMe hard disk, and dividing the NVMe hard disk into a data verification partition and a Fio pressure test partition includes:
adjusting the capacity of the NVMe hard disk to be a nominal capacity;
carrying out sector setting on the NVMe hard disk with the nominal capacity, and dividing a memory of the NVMe hard disk subjected to the sector setting into a data verification partition and a Fio pressure measurement partition;
and writing data into the data verification partition and generating a verification code for verifying the accuracy of the data after the test is finished.
Optionally, issuing the operating parameters of the NVMe hard disk through the Fio so that the NVMe hard disk operates in a pressure test environment, where the method includes:
and issuing random mixed read-write parameters to the NVMe hard disk through the Fio, wherein the proportion of the read data bandwidth in the random mixed read-write parameters is smaller than that of the write data bandwidth.
Optionally, the determining a test method corresponding to each NVMe event type includes:
establishing a simulation forbidden event for the NVMe event forbidden function, and verifying the simulation forbidden event;
establishing a simulation creation event for the reporting function of the NVMe event, and verifying the simulation creation event;
and clearing the Request function for the NVMe event, creating a simulation clearing Request event, and checking the simulation clearing Request event.
Optionally, the testing all NVMe events according to the corresponding testing method includes:
and traversing all the NVMe events, creating a corresponding simulated NVMe event for each NVMe event, executing the simulated NVMe events, and verifying the functions of the simulated NVMe events.
Optionally, during the NVMe event test, the method further includes:
monitoring various indexes of the system, wherein the indexes at least comprise: CQ monitoring, log monitoring, reserved monitoring, and disk consistency monitoring.
Optionally, analyzing the performance of the NVMe hard disk according to the performance data and the test results of all NVMe events, including:
verifying the data written in the NVMe hard disk in advance to verify whether the test process damages the data written in advance;
according to the log file of the NVMe hard disk, analyzing the consistency of the disk body so as to analyze the influence of the test process on the NVMe hard disk;
performing spec comparative analysis on the Fio performance data to determine whether the operation performance of the NVMe hard disk and the pressure test environment are stable or not;
and analyzing the compatibility of the NVMe hard disk and a host end system through CQ monitoring, reserved monitoring and system logging.
In a second aspect of the embodiments of the present application, an NVMe event testing apparatus is disclosed, the apparatus includes:
the performance recording module is used for recording Fio performance data during the operation period under the NVMe hard disk pressure test environment;
the event testing module is used for determining a testing method corresponding to each NVMe event type and testing all the NVMe events according to the corresponding testing method;
and the performance analysis module is used for analyzing the performance of the NVMe hard disk according to the Fio performance data and the test results of all the NVMe events.
In a third aspect of the embodiments of the present application, an electronic device is disclosed, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the NVMe event testing method as implemented in the first aspect of the present application when executing the computer program.
The embodiment of the application has the following advantages:
in the embodiment of the application, the NVMe hard disk is operated in a pressure test environment, a test method is designed for each NVMe event type, and the functions of all the NVMe events are tested in the pressure test environment according to the test method corresponding to each NVMe event; by testing in a pressure testing environment, the risk that a traditional testing scheme does not cover a scene is overcome, the NVMe event can be normally executed in an NVMe hard disk extreme pressure scene, and the testing is performed by adopting different methods according to the type of the NVMe event, so that the testing accuracy of each NVMe event is ensured; and after the test is finished, analyzing the performance of the NVMe hard disk according to the Fio performance data and the NVMe event test result, and re-identifying the relevant influence on the NVMe hard disk in the NVMe event operation process under the pressure test environment.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart of steps of an NVMe event testing method provided in an embodiment of the present application;
fig. 2 is a flowchart of steps of a NVMe event pressure test environment setting method provided in an embodiment of the present application;
fig. 3 is a schematic application flow diagram of an NVMe event testing method provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an NVMe event testing apparatus provided in an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the embodiments of the present application are described in detail and completely in the following, and it is to be understood that the described embodiments are a part of the embodiments of the present application, but not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
An embodiment of the present application provides an NVMe event testing method, as shown in fig. 1, fig. 1 is a flowchart illustrating steps of the NVMe event testing method provided by the embodiment of the present application, and the method includes the following steps:
step S101: fio performance data were recorded during operation in the NVMe hard disk stress test environment.
In this embodiment, in order to accurately and completely cover a usage scenario of the NVMe hard disk, the NVMe hard disk needs to be operated in a pressure test environment, where the pressure test environment of the NVMe hard disk refers to reading and writing of Fio high-pressure data on the NVMe hard disk, and in a reading and writing process of the Fio high-pressure data, fio performance data is recorded, and the Fio performance data can reflect an operation characteristic of the NVMe hard disk. After the event test is finished, the Fio performance data of the NVMe hard disk running in the pressure test environment is compared with the spec value of the NVMe hard disk, whether the Fio performance data is always larger than the spec value of the NVMe hard disk is observed, if the Fio performance data is not larger than the spec value, the Fio large pressure data read-write design of the NVMe hard disk is unreasonable, namely, the pressure test environment for testing the NVMe event does not accord with the test standard. In addition, whether the performance of the NVMe hard disk is stable or not is observed during the operation of the NVMe hard disk under the pressure test environment by analyzing the stability of Fio performance data. Among them, fio (flexible I/O tester) is an auxiliary tool for testing the storage performance of hardware, has flexibility and reliability, and can perform multithreading/process I/O load simulation according to the I/O type specified by the user.
It should be noted that the NVMe event test is performed based on a host end system, that is, a command or a working parameter is sent to the NVMe hard disk by the host end system, so that the NVMe hard disk operates in a pressure test environment, and various indexes in the test process are checked by the host end system, wherein the host end system refers to a computer, a server, and the like.
In an alternative embodiment, before the NVMe hard disk is operated in the stress test environment, the method further includes the following steps:
step S201: the method comprises the steps of deploying a test environment of the NVMe hard disk, and dividing the NVMe hard disk into a data verification partition and a Fio pressure test partition.
In this embodiment, in order to enable the NVMe hard disk to operate in a pressure test environment and accurately cover various application scenarios of actual use of the NVMe hard disk, most of the memory space of the NVMe hard disk needs to be used for data pressurization, that is, for reading and writing of Fio high-pressure data, so that the actual use condition of the NVMe hard disk can be reflected more accurately. However, all memories cannot be used for reading and writing the Fio high-pressure data, because the data must be verified in the test process, otherwise, whether the data pre-stored in the NVMe hard disk is damaged or not in the process of reading and writing the Fio high-pressure data cannot be guaranteed, and then a small part of memories are further used for data verification. Therefore, the memory space of the NVMe hard disk is divided into two partitions, namely a data verification partition and a Fio pressure measurement partition, wherein the data verification partition is used for data verification, and the Fio pressure measurement partition is used for data pressurization, namely, fio high-pressure data reading and writing.
Specifically, 10% of the memory space of the NVMe hard disk can be divided into data check partitions for checking data, that is, before NVMe event testing is performed, data is written into the data check partitions, the size and the form of the written data are recorded, and after the testing is completed, checking is performed based on the data in the data check partitions to analyze whether the data are damaged. 90% of the memory space of the NVMe hard disk is divided into the Fio pressure measurement partition, and in the NVMe event test process, the Fio pressure measurement partition is used for reading and writing Fio high-pressure data, so that the NVMe hard disk runs in a pressure test environment, the test environment can cover various practical application scenes of the NVMe hard disk, the test result is more consistent with the practical application scenes, and the test result is more accurate.
In the embodiment, the NVMe hard disk is subjected to partition processing, most of the memory space is used for reading and writing Fio high-pressure data, and compared with the conventional NVMe hard disk, the memory space for reading and writing data is not more than 50%, so that a worse application environment is created, various practical application scenes of the NVMe hard disk can be accurately covered by the pressure testing environment in the embodiment, and the accuracy of the testing result is ensured.
In an optional embodiment, deploying a test environment of an NVMe hard disk, and dividing the NVMe hard disk into a data check partition and a Fio pressure test partition includes:
adjusting the capacity of the NVMe hard disk to be a nominal capacity;
carrying out sector setting on the NVMe hard disk with the nominal capacity, and dividing a memory of the NVMe hard disk subjected to the sector setting into a data verification partition and a Fio pressure measurement partition;
and writing data into the data verification partition and generating a verification code for verifying the accuracy of the data after the test is finished.
In this embodiment, the memory space of the NVMe hard disk can be adjusted, and the memory space of the NVMe hard disk is not a nominal capacity when the NVMe hard disk is used for the first time, for example, the maximum memory of the NVMe hard disk is 8T, and the actual used nominal capacity of the NVMe hard disk is 7.68T, a part of space needs to be reserved to store and operate the internal mechanism data of the hard disk, and in addition, the space for storing data of the NVMe hard disk needs to be a nominal space, that is, the storage space needs to be aligned by 4k, otherwise, the problems of performance drop, performance degradation and the like may occur, and performance may be lowered for some data blocks. Therefore, before testing the NVMe events of the NVMe hard disks, the capacity of the NVMe hard disks needs to be adjusted, and the memory space of the NVMe hard disks needs to be adjusted to a nominal capacity. And setting sectors of the NVMe hard disk after the capacity adjustment is completed, wherein the sector setting can be 512B sector setting or 4kB sector setting, and the storage position of each data in the NVMe hard disk can be known only after the sector setting is completed. And then dividing the memory of the NVMe hard disk with nominal memory capacity and set by the sector into two partitions, namely a data verification partition and a Fio pressure test partition, wherein the data verification partition is used for data verification to verify the influence of the test process on data stored in the NVMe hard disk, and the Fio pressure test partition is used for reading and writing Fio high-pressure data so that the NVMe hard disk operates in a pressure test environment.
Further, writing data and generating a check code in the data check partition specifically includes: and converting the format of the data verification partition into an EXT4 file system, writing data in the data verification partition through Fio, and performing Md5 verification to generate an Md5 verification code. After the subsequent test of all the NVMe events of the NVMe hard disk is finished, performing Md5 verification on the data in the data verification partition to generate a new Md5 verification code, wherein if the generated new Md5 verification code is consistent with the previous Md5 verification code, it is indicated that the pre-written data is not tampered in the test process of the NVMe events, and the data in the NVMe hard disk cannot be damaged in the test process.
Step S202: and issuing working parameters of the NVMe hard disk through Fio so that the NVMe hard disk runs in a pressure test environment.
In this embodiment, before testing the NVMe event of the NVMe hard disk, the host system issues the working parameters of the NVMe hard disk by using the Fio, where the working parameters refer to working parameters for operating the NVMe hard disk in a pressure test environment, that is, relevant parameters for performing Fio high-pressure data reading and writing in the Fio pressure test partition of the NVMe hard disk. Specifically, the operating parameters include at least: the type of data reading and writing, the data reading and writing bandwidth ratio, the number of running threads and other parameters. After the host end system issues the working parameters of the NVMe hard disk through Fio, the NVMe hard disk reads and writes Fio high-pressure data according to the parameters, and then the NVMe hard disk runs in a pressure test environment.
In this embodiment, by deploying the environment of the NVMe hard disk and issuing the working parameters to the NVMe hard disk deployed through the environment, the accuracy of NVMe event testing in the subsequent steps is ensured, and then the test result more conforming to the actual application scenario and the more accurate performance analysis result of the NVMe hard disk are obtained.
In an optional embodiment, the issuing, by Fio, the operating parameters of the NVMe hard disk so that the NVMe hard disk operates in a stress test environment includes:
and issuing random mixed read-write parameters to the NVMe hard disk through Fio, wherein the data read bandwidth ratio in the random mixed read-write parameters is smaller than the data write bandwidth ratio.
In this embodiment, the host end system issues the random mixed read-write parameters to the NVMe hard disk through the Fio, and the random mixed read-write parameters are really that the read-write sequence of the data is random, so that the pressure for reading and writing the random mixed data is higher compared with the pressure for reading and writing the sequential data, and the high-pressure test environment of the NVMe hard disk is further satisfied. Specifically, the host system utilizes Fio issued 4k 8jobs QD64 random mixed read-write parameters, wherein 4k refers to the number of bit banks, that is, the data read-write needs to meet the alignment requirement of 4k, 8jobs indicates that 8 threads are opened simultaneously, and QD64 indicates that 64 queue depths are reached. The NVMe hard disk performs random mixed data reading and writing according to working parameters of 4k 8jobs QD64 issued by Fio, and further the NVMe hard disk operates in a pressure test environment.
In addition, in an actual application scenario, data reading operation of the NVMe hard disk is often more than data writing operation, but from the viewpoint of data reliability, the importance of data writing of the NVMe hard disk is stronger, so when testing an NVMe event, the data writing function of the NVMe hard disk is more emphasized, and therefore, the proportion of the read data bandwidth in the random mixed read-write parameters is smaller than that of the write data bandwidth, specifically, 30% of the bandwidth can be used for data reading, and 70% of the bandwidth can be used for data writing. And then guaranteed that the real use scene of NVMe hard disk can be covered to the maximum extent to NVMe hard disk pressure test environment, guaranteed under pressure test environment that NVMe incident test's accuracy.
Step S102: and determining a testing method corresponding to each NVMe event type, and testing all NVMe events according to the corresponding testing method.
The NVMe event is an event specified by NVMe, is used for notifying a host system of error reporting state and running condition information when a corresponding event occurs in the using process of an NVMe hard disk, and specifies various different types of events. For example, error Events (Error Events), SMART/Health Events (SMART/Health Events), notify Events (Notice Events), I/O Command Set Specification (NVMe Command Set) Events (I/O Command Set) Events, reservation Log Page available Events (Reservation Log Page available Events), vendor Specific Events (Vendor Specific Events). The generation modes and functions of all NVMe events are different, so that the test methods of different event types are different, but the existing test method of the NVMe events is used for testing a single NVMe event type and is not suitable for testing all the NVMe event types, and because factors influencing the functions of the NVMe events, the NVMe event types and the influence among disk body background actions are complicated, the single test method cannot ensure whether the NVMe events are normal in a hard disk extreme pressure scene.
In this embodiment, the NVMe event types may be divided into multiple types, a test method corresponding to each event type is designed for each different type of NVMe event, that is, each event type corresponds to one test method, an NVMe hard disk is operated in a pressure test environment, a corresponding test method is selected according to the type corresponding to the actual NVMe event, and the NVMe event is tested based on the test method. And the accuracy of each NVMe event test is further ensured.
Further, in the NVMe event testing process, various indexes of the system are monitored, where the various indexes at least include: CQ monitoring, log monitoring, reserved monitoring, and disk consistency monitoring.
In this embodiment, the CQ monitoring refers to monitoring of a host end system, and monitoring a command issued by the host end, that is, interactive monitoring of a data transmission process. The Log monitoring refers to monitoring logs of the NVMe hard disk and logs of a host system in a test process, wherein Smart Log, smart Log-add and Every-Log are mainly checked for monitoring the logs of the NVMe hard disk, and whether each register in the NVMe hard disk is abnormal is monitored through the three Log files; the method mainly comprises the steps of checking Messages for log monitoring of the host end system, and judging whether the host end system has error report or not by checking a log file; the Reserved monitoring is to monitor the information fed back to the host end by the NVMe hard disk; the disk body consistency monitoring refers to monitoring parameters of the NVMe hard disk, and whether the NVMe hard disk is tested in a high-pressure test environment or not is analyzed to influence the parameters of the NVMe hard disk. Monitoring various indexes of the system in the test process, recording monitoring data, and analyzing the performance of the NVMe hard disk according to the recorded monitoring data after the test is finished.
In an optional embodiment, the determining a test method corresponding to each NVMe event type includes:
establishing a simulation forbidden event for the forbidden function of the NVMe event, and checking the simulation forbidden event;
establishing a simulation creation event for the reporting function of the NVMe event, and verifying the simulation creation event;
and creating a simulation clearing Request event for the clearing Request function of the NVMe event, and checking the simulation clearing Request event.
In this embodiment, when testing the NVMe events, the test functions of each NVMe event are divided into three types, that is, the disable function of the NVMe event, the report function of the NVMe event, and the clear Request function of the NVMe event, and a corresponding simulation event is created for each different test function, and the simulation event is verified. Specifically, the disable function of the NVMe event means that for an event, the NVMe hard disk may choose not to report the event to the host system side, for example, for event a, the NVMe hard disk may choose to report event a or choose not to report event a; during testing, a corresponding analog disable event needs to be created first, and then the analog disable event is checked to verify whether the disable event is functional, for example, when the event a is selected not to be reported, whether the event a is really not reported is checked, and when the event a is selected to be reported, whether the event can be accurately reported is checked.
The reporting function of the NVMe event means that when an exception occurs, exception information needs to be reported, but under the condition of normal test, the exception problem cannot be encountered, so that an exception message needs to be created first, and then the created exception message is reported by the NVMe hard disk; during testing, a corresponding simulation creation event (creation of abnormal message) is created, then the simulation creation event is verified, the reporting condition of specific abnormal messages is verified, whether the reported abnormal messages are correct or not is verified, namely whether the reported abnormal messages are consistent with the created abnormal messages or not is checked, and if the reported abnormal messages are consistent with the created abnormal messages, the NVMe hard disk can accurately report the events. For example, an event a is created (indicating that an exception occurs), at this time, the NVMe hard disk needs to report the event a, and then it is checked whether the NVMe hard disk can report the event a normally, that is, whether the created event a is consistent with the event a reported by the NVMe hard disk is checked, and if so, it is indicated that the NVMe hard disk can report the event a accurately.
The Request clearing function of the NVMe event means that after the abnormal information is reported, the NVMe hard disk has the function of clearing the abnormal information; and during testing, a corresponding simulation clearing Request event is established, and the simulation clearing Request event is verified, namely whether the reported log recording function is complete after the abnormal message is cleared is verified, and whether the report can be continued or not is checked. For example, for a reported event a, the NVMe hard disk clears the event a after reporting so that the NVMe hard disk can continue to work, and the reported event a can be checked in the log record subsequently.
In addition, when the events are checked, whether the functions of the events are normal or not can be determined by checking the Reserved monitoring, the CQ monitoring and the log files of the NVMe hard disk, namely whether the forbidden function of the NVMe event can be tested to report or not report the NVMe event according to the selection of the NVMe hard disk; whether the reporting function of the NVMe event can accurately report the NVMe event or not; whether the clearing Request function of the NVMe event can clear the abnormal information and whether the reported log recording function is complete or not.
In an optional embodiment, testing all NVMe events according to the corresponding testing method includes:
and traversing all the NVMe events, creating a corresponding simulated NVMe event for each NVMe event, executing the simulated NVMe events, and verifying the functions of the simulated NVMe events.
In this embodiment, the simulated NVMe events refer to simulated events which are created according to actual NVMe events and have the same function, and when a test is performed, a corresponding simulated NVMe event is created for each NVMe event, the simulated NVMe events are executed, and the function of the simulated NVMe events is verified. For example, for an event B, it is checked whether the event B can be reported or not according to the selection of the NVMe hard disk; and finally, after the event B is reported, the NVMe hard disk clears the reported event B so that the NVMe hard disk can continue to work. Based on the above method, each NVMe event is tested in turn until all NVMe events are tested.
S103: and analyzing the performance of the NVMe hard disk according to the Fio performance data and the test results of all NVMe events.
In this embodiment, the performance of the NVMe hard disk is analyzed after the test is finished, the Fio performance data refers to the Fio performance data of the NVMe hard disk running in a high-pressure test environment, and the Fio performance data can reflect the running characteristics of the NVMe hard disk. The test results of all the NVMe events refer to all the NVMe event test conditions and various index monitoring data in the test process.
Specifically, analyzing the performance of the NVMe hard disk includes: data verification, disc body consistency analysis, reserved monitoring analysis and CQ monitoring analysis of the NVMe hard disc, and further determining whether functions of various NVMe events of the NVMe hard disc are normal or not and whether the performance of the NVMe hard disc is stable or not, and identifying relevant influences on the disc body in the event operation process under high pressure.
In an optional embodiment, analyzing the performance of the NVMe hard disk according to the Fio performance data and the test results of all NVMe events includes:
verifying the data written in the NVMe hard disk in advance to verify whether the test process damages the data written in advance;
according to the log file of the NVMe hard disk, analyzing the consistency of the disk body so as to analyze the influence of the test process on the NVMe hard disk;
performing spec comparative analysis on the Fio performance data to determine whether the operation performance of the NVMe hard disk and the pressure test environment are stable or not;
and analyzing the compatibility of the NVMe hard disk and a host end system through CQ monitoring, reserved monitoring and system logs.
In this embodiment, verification is performed according to data written in a data verification partition in advance, specifically, verification is performed on the data process Md5 in the data verification partition, an Md5 check code is generated, the Md5 check code is compared with the Md5 check code stored in the data verification partition in advance, and if the two check codes are consistent, it is indicated that the NVMe hard disk is tested in a high-pressure test environment, and data is not damaged. The reasonability of test design is further demonstrated, the NVMe hard disk has good performance, and data are not influenced in a high-pressure operating environment.
The consistency analysis of the disk body means whether the NVMe hard disk is abnormal or not, namely, whether the size of the data block normally issued is the same as that of the received data block or not is verified, and whether all levels of monitoring parameters of the NVMe hard disk are abnormal or not is verified. The log file of the NVMe hard disk records various parameter changes of the NVMe hard disk in a high-pressure test environment, and by comparing the parameter change conditions of the NVMe hard disk in the log file before the test and after the test is finished, if the parameters before and after the test are consistent, the test process cannot influence the performance parameters of the NVMe hard disk, namely the test is a nondestructive test. Therefore, whether the test scheme is reasonable or not is further verified.
The Fio performance data can reflect the operation characteristics of the NVMe hard disk, the Fio performance data is compared with the spec value of the NVMe hard disk, whether the Fio performance data of the NVMe hard disk in the high-pressure test environment is always larger than the spec value of the NVMe hard disk is observed, if the Fio performance data is not larger than the spec value, the reading and writing design of the Fio high-pressure data of the NVMe hard disk is unreasonable, namely, the pressure test environment for the NVMe event test does not accord with the standard. And analyzing whether the Fio performance data are stable data, and if the Fio performance data are stable data, indicating the performance of the NVMe hard disk, wherein the stable data indicate that the fluctuation of the Fio performance data of the NVMe hard disk running in a high-pressure test environment is within a preset range, and if the fluctuation value is larger than the preset range, indicating that the performance data are unstable. Specifically, the performance data is drawn into a curve graph, the change condition of the performance data along with the running time is observed, and when the change range of the performance data is within a preset range, the stable performance of the NVMe hard disk is indicated.
And monitoring the fed-back numerical value, the CQ monitored numerical value and the system date through Reservel, comparing whether the information sent to the host end system by the NVMe hard disk is consistent with the information received by the host end system or not, if the information sent to the host end system by the NVMe hard disk is consistent with the information received by the host end system, indicating that the compatibility of the NVMe hard disk and the host end system is good, and otherwise, indicating that the compatibility of the NVMe hard disk and the host end system is poor. For example, for data a, the NVMe hard disk sends data a to the host system, but if the data received by the host system is B, it indicates that the data sent by the NVMe hard disk is inconsistent with the data received by the host system, and thus the compatibility between the NVMe hard disk and the host system is poor.
Fig. 3 shows an application flow diagram of the NVMe event testing method provided by the embodiment of the present application, and as shown in fig. 3, the test application system includes: the device comprises five parts, namely an NVMe environment deployment module, a pressure test module, an event test module, an analysis module and a monitoring module. In an actual test process, an NVMe environment deployment module deploys an NVMe hard disk test environment first, specifically, standardized OP (over provisioning) processing is performed on an NVMe hard disk to be tested, that is, a memory space of the NVMe hard disk is adjusted to a nominal capacity, and a sector setting is performed on the NVMe hard disk, wherein the sector setting adopts 512 sector setting or 4kB sector setting, then 10% of a memory of the NVMe hard disk is divided into data verification partitions, the data verification partitions are recorded as NVMe1N1, then the data verification partitions are formatted into an ext4 file system, data is written in the NVMe1N1 partitions through a file tool, and Md5 check codes are generated for data verification after the test is finished, and finally, the remaining 90% of the memory is used as a Fio pressure test partition for Fio high-pressure data reading and writing in an NVMe event test process.
After the NVMe hard disk is deployed in a test environment, a pressure measurement module reads and writes Fio high-pressure data in a Fio pressure measurement partition in the NVMe hard disk, namely a host system sends out 4k 8jobs QD64 random mixed read-write parameters through Fio, uses 30% of bandwidth for data reading and writes 70% of bandwidth for data writing, and the NVMe hard disk reads and writes the random mixed data according to the sent working parameters of 4k 8jobs QD64, so that the NVMe hard disk operates in the pressure test environment, records Fio performance data during the operation of the pressure test environment, and the Fio performance data can reflect the operation characteristics of the NVMe hard disk.
When the NVMe hard disk runs in a pressure test environment, the event test module starts to test the NVMe events, specifically, all events specified by the NVMe are traversed, and the test is performed according to a corresponding test method. For each NVMe event, the following steps are performed: simulating a forbidden event, simulating a created event, simulating a clear Request, checking the forbidden event, checking the created event, and checking the clear Request.
In the event test process, the monitoring module monitors indexes such as CQ monitoring, log monitoring, reserved monitoring, disc consistency monitoring and Fio performance data, after all NVMe event tests are finished, the analysis module conducts Md5 data verification, disc consistency analysis, reserved monitoring analysis and CQ monitoring analysis on the NVMe hard disc, and then whether functions of various NVMe events of the NVMe hard disc are normal or not and whether the performance of the NVMe hard disc is stable or not are determined, and relevant influences on the NVMe hard disc in the operation process of the NVMe event under large pressure are identified.
In this embodiment, the NVMe hard disk is operated in a pressure test environment, a test method is designed for each NVMe event type, and the functions of all NVMe events are tested in the pressure test environment according to the test method corresponding to each NVMe event; by testing in a pressure testing environment, the risk that a traditional testing scheme does not cover a scene is overcome, and different methods are adopted for testing according to the type of the NVMe event, so that the testing accuracy of each NVMe event is ensured; after the test is finished, the performance of the NVMe hard disk is analyzed according to the Fio performance data and the NVMe event test result, and the relevant influence on the disk body in the NVMe event operation process under the pressure test environment is identified again.
An embodiment of the present application further provides an NVMe event testing apparatus, referring to fig. 4, fig. 4 is a schematic structural diagram of the NVMe event testing apparatus provided in the embodiment of the present application, and as shown in fig. 4, the apparatus includes:
the performance recording module 41 is used for recording Fio performance data during the operation period under the NVMe hard disk pressure test environment;
the event testing module 42 is configured to determine a testing method corresponding to each NVMe event type, and test all NVMe events according to the corresponding testing method;
and a performance analysis module 43, configured to analyze the performance of the NVMe hard disk according to the Fio performance data and the test results of all NVMe events.
In an alternative embodiment, the apparatus further comprises:
the environment deployment module is used for deploying the test environment of the NVMe hard disk and dividing the NVMe hard disk into a data verification partition and a Fio pressure test partition;
and the pressure loading module is used for issuing working parameters of the NVMe hard disk through Fio so as to enable the NVMe hard disk to operate in a pressure test environment.
In an alternative embodiment, the environment deployment module includes:
the capacity adjusting module is used for adjusting the capacity of the NVMe hard disk into a nominal capacity;
the partition setting module is used for carrying out sector setting on the NVMe hard disk with the nominal capacity and dividing a memory of the NVMe hard disk subjected to the sector setting into a data verification partition and a Fio pressure measurement partition;
and the data writing module is used for writing data into the data verification partition and generating a verification code so as to verify the accuracy of the data after the test is finished.
In an alternative embodiment, the pressure loading module includes:
and the parameter issuing module is used for issuing random mixed read-write parameters to the NVMe hard disk through Fio, wherein the data reading bandwidth ratio in the random mixed read-write parameters is smaller than the data writing bandwidth ratio.
In an alternative embodiment, the event testing module includes:
the disabling event module is used for establishing a simulation disabling event for the disabling function of the NVMe event and verifying the simulation disabling event;
the creation event module is used for creating a simulation creation event for the reporting function of the NVMe event and verifying the simulation creation event;
and the clearing event module is used for establishing a simulation clearing Request event for the clearing Request function of the NVMe event, and verifying the simulation clearing Request event.
In an optional embodiment, the event testing module further includes:
the event execution module is used for traversing all the NVMe events, creating a corresponding simulated NVMe event for each NVMe event, executing the simulated NVMe events, and verifying the functions of the simulated NVMe events.
In an optional embodiment, the event testing module further includes:
a data monitoring module, configured to monitor various indexes of the NVMe hard disk, where the various indexes at least include: CQ monitoring, log monitoring, reserved monitoring, and disk consistency monitoring.
In an alternative embodiment, the performance analysis module includes:
the data verification module is used for verifying the data written in the NVMe hard disk in advance so as to verify whether the test process damages the data written in advance;
the disc body analysis module is used for analyzing the consistency of the disc body according to the log file of the NVMe hard disc so as to analyze the influence of the test process on the NVMe hard disc;
the performance comparison module is used for performing spec comparison analysis on the performance data of the NVMe hard disk so as to determine the running performance of the NVMe hard disk and whether the pressure test environment is stable;
and the compatibility analysis module is used for analyzing the compatibility of the NVMe hard disk and a host end system through CQ monitoring, reserved monitoring and system logs.
The embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the computer program, the NVMe event testing method according to the embodiment of the present application is implemented.
The embodiments in the present specification are all described in a progressive manner, and each embodiment focuses on differences from other embodiments, and portions that are the same and similar between the embodiments may be referred to each other.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, electronic devices and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrases "comprising one of \ 8230; \8230;" does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
The NVMe event testing method, device and equipment provided by the application are introduced in detail, specific examples are applied in the description to explain the principle and the implementation manner of the application, and the description of the above embodiments is only used to help understand the method and the core idea of the application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An NVMe event testing method, the method comprising:
recording Fio performance data during operation in an NVMe hard disk pressure test environment;
determining a test method corresponding to each NVMe event type, and testing all NVMe events according to the corresponding test method;
and analyzing the performance of the NVMe hard disk according to the Fio performance data and the test results of all NVMe events.
2. The method of claim 1, further comprising:
deploying a test environment of an NVMe hard disk, and dividing the NVMe hard disk into a data verification partition and a Fio pressure test partition;
and issuing working parameters of the NVMe hard disk through Fio so that the NVMe hard disk runs in a pressure test environment.
3. The method according to claim 2, wherein the deploying the test environment of the NVMe hard disk, and dividing the NVMe hard disk into a data check partition and a Fio pressure test partition, comprises:
adjusting the capacity of the NVMe hard disk to be a nominal capacity;
carrying out sector setting on the NVMe hard disk with the nominal capacity, and dividing a memory of the NVMe hard disk subjected to the sector setting into a data verification partition and a Fio pressure measurement partition;
and writing data into the data verification partition and generating a verification code for verifying the accuracy of the data after the test is finished.
4. The method according to claim 2, wherein issuing the operating parameters of the NVMe hard disk through the Fio to operate the NVMe hard disk in the stress test environment comprises:
and issuing random mixed read-write parameters to the NVMe hard disk through Fio, wherein the data read bandwidth ratio in the random mixed read-write parameters is smaller than the data write bandwidth ratio.
5. The method according to claim 1, wherein the determining a test method corresponding to each NVMe event type comprises:
establishing a simulation forbidden event for the forbidden function of the NVMe event, and checking the simulation forbidden event;
establishing a simulation creation event for the reporting function of the NVMe event, and verifying the simulation creation event;
and creating a simulation clearing Request event for the clearing Request function of the NVMe event, and checking the simulation clearing Request event.
6. The method of claim 1, wherein the testing all NVMe events according to the corresponding testing method comprises:
and traversing all the NVMe events, creating a corresponding simulated NVMe event for each NVMe event, executing the simulated NVMe events, and verifying the functions of the simulated NVMe events.
7. The method of claim 1, during the NVMe event testing, further comprising:
monitoring various indexes of the system, wherein the indexes at least comprise: CQ monitoring, log monitoring, reserved monitoring, and disk consistency monitoring.
8. The method according to claim 1, wherein analyzing the NVMe hard disk performance according to the performance data and the test results of all NVMe events comprises:
verifying the data written in the NVMe hard disk in advance to verify whether the test process damages the data written in advance;
according to the log file of the NVMe hard disk, analyzing the consistency of the disk body so as to analyze the influence of the test process on the NVMe hard disk;
performing spec comparative analysis on the Fio performance data to determine whether the operation performance of the NVMe hard disk and the pressure test environment are stable or not;
and analyzing the compatibility of the NVMe hard disk and a host end system through CQ monitoring, reserved monitoring and system logs.
9. An NVMe event testing apparatus, the apparatus comprising:
the performance recording module is used for recording Fio performance data during the operation period under the NVMe hard disk pressure test environment;
the event testing module is used for determining a testing method corresponding to each NVMe event type and testing all NVMe events according to the corresponding testing method;
and the performance analysis module is used for analyzing the performance of the NVMe hard disk according to the Fio performance data and the test results of all the NVMe events.
10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor, when executed, implements the NVMe event testing method of any of claims 1-8.
CN202211337904.4A 2022-10-28 2022-10-28 NVMe event testing method, device and equipment Pending CN115579047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211337904.4A CN115579047A (en) 2022-10-28 2022-10-28 NVMe event testing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211337904.4A CN115579047A (en) 2022-10-28 2022-10-28 NVMe event testing method, device and equipment

Publications (1)

Publication Number Publication Date
CN115579047A true CN115579047A (en) 2023-01-06

Family

ID=84587513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211337904.4A Pending CN115579047A (en) 2022-10-28 2022-10-28 NVMe event testing method, device and equipment

Country Status (1)

Country Link
CN (1) CN115579047A (en)

Similar Documents

Publication Publication Date Title
TWI410976B (en) Reliability test method for solid storage medium
CN102568522B (en) The method of testing of hard disk performance and device
CN105573676B (en) A kind of method of verify data consistency in storage system
CN109918022B (en) SSD open card bad block table inheritance method
CN113778822B (en) Error correction capability test method and device, readable storage medium and electronic equipment
CN110618892A (en) Bug positioning method and device for solid state disk, electronic equipment and medium
CN116719675B (en) Hard disk wear testing method, device and medium
CN115440294A (en) Multi-command hybrid test method for NAND Flash controller
CN110764960B (en) Solid state disk firmware testing method
CN112363909B (en) Automatic test method for reliability of file system in relay protection device
CN114664369A (en) Memory chip testing method and device
CN112802530B (en) NAND test method and device, readable storage medium and electronic equipment
CN105843716A (en) IO function test method based on MLTT
CN106648969B (en) Method and system for inspecting damaged data in disk
CN117056218A (en) Test management method, platform, medium and equipment
CN115579047A (en) NVMe event testing method, device and equipment
CN116149901A (en) Data verification test method and device and computer readable storage medium
CN112397136B (en) Parameter testing method and device for semiconductor memory testing software
CN114664372A (en) Performance test method, device, equipment and product of shingled hard disk
US8141039B2 (en) Method and system for consolidating machine readable code
CN110993015B (en) Hard disk differential signal quality detection method, hard disk differential signal quality detection device, main control and medium
CN107766221B (en) Read time delay test method, system, equipment and computer storage medium
CN111581035A (en) Abnormal power-off test method and equipment for storage device
CN117711478A (en) Method, device and medium for power-on and power-off test of solid state disk
CN116959543A (en) SSD reliability test method under LUN working quantity limit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination