CN114629831A - Network card performance test method, device, equipment and storage medium - Google Patents

Network card performance test method, device, equipment and storage medium Download PDF

Info

Publication number
CN114629831A
CN114629831A CN202210238621.8A CN202210238621A CN114629831A CN 114629831 A CN114629831 A CN 114629831A CN 202210238621 A CN202210238621 A CN 202210238621A CN 114629831 A CN114629831 A CN 114629831A
Authority
CN
China
Prior art keywords
test
network card
tested
testing
result
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.)
Granted
Application number
CN202210238621.8A
Other languages
Chinese (zh)
Other versions
CN114629831B (en
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.)
Jiangsu Weishi Technology Co ltd
Original Assignee
Jiangsu Weishi 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 Jiangsu Weishi Technology Co ltd filed Critical Jiangsu Weishi Technology Co ltd
Priority to CN202210238621.8A priority Critical patent/CN114629831B/en
Publication of CN114629831A publication Critical patent/CN114629831A/en
Application granted granted Critical
Publication of CN114629831B publication Critical patent/CN114629831B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for testing network card performance, wherein the method comprises the following steps: analyzing the test configuration parameters, and logging in the target equipment inserted with the network card to be tested based on the analysis result; detecting the target equipment, and determining system information of the target equipment and test topology information of the network card to be tested; after the target equipment is tested and configured based on the system information, in the target equipment subjected to test configuration, performance test is carried out on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters, and a test result is obtained. According to the technical scheme, according to the system information and the test requirements of the target equipment, the performance of the network card to be tested can be automatically tested without an expensive network test instrument, the test complexity is reduced, and the test efficiency and quality are improved.

Description

Network card performance test method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer data processing, in particular to a network card performance testing method, device, equipment and storage medium.
Background
A network card is a piece of hardware designed to allow computers to communicate over a network, and its main functions include: encapsulation and decapsulation of data, link management, and encoding and decoding of data. With the rapid development of network interconnection technology (for example, ethernet protocol has already supported from the initial 10Mbps rate to 400Gbps rate), various tools and special instruments have been developed to measure the network card performance in different scenarios by different methods.
In the prior art, when determining main performance data of a network card on different hardware platforms, different test environments need to be set up and deployed, different test tools and methods are applied, and data under different conditions are properly analyzed and processed, so that a relatively perfect result can be obtained.
However, the process of determining the performance of the network card in the prior art is time-consuming, labor-consuming and error-prone.
Disclosure of Invention
The invention provides a network card performance testing method, which is used for automatically testing the performance of a network card to be tested, reducing the testing complexity and improving the testing efficiency and quality.
In a first aspect, an embodiment of the present invention provides a method for testing network card performance, including:
analyzing the test configuration parameters, and logging in the target equipment inserted with the network card to be tested based on the analysis result;
detecting the target equipment and determining system information of the target equipment;
after the target equipment is tested and configured based on the system information, in the target equipment subjected to test configuration, performance test is carried out on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters, and a test result is obtained.
The embodiment of the invention provides a network card performance test method, which comprises the following steps: analyzing the test configuration parameters, and logging in the target equipment inserted with the network card to be tested based on the analysis result; detecting the target equipment and determining system information of the target equipment; after the target equipment is tested and configured based on the system information, in the target equipment subjected to test configuration, performance test is carried out on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters, and a test result is obtained. According to the technical scheme, after an analysis result obtained based on analysis test configuration parameters logs in a target device inserted with a network card to be tested, the target device is subjected to test configuration according to system information of the target device, the network card to be tested is subjected to automatic performance test in the target device subjected to test configuration based on test topology information and test configuration parameters of the network card to be tested, a test result is obtained, according to the system information and test requirements of the target device, the automatic test of the performance of the network card to be tested can be achieved without the help of expensive network test instruments, the test complexity is reduced, and the test efficiency and the test quality are improved.
Further, analyzing the test configuration parameters, and logging in the target device inserted with the network card to be tested based on the analysis result parameters, including:
analyzing the test configuration parameters, and determining a result storage directory of the test result, login information of the target equipment, and the model, state and test type of the network card to be tested according to the analysis result;
and logging in the target equipment based on the login information of the target equipment.
Further, determining a result storage directory of the test result according to the analysis result, including:
if the result saving directory exists, multiplexing the result saving directory to save the test result based on the result saving directory;
and if the result saving directory does not exist, creating the result saving directory and related subdirectories, and initializing the system information and the test topology information.
Further, performing test configuration on the target device based on the system information includes:
determining a testing tool according to the system information, and installing the testing tool and the software package to the target equipment;
determining the network card to be tested, and standardizing the name of a network port contained in the network card to be tested;
and performing ping test on the target equipment to determine the test topology information of the network card to be tested.
Further, performing a performance test on the network card to be tested based on the test topology information determined by the test configuration and the test configuration parameters to obtain a test result, including:
calling the test tool according to the test type contained in the test configuration parameters, wherein the test type comprises at least one of Ethernet test, RDMA test, DPDK test and SR-IOV test;
and testing the network card to be tested based on the testing tool according to the testing command determined by the testing topology information, and collecting the testing result.
Further, before the testing command determined according to the test topology information, testing the network card to be tested based on the testing tool, and collecting the testing result, the method further includes:
and determining address information of a network port contained in the network card to be tested based on the test topology, and determining the test command according to the address information.
Further, after performing a performance test on the network card to be tested based on the test topology information determined by the test configuration and the test configuration parameters to obtain a test result, the method further includes:
and collecting and analyzing the test result to obtain a test report.
In a second aspect, an embodiment of the present invention further provides a device for testing network card performance, including:
the login module is used for analyzing the test configuration parameters and logging in the target equipment inserted with the network card to be tested based on the analysis result;
the detection module is used for detecting the target equipment and determining the system information of the target equipment;
and the test module is used for carrying out performance test on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters in the target equipment subjected to the test configuration after the target equipment is subjected to the test configuration based on the system information to obtain a test result.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the network card performance testing method of any one of the first aspect.
In a fourth aspect, an embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the network card performance testing method according to any one of the first aspect.
In a fifth aspect, the present application provides a computer program product, which includes computer instructions, when the computer instructions are run on a computer, the computer executes the network card performance testing method provided in the first aspect.
It should be noted that all or part of the computer instructions may be stored on the computer readable storage medium. The computer-readable storage medium may be packaged together with the processor of the network card performance testing apparatus, or may be packaged separately from the processor of the network card performance testing apparatus, which is not limited in this application.
For the descriptions of the second, third, fourth and fifth aspects in this application, reference may be made to the detailed description of the first aspect; in addition, for the beneficial effects described in the second aspect, the third aspect, the fourth aspect and the fifth aspect, reference may be made to the beneficial effect analysis of the first aspect, and details are not repeated here.
In this application, the names of the above network card performance testing apparatuses do not limit the devices or the functional modules themselves, and in actual implementation, the devices or the functional modules may appear by other names. As long as the functions of the respective devices or functional modules are similar to those of the present application, they are within the scope of the claims of the present application and their equivalents.
These and other aspects of the present application will be more readily apparent from the following description.
Drawings
Fig. 1 is a flowchart of a network card performance testing method according to an embodiment of the present invention;
fig. 2 is a flowchart of a network card performance testing method according to a second embodiment of the present invention;
fig. 3 is a flowchart of step 240 in a method for testing network card performance according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a network card performance testing apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone.
The terms "first" and "second" and the like in the description and drawings of the present application are used for distinguishing different objects or for distinguishing different processes for the same object, and are not used for describing a specific order of the objects.
Furthermore, the terms "including" and "having," and any variations thereof, as referred to in the description of the present application, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like. In addition, the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "such as" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the description of the present application, the meaning of "a plurality" means two or more unless otherwise specified.
Example one
Fig. 1 is a flowchart of a method for testing network card performance according to an embodiment of the present invention, where this embodiment is applicable to a situation where an automatic test needs to be performed on a network card, and the method may be executed by a network card performance testing apparatus, as shown in fig. 1, and specifically includes the following steps:
and 110, analyzing the test configuration parameters, and logging in the target equipment inserted with the network card to be tested based on the analysis result.
The target device can be a target server, the network card to be tested can be inserted into the target server, and automatic testing of the network card to be tested can be achieved on the target server.
Specifically, the client may analyze the test configuration parameters to obtain an analysis result, where the analysis result includes login information of the target server, such as a management IP and a root account password of the target server, and the target server may be logged in based on the management IP and the root account password.
In practical application, the analysis result may further include a result storage directory of the test result, and a model, a state, a test type, and the like of the network card to be tested. If no result storage directory exists in the target server, automatically creating a new directory; if the result storage directory exists in the target server, the information under the current directory is reused.
The state of the network card to be tested may include whether the network card to be tested is a direct connection network card, and the test type of the network card to be tested may include at least one of an ethernet test, an RDMA test, a DPDK test, and an SR-IOV test.
In the embodiment of the invention, the client can analyze the test configuration parameters so as to log in the target server based on the analysis result.
And 120, detecting the target equipment and determining system information of the target equipment.
Specifically, after the target server is successfully logged in, the target server may be probed through a diameter-m or similar command to obtain system information of the target server, where the system information may include a CPU architecture type and an operating system type.
Step 130, after the target device is tested and configured based on the system information, in the target device subjected to test configuration, performing performance test on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters to obtain a test result.
Specifically, the system information may include a CPU architecture type and an operating system type, and according to the acquired CPU architecture type and operating system type, a test tool, a script, a driver, and a software package corresponding to the system information may be determined and uploaded.
In the embodiment of the invention, different installation processes can be executed according to the type of the operating system, and the required software package can be ensured to be successfully installed in all supported scenes.
After the software is installed, the network card model of each network card inserted in the target server can be automatically detected, the network card to be tested is determined according to the network card model, and the name of the network card to be tested is standardized.
If the network card to be tested is a direct connection network card, starting a topology automatic detection process, automatically acquiring the actual connection topology with the test network card, and recording a service port and a client port according to groups; after the topology test is detected, allocating IP addresses to the network ports in each group; and collecting various information on the target server, downloading the information to the local and analyzing the information.
And then, according to the test configuration parameters and the test type of the network port to be tested on the target server, sequentially configuring and executing at least one of an Ethernet test, an RDMA test, a DPDK test and an SR-IOV test to obtain a test result.
In the embodiment of the invention, the analysis result obtained by analyzing the test configuration parameters logs in the target server and determines the system information, the test tool, the driver and the software package corresponding to the system information are automatically uploaded, the test configuration is carried out after the software package is automatically installed, the test topology is automatically detected, different test types are automatically executed to obtain the test result, the network card performance test work under different situations is automatically completed based on the hardware and the system information, and the test efficiency and the test quality are improved.
The network card performance testing method provided by the embodiment of the invention comprises the following steps: analyzing the test configuration parameters, and logging in the target equipment inserted with the network card to be tested based on the analysis result; detecting the target equipment and determining system information of the target equipment; after the target equipment is tested and configured based on the system information, in the target equipment subjected to test configuration, performance test is carried out on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters, and a test result is obtained. According to the technical scheme, after an analysis result obtained based on analysis test configuration parameters logs in a target device inserted with a network card to be tested, the target device is subjected to test configuration according to system information of the target device, the network card to be tested is subjected to automatic performance test in the target device subjected to test configuration based on test topology information and test configuration parameters of the network card to be tested, a test result is obtained, according to the system information and test requirements of the target device, the automatic test of the performance of the network card to be tested can be achieved without the help of expensive network test instruments, the test complexity is reduced, and the test efficiency and the test quality are improved.
By integrating various tools and various testing methods, different hardware platforms and operating systems are adapted, so that the aim of comprehensively evaluating various performance indexes of the network card without using expensive network testing instruments is fulfilled, and the testing investment cost is reduced.
Example two
Fig. 2 is a flowchart of a network card performance testing method according to a second embodiment of the present invention, which is embodied on the basis of the second embodiment. As shown in fig. 2, in this embodiment, the method may further include:
step 210, analyzing the test configuration parameters, and determining a result storage directory of the test result, login information of the target device, and the model, state and test type of the network card to be tested according to the analysis result.
In one embodiment, determining the result storage directory of the test result according to the parsing result includes:
if the result saving directory exists, multiplexing the result saving directory to save the test result based on the result saving directory; and if the result storage directory does not exist, creating the result storage directory and related subdirectories, and initializing the system information and the test topology information.
Specifically, the client may analyze the test configuration parameters, and further may determine, according to the analysis result, a result storage directory of the test result obtained in the test, login information (management IP address and root login password) of the target device, a model, a state, and a test type of the network card to be tested, and a driver version to be tested.
In practical application, if the result storage directory exists, the current directory is used as the result storage directory of the test result, and the configuration information under the result storage directory is automatically loaded; and if the result storage directory does not exist, creating the result storage directory and related subdirectories, initializing a system information file, a test topology file, a test result file and the like.
It should be noted that the client may run on Windows or Linux, or may run on the test server.
In the embodiment of the invention, the client can analyze the test configuration parameters so as to log in the target server based on the analysis result.
And step 220, logging in the target equipment inserted with the network card to be tested based on the login information of the target equipment contained in the analysis result.
Specifically, after the test configuration parameters are analyzed, login information of the target device can be obtained, and then the target device can be logged in based on the login information.
When one or more of the target servers fails to log in, the server information and the reason of the failure to log in may be reported, and the user may be requested to log in again after eliminating the relevant problems.
And step 230, detecting the target device, and determining system information of the target device.
Step 240, after the target device is tested and configured based on the system information, in the target device subjected to test configuration, performing a performance test on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters to obtain a test result.
Fig. 3 is a flowchart of step 240 in a network card performance testing method according to a second embodiment of the present invention, and as shown in fig. 3, in an implementation manner, step 240 may specifically include:
step 2410, determining a test tool according to the system information, and installing the test tool and the software package to the target device.
Specifically, according to the system information determined by the detection target server and the acquired test configuration parameters, the test capability supported by the target server can be confirmed. In the maximum case, the target server may support performing an ethernet test, an RDMA test, a DPDK test, and an SR-IOV (network card virtualization function) test on the network card to be tested. Different test units use different test tools and methods, and generally take groups as units, and test cases in the test types are sequentially executed for the net ports in each group. If a particular portal group does not support a test or the test configuration parameters specify that the test is not to be performed, the test is skipped.
In the embodiment of the invention, according to the acquired CPU architecture type and the acquired operating system type, a test tool, a script, a driver and a software package corresponding to system information can be determined and uploaded. Although in most cases, the test tools can be installed directly through the package management tool, since the tool versions are usually different in different systems, the same version of tool can be used to ensure consistency of version and output. Moreover, because the binary programs under different CPU architecture types are incompatible, different binary version tools need to be compiled according to different CPU architecture types.
According to the type of the operating system, different installation processes are executed, and the required dependent packages can be successfully installed in all supported scenes. Different test units depend on different systems by different software packages which are not identical, and the names of the same software packages and different operating systems can be different. In the embodiment of the invention, different installation processes can be executed according to the type of the operating system, so that the required dependent packages can be successfully installed in all supported scenes. On a Linux system, a driver is bound with a kernel version, and a precompiled binary version cannot be used generally. In the embodiment of the invention, the driver is issued by using a source code mode and necessary adaptation is carried out on different CPU architecture types and operating system types. And after the drive is uploaded, if the operating system on the target server does not have the drive of the network card to be tested, executing the step of drive compiling and installing, otherwise, skipping the drive compiling and installing process. To test the performance of different drive versions, embodiments of the invention support specifying the drive version to be tested. When the drive version is specified, if the drive version on the target server is different from the version to be tested, the drive program is updated.
Step 2420, determining the network card to be tested, and normalizing the name of the network port included in the network card to be tested.
After the software package is installed, the network card model of each network card inserted in the target server can be automatically detected, and if the network card is matched with the model of the network card to be detected, the network card is determined as the network card to be detected. Different operating systems do not completely name the network ports, and for better consistency, each network port on the network card to be tested needs to be named in a standard manner, the kernel name of the network port is firstly obtained, and then the name displayed by the network port under nmcli is modified through an nmcli command, so that the consistency between the name and the name distributed by the kernel is ensured.
And 2430, performing ping test on the target device to determine the test topology information of the network card to be tested.
Specifically, different temporary IP addresses are configured for the network port to be tested of the target server, the accompanied test server is used for conducting ping test on the target server, and test topology information of the network port to be tested is automatically determined.
In practical applications, after determining the test topology information, the test topology information needs to be detected. Certainly, in the embodiment of the present invention, the test topology information may be automatically detected, first, according to the port name and other related information (for example, the MAC address of the port, the MTU, the PCIe address, the controller name, and the like) obtained in step 2420, a temporary IP is sequentially configured for all the ports to be tested of the target server, an ARP response policy on the target server is configured, and only an ARP request whose destination MAC address is the MAC of the local port is responded; then, selecting a first network port to be tested on the accompanying and testing server, and configuring another temporary IP for the first network port to be tested; traversing temporary IPs configured by a target server, and executing ping operation on each IP; if the network ports can be ping-connected, the two network ports are directly connected, the two network ports are recorded, and the temporary IP of the accompanying and testing server is deleted; otherwise, performing ping operation on the next network port. And traversing all the network ports to be tested on the test accompanying server, executing the operation, and skipping the network ports which are confirmed to be interconnected, so that the test topology information can be automatically detected. And after the detection is finished, storing the test topology information to a test topology file, and deleting the temporary IP of the target server.
Step 2440, in the target device subjected to test configuration, invoking the test tool according to the test type included in the test configuration parameters.
Wherein the test type includes at least one of an Ethernet test, an RDMA test, a DPDK test, and an SR-IOV test.
Specifically, when the test type is an Ethernet test, determining that the test tool is an Ethernet test unit; when the test type is RDMA test, determining that the test tool is an RDMA test unit; when the test type is a DPDK test, determining that the test tool is a DPDK test unit; and when the test type is SR-IOV test, determining that the test tool is an SR-IOV test unit.
Step 2450, determining address information of a network port included in the network card to be tested based on the test topology information, and determining the test command according to the address information.
Specifically, IP addresses of different network segments are allocated to the network ports in different network port groups, so as to ensure that mutual conflict is avoided. And then, the test command can be determined according to the address information of each network port contained in each network card to be tested.
Step 2460, according to the test command determined by the test topology information determined by the test configuration, testing the network card to be tested based on the test tool, and collecting the test result.
In one embodiment, an ethernet test is performed on the ports in the test set.
The ethernet protocol is the most widely used protocol in the server field, and there are various widely used testing tools, such as iperf, iperf3, netperf, nuttcp, ethr, mtr, and the like, and no matter what tool, the testing tools can be abstracted as the testing of throughput (bandwidth), delay, and packet loss rate of the TCP, UDP, or SCTP protocol.
In the embodiment of the invention, the Ethernet test supports a plurality of tools, the iperf/iperf3 test is enabled by default, the TCP/UDP protocol test is carried out, and other test tools can be enabled by configuring the switch.
The Ethernet test procedure is as follows:
a) the iperf/iperf3 test was started.
b) And reading parameters such as a test tool, a test model, a test protocol, a test thread number, test duration and the like.
Different test tools, providing different test parameters, are used to control certain aspects of protocol testing. In the embodiment of the invention, the most common parameter combination is used by default, and the throughput, the time delay and the jitter under the default mode and the optimization mode can be tested. Obviously, the present solution can easily support all the parameters of different test tools to provide the ability to maximize custom tests. And calling different testing sub-processes according to different testing parameters.
c) And testing according to default parameters of the system.
In the embodiment of the invention, no tuning setting is carried out on the target system, and the target system is used for testing a group of benchmark reference performance data.
d) And testing after optimizing the system and the network port.
In the embodiment of the invention, based on the capabilities (such as socket buffer size, queue number, interrupt number, NUMA Node and the like) supported by the target system and the network card, the system and the network port are automatically adjusted and tested by using optimized test tool parameters, and the performance data of the optimal situation is tested.
e) And adjusting the MTU of each group of network ports to the maximum value and then testing.
The embodiment of the invention is mainly used for testing the maximum bandwidth of TCP and UDP under the limit condition. The maximum MTU supported by different network cards is not completely the same, and in the scheme, the maximum MTU uses the smaller of the maximum MTUs of all the network ports in one group of network ports.
f) And after the mode to be tested is determined, traversing each group of network ports in the test topology, and executing the subsequent test steps.
g) And respectively creating related test result catalogues at the server and the client and recording the operation parameters of the server and the client according to different test parameters.
h) And starting a server process and a resource monitoring process according to different test parameters.
i) And configuring the running parameters of the client process according to the different test parameters, and starting the resource monitoring process.
j) And starting the test according to the set test duration and test times.
k) And (5) waiting for the test to be finished, and outputting and downloading the test result to the local.
In one embodiment, RDMA tests are performed on the ports in the test set.
The RDMA protocol has 3 different bottom layer implementation modes: infiniband, iWrap and RoCE v1/v 2. In the environment initialization phase, various implementations are detected, whether the network port group to be tested on the target environment supports RDMA capability or not is determined, and if the RDMA capability is supported, the used RDMA implementation mode is further determined. In either way, the same test method was used.
In the embodiment of the present invention, a group of ports supporting RDMA function is tested through 6 different tools in a perftest tool group, and the capabilities provided by these tools are as shown in their names: ib _ read _ bw, ib _ write _ bw, ib _ send _ bw, ib _ read _ lat, ib _ write _ lat, and ib _ send _ lat.
Of course, if one or more ports in a particular set of ports do not support RDMA capability, then the testing of that set for RDMA is skipped.
RDMA test procedures are as follows:
a) the RDMA test is started.
b) And reading parameters such as a test tool, a test model, test times and the like.
c) And testing according to default parameters of the system.
Specifically, no tuning settings are made for the target server for testing a set of benchmark reference performance data.
d) And testing after optimizing the system and the network port.
Specifically, based on the RDMA capability supported by the target server and the network card to be tested, the system and the network port are automatically adjusted and tested again.
e) And after the mode to be tested is determined, traversing each group of network ports in the test topology, and executing the subsequent test steps.
f) And respectively creating related test result catalogues at the server and the client and recording the operation parameters of the server and the client according to different test parameters.
g) And starting a server process and a resource monitoring process according to different test parameters.
h) And configuring the running parameters of the client process according to different test parameters, and starting the test after starting the resource monitoring process.
i) And (5) waiting for the test to be finished, and outputting and downloading the test result to the local.
In one embodiment, a DPDK test is performed on the ports in the test group.
Among other things, DPDK tests typically perform l2fwd and l3fwd tests with the aid of a tester.
In the embodiment of the invention, 4 network ports are taken as a group, each server uses 2 network ports, one of the network ports is used for generating pktgen test flow and is called as a flow generation network port, and the other network port executes l2fwd or l3fwd and is called as a tested network port; and after the test is finished, generating a network port and a tested network port for the exchange flow, and repeating the process.
In one embodiment, an SR-IOV test is performed on the ports in the test set.
Specifically, in view of the complex virtualization test environment and the inability to execute automatically, in the technical solution, the test requires a tester to first enable the network card virtualization, configure virtual machines, configure management IPs of every two virtual machines as a group of hosts, and repeat the environment initialization, the ethernet test, the RDMA test, and the DPDK test in the present invention. In SR-IOV mode, continuous nested SR-IOV is not typically supported. It should be noted that different CPU architectures have different SR-IOV support capabilities, and if a specific architecture does not support SR-IOV, the test cannot be performed.
And step 250, collecting and analyzing the test result to obtain a test report.
Specifically, the collected test results include, but are not limited to: CPU model and detailed information (such as CPU core number, thread number, Sockets number, NUMA Node number, main frequency and Cache size), memory information, PCIe information, network card information, operating system information, software package information and the like. The test result is used for test viewing analysis, part for test report and more for backup and problem troubleshooting.
In the embodiment of the invention, the test results of all the test units are classified and summarized in the form of tables and charts according to different test types, and the test report is automatically output.
The second embodiment of the present invention provides a network card performance testing method, which includes: analyzing the test configuration parameters, and determining a result storage directory of the test result, the login information of the target equipment, and the model, state and test type of the network card to be tested according to the analysis result; logging in target equipment inserted with a network card to be tested based on the test configuration parameters; detecting the target equipment and determining system information of the target equipment; after the target equipment is tested and configured based on the system information, in the target equipment subjected to test configuration, performing performance test on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters to obtain a test result; and collecting and analyzing the test result to obtain a test report. According to the technical scheme, after the target equipment is provided with the network card to be tested and the operating system, and the remote access function is started, consistent result output is provided for different hardware platforms and operating systems through a standard test model and a result collection rule, so that a reliable, traceable and comparable test result is provided for development, test and support or other related personnel, the performance of equipment, a driver, a system and even application can be conveniently evaluated, the test quality is improved, the time for building a test environment, executing the test and compiling a test report is greatly reduced, and the test efficiency is improved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a network card performance testing apparatus according to a third embodiment of the present invention, where the apparatus can be applied to a situation that an automatic test needs to be performed on a network card, so as to reduce the complexity of the test and improve the testing efficiency and quality. The apparatus may be implemented by software and/or hardware and is typically integrated in an electronic device, such as a computer device.
As shown in fig. 4, the apparatus includes:
the login module 410 is used for analyzing the test configuration parameters and logging in the target equipment inserted with the network card to be tested based on the analysis result;
a detection module 420, configured to detect the target device and determine system information of the target device;
the test module 430 is configured to perform, after performing test configuration on the target device based on the system information, a performance test on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters in the target device subjected to the test configuration, so as to obtain a test result.
The network card performance testing device provided in this embodiment parses the test configuration parameters, and logs in the target device into which the network card to be tested is inserted based on a parsing result; detecting the target equipment and determining system information of the target equipment; after the target equipment is subjected to test configuration based on the system information, in the target equipment subjected to test configuration, performing performance test on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters to obtain a test result. According to the technical scheme, after an analysis result obtained based on analysis test configuration parameters logs in a target device inserted with a network card to be tested, the target device is subjected to test configuration according to system information of the target device, the network card to be tested is subjected to automatic performance test in the target device subjected to test configuration based on test topology information and test configuration parameters of the network card to be tested, a test result is obtained, according to the system information and test requirements of the target device, the automatic test of the performance of the network card to be tested can be achieved without the help of expensive network test instruments, the test complexity is reduced, and the test efficiency and the test quality are improved.
On the basis of the foregoing embodiment, the login module 410 is specifically configured to:
analyzing the test configuration parameters, and determining a result storage directory of the test result, login information of the target equipment, and the model, state and test type of the network card to be tested according to the analysis result; and logging in the target equipment based on the login information of the target equipment.
In one embodiment, determining the result storage directory of the test result according to the parsing result includes:
if the result saving directory exists, multiplexing the result saving directory to save the test result based on the result saving directory;
and if the result saving directory does not exist, creating the result saving directory and related subdirectories, and initializing the system information and the test topology information.
On the basis of the foregoing embodiment, the testing module 430 is specifically configured to:
determining a testing tool according to the system information, and installing the testing tool and the software package to the target equipment;
determining the network card to be tested, and standardizing the name of a network port contained in the network card to be tested;
performing ping test on the target equipment to determine test topology information of the network card to be tested;
in the target equipment subjected to test configuration, calling the test tool according to the test type contained in the test configuration parameters, wherein the test type comprises at least one of Ethernet test, RDMA test, DPDK test and SR-IOV test;
determining address information of a network port contained in the network card to be tested based on the test topology information, and determining the test command according to the address information;
and testing the network card to be tested based on the testing tool according to the testing command determined by the testing topology information determined by the testing configuration, and collecting the testing result.
On the basis of the above embodiment, the apparatus further includes:
and the execution module is used for collecting and analyzing the test result to obtain a test report.
The network card performance testing device provided by the embodiment of the invention can execute the network card performance testing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the network card performance testing apparatus, each unit and each module included in the apparatus are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, the specific names of the functional units are only for the convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Example four
Fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary electronic device 5 suitable for use in implementing embodiments of the present invention. The electronic device 5 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 5, the electronic device 5 is embodied in the form of a general-purpose computing electronic device. The components of the electronic device 5 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The electronic device 5 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 5 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The electronic device 5 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The electronic device 5 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the electronic device 5, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 5 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 5 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 20. As shown in FIG. 5, the network adapter 20 communicates with the other modules of the electronic device 5 via the bus 18. It should be appreciated that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with electronic device 5, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and page displays by running the program stored in the system memory 28, for example, implementing the network card performance testing method provided by the embodiment of the present invention, the method includes:
analyzing the test configuration parameters, and logging in the target equipment inserted with the network card to be tested based on the analysis result;
detecting the target equipment and determining system information of the target equipment;
after the target equipment is tested and configured based on the system information, in the target equipment subjected to test configuration, performance test is carried out on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters, and a test result is obtained.
Of course, those skilled in the art can understand that the processor may also implement the technical solution of the network card performance testing method provided by any embodiment of the present invention.
EXAMPLE five
An embodiment five of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement, for example, the method for testing the performance of a network card provided in the embodiment of the present invention, where the method includes:
analyzing the test configuration parameters, and logging in the target equipment inserted with the network card to be tested based on the analysis result;
detecting the target equipment, and determining system information of the target equipment and test topology information of the network card to be tested;
after the target equipment is subjected to test configuration based on the system information, in the target equipment subjected to test configuration, performing performance test on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters to obtain a test result.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer-readable storage medium may be, for example but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It will be understood by those skilled in the art that the modules or steps of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and optionally they may be implemented by program code executable by a computing device, such that it may be stored in a memory device and executed by a computing device, or it may be separately fabricated into various integrated circuit modules, or it may be fabricated by fabricating a plurality of modules or steps thereof into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments illustrated herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for testing network card performance is characterized by comprising the following steps:
analyzing the test configuration parameters, and logging in the target equipment inserted with the network card to be tested based on the analysis result parameters;
detecting the target equipment and determining system information of the target equipment;
after the target equipment is tested and configured based on the system information, in the target equipment subjected to test configuration, performance test is carried out on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters, and a test result is obtained.
2. The method for testing the performance of the network card according to claim 1, wherein analyzing the test configuration parameters and logging in the target device inserted with the network card to be tested based on the analysis result parameters comprises:
analyzing the test configuration parameters, and determining a result storage directory of the test result, login information of the target equipment, and the model, state and test type of the network card to be tested according to the analysis result;
and logging in the target equipment based on the login information of the target equipment.
3. The method for testing the network card performance according to claim 2, wherein determining the result storage directory of the test result according to the analysis result comprises:
if the result saving directory exists, multiplexing the result saving directory to save the test result based on the result saving directory;
and if the result saving directory does not exist, creating the result saving directory and related subdirectories, and initializing the system information and the test topology information.
4. The method for testing the network card performance according to claim 2, wherein the step of performing test configuration on the target device based on the system information comprises:
determining a testing tool according to the system information, and installing the testing tool and the software package to the target equipment;
determining the network card to be tested, and standardizing the name of a network port contained in the network card to be tested;
and performing ping test on the target equipment to determine the test topology information of the network card to be tested.
5. The network card performance testing method of claim 4, wherein performing the performance test on the network card to be tested based on the test topology information determined by the test configuration and the test configuration parameters to obtain a test result comprises:
calling the test tool according to the test type contained in the test configuration parameters, wherein the test type comprises at least one of Ethernet test, RDMA test, DPDK test and SR-IOV test;
and testing the network card to be tested based on the testing tool according to the testing command determined by the testing topology information, and collecting the testing result.
6. The method for testing network card performance according to claim 5, wherein before the testing command determined according to the test topology information, testing the network card to be tested based on the testing tool, and collecting the test result, the method further comprises:
and determining the address information of the network interface included in the network card to be tested based on the test topology information, and determining the test command according to the address information.
7. The method for testing the performance of the network card according to claim 1, wherein after the performance of the network card to be tested is tested based on the test topology information determined by the test configuration and the test configuration parameters to obtain the test result, the method further comprises:
and collecting and analyzing the test result to obtain a test report.
8. A network card performance testing device is characterized by comprising:
the login module is used for analyzing the test configuration parameters and logging in the target equipment inserted with the network card to be tested based on the analysis result;
the detection module is used for detecting the target equipment and determining the system information of the target equipment;
and the test module is used for carrying out performance test on the network card to be tested based on test topology information determined by the test configuration and the test configuration parameters in the target equipment subjected to the test configuration after the target equipment is subjected to the test configuration based on the system information to obtain a test result.
9. An electronic device, characterized in that the device comprises:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the network card performance testing method of any of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the network card performance testing method of any one of claims 1-7 when executed by a computer processor.
CN202210238621.8A 2022-03-11 2022-03-11 Network card performance test method, device, equipment and storage medium Active CN114629831B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210238621.8A CN114629831B (en) 2022-03-11 2022-03-11 Network card performance test method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210238621.8A CN114629831B (en) 2022-03-11 2022-03-11 Network card performance test method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114629831A true CN114629831A (en) 2022-06-14
CN114629831B CN114629831B (en) 2023-10-24

Family

ID=81901084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210238621.8A Active CN114629831B (en) 2022-03-11 2022-03-11 Network card performance test method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114629831B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116566875A (en) * 2023-06-25 2023-08-08 深圳市联瑞电子有限公司 Network card testing system and method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105071982A (en) * 2015-07-16 2015-11-18 浪潮电子信息产业股份有限公司 Method for rapid measurement of performance of network card under Linux
CN106059860A (en) * 2016-07-22 2016-10-26 浪潮电子信息产业股份有限公司 Method and device for testing network cards
US9525598B1 (en) * 2014-11-13 2016-12-20 Amazon Technologies, Inc. Network testing device for automated topology validation
CN109787864A (en) * 2019-01-25 2019-05-21 郑州云海信息技术有限公司 A kind of network automatic test approach, device, terminal and storage medium based on Netperf
CN110896366A (en) * 2019-05-14 2020-03-20 研祥智能科技股份有限公司 Network card function testing method and device of multi-network card equipment and storage medium
CN111786855A (en) * 2020-06-30 2020-10-16 曙光信息产业(北京)有限公司 Network card pressure testing method and device, electronic equipment and storage medium
CN112600723A (en) * 2020-11-13 2021-04-02 苏州浪潮智能科技有限公司 Network card testing method based on virtualization scene
CN112653600A (en) * 2020-12-26 2021-04-13 苏州浪潮智能科技有限公司 Network card performance testing method and device based on USB network card and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9525598B1 (en) * 2014-11-13 2016-12-20 Amazon Technologies, Inc. Network testing device for automated topology validation
CN105071982A (en) * 2015-07-16 2015-11-18 浪潮电子信息产业股份有限公司 Method for rapid measurement of performance of network card under Linux
CN106059860A (en) * 2016-07-22 2016-10-26 浪潮电子信息产业股份有限公司 Method and device for testing network cards
CN109787864A (en) * 2019-01-25 2019-05-21 郑州云海信息技术有限公司 A kind of network automatic test approach, device, terminal and storage medium based on Netperf
CN110896366A (en) * 2019-05-14 2020-03-20 研祥智能科技股份有限公司 Network card function testing method and device of multi-network card equipment and storage medium
CN111786855A (en) * 2020-06-30 2020-10-16 曙光信息产业(北京)有限公司 Network card pressure testing method and device, electronic equipment and storage medium
CN112600723A (en) * 2020-11-13 2021-04-02 苏州浪潮智能科技有限公司 Network card testing method based on virtualization scene
CN112653600A (en) * 2020-12-26 2021-04-13 苏州浪潮智能科技有限公司 Network card performance testing method and device based on USB network card and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116566875A (en) * 2023-06-25 2023-08-08 深圳市联瑞电子有限公司 Network card testing system and method

Also Published As

Publication number Publication date
CN114629831B (en) 2023-10-24

Similar Documents

Publication Publication Date Title
US8224957B2 (en) Migrating virtual machines among networked servers upon detection of degrading network link operation
CN108768730B (en) Method and device for operating intelligent network card
US9697068B2 (en) Building an intelligent, scalable system dump facility
US8572625B2 (en) Method and system for application migration using per-application persistent configuration dependency
CN112162927B (en) Testing method, medium, device and computing equipment of cloud computing platform
CN111600760B (en) Quality detection system, method and equipment of power grid operation monitoring system
KR102262395B1 (en) Test apparatus to test interoperability of nfv system
WO2014086193A1 (en) Data flow affinity for heterogenous virtual machines
CN114629831B (en) Network card performance test method, device, equipment and storage medium
US11409759B2 (en) Data dump formatting utilizing dynamically created control structures
CN110677307A (en) Service monitoring method, device, equipment and storage medium
CN112506772B (en) Web automatic test method, device, electronic equipment and storage medium
US8244891B2 (en) Simulating a large number of users
CN113448730A (en) Service processing method and device, computer equipment and storage medium
CN109120433B (en) Method and apparatus for containerized deployment of hosts
US10489121B2 (en) Method and apparatus for determining system information in a device having a plurality of processors, each including virtual machines and some located on separate insertable boards
CN113031969B (en) Equipment deployment inspection method and device, computer equipment and storage medium
US11093371B1 (en) Hidden input detection and re-creation of system environment
EP3284214B1 (en) Converged system compliance checking
US11294804B2 (en) Test case failure with root cause isolation
CN112416509B (en) Virtual machine control system and related equipment
US11722436B2 (en) Transport control word architecture for physical port mirroring
US20230065245A1 (en) Transport control word architecture for virtual port mirroring
US9424120B1 (en) Prioritizing first failure data capture (FFDC) data for analysis
US20180060154A1 (en) Techniques for dynamically benchmarking cloud data store systems

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
GR01 Patent grant
GR01 Patent grant