CN114629831B - 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
CN114629831B
CN114629831B CN202210238621.8A CN202210238621A CN114629831B CN 114629831 B CN114629831 B CN 114629831B CN 202210238621 A CN202210238621 A CN 202210238621A CN 114629831 B CN114629831 B CN 114629831B
Authority
CN
China
Prior art keywords
test
network card
tested
result
target equipment
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.)
Active
Application number
CN202210238621.8A
Other languages
Chinese (zh)
Other versions
CN114629831A (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

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 network card performance test method, a device, equipment and a storage medium, 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; and 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 the test topology information and the test configuration parameters determined by the test configuration to obtain a test result. According to the technical scheme, according to the system information and the test requirement of the target equipment, the performance of the network card to be tested can be automatically tested without expensive network test instruments, 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 test method, a device, equipment and a storage medium.
Background
A network card is a piece of hardware designed to allow a computer to communicate over a network, the main functions of which 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 supported 400Gbps from the first 10Mbps rate), various tools and dedicated meters have been developed to measure the performance of network cards in different scenarios by different methods.
In the prior art, when main performance data of a network card on different hardware platforms are determined, different test environments are required to be built and deployed, different test tools and methods are used, and proper analysis processing is performed on the data under different conditions, so that a perfect result can be obtained.
However, the process of determining the performance of the network card in the prior art is time consuming and labor intensive and is prone to error.
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 performance of a network card, 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;
and 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 the test topology information and the test configuration parameters determined by the test configuration to obtain a test result.
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; and 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 the test topology information and the test configuration parameters determined by the test configuration to obtain a test result. According to the technical scheme, after the target equipment inserted with the network card to be tested is logged in based on the analysis result obtained by analyzing the test configuration parameters, the target equipment is tested and configured according to the system information of the target equipment, the network card to be tested is automatically tested in the tested and configured target equipment based on the test topology information and the test configuration parameters of the network card to be tested, the test result is obtained, and according to the system information and the test requirement of the target equipment, the performance of the network card to be tested can be automatically tested without 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, 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, determining a result storage catalog of the test result according to the analysis result, and determining login information of the target equipment, the model, the state and the test type of the network card to be tested;
logging in the target equipment based on the login information of the target equipment.
Further, determining a result preservation catalog of the test result according to the analysis result, including:
multiplexing the result save directory to save the test result based on the result save directory if the result save directory exists;
if the result saving directory does not exist, the result saving directory and related subdirectories are created, and the system information and the test topology information are initialized.
Further, performing test configuration on the target device based on the system information, including:
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 performance test on the network card to be tested based on the test topology information and the test configuration parameters determined by the test configuration to obtain a test result, including:
invoking the test tool according to the test type contained in the test configuration parameters, wherein the test type comprises at least one of an Ethernet test, an RDMA test, a DPDK test and an 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 testing the network card to be tested based on the test tool according to the test command determined by the test topology information and collecting the test result, the method further comprises:
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 performance test on the network card to be tested based on the test topology information and the test configuration parameters determined by the test configuration, a test result is obtained, 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 performance of a network card, 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 performing performance test on the network card to be tested based on the test topology information and the test configuration parameters determined by the test configuration in the target equipment subjected to the test configuration after the test configuration is performed on the target equipment based on the system information, so as to obtain a test result.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
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 to enable the at least one processor to perform the network card performance test method of any one of the first aspects.
In a fourth aspect, embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are for performing the network card performance test method according to any one of the first aspects.
In a fifth aspect, the present application provides a computer program product comprising computer instructions which, when run on a computer, cause the computer to perform the network card performance test method as provided in the first aspect.
It should be noted that the above-mentioned computer instructions may be stored in whole or in part on a computer-readable storage medium. The computer readable storage medium may be packaged together with the processor of the network card performance testing device, or may be packaged separately with the processor of the network card performance testing device, which is not limited in the present application.
The description of the second, third, fourth and fifth aspects of the present application may refer to the detailed description of the first aspect; also, the advantageous effects described in the second aspect, the third aspect, the fourth aspect, and the fifth aspect may refer to the advantageous effect analysis of the first aspect, and are not described herein.
In the present application, the names of the network card performance test apparatuses are not limited to the devices or functional modules, and in actual implementation, the devices or functional modules may appear under other names. Insofar as the function of each device or function module is similar to that of the present application, it is within the scope of the claims of the present application and the equivalents thereof.
These and other aspects of the application will be more readily apparent from the following description.
Drawings
Fig. 1 is a flowchart of a network card performance test method according to a first embodiment of the present application;
fig. 2 is a flowchart of a network card performance testing method according to a second embodiment of the present application;
fig. 3 is a flowchart of step 240 in a network card performance test method according to a second embodiment of the present application;
fig. 4 is a schematic structural diagram of a network card performance testing device according to a third embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone.
The terms "first" and "second" and the like in the description and in the drawings are used for distinguishing between different objects or between different processes of the same object and not for describing a particular order of objects.
Furthermore, references to the terms "comprising" and "having" and any variations thereof 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 listed but may optionally 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 mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like. Furthermore, embodiments of the application and features of the embodiments 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 "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the present application, unless otherwise indicated, the meaning of "a plurality" means two or more.
Example 1
Fig. 1 is a flowchart of a network card performance testing method according to an embodiment of the present application, where the embodiment is applicable to a case where an automatic test is required for a network card, and the method may be performed by a network card performance testing device, 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 the automatic test of the network card to be tested can be realized on the target server.
Specifically, the client may parse the test configuration parameter to obtain a parsing result, where the parsing result includes login information of the target server, for example, management IP and root account password of the target server, and may log in the target server based on the management IP and the root account password.
In practical application, the analysis result can also include a result storage catalog of the test result, and the model, state, test type and the like of the network card to be tested. If the result saving catalogue does not exist in the target server, automatically creating a new catalogue; and if the result saving directory exists in the target server, multiplexing the information under the current directory.
The state of the network card to be tested can comprise whether the network card to be tested is a direct network card, and the test type of the network card to be tested can comprise at least one of Ethernet test, RDMA test, DPDK test and 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 the system information of the target equipment.
Specifically, after the target server is successfully logged in, the target server may be detected through an uname-m or similar command, and system information of the target server may be obtained, where the system information may include a CPU architecture type and an operating system type.
And 130, performing test configuration on the target equipment based on the system information, and performing performance test on the network card to be tested in the target equipment subjected to the test configuration based on the test topology information and the test configuration parameters determined by the test configuration 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, so that the required software package can be successfully installed under all supported scenes.
After the software is installed, the network card model of each network card inserted on the target server can be automatically detected, the network card to be detected is determined according to the network card model, and the naming of the network card to be detected is standardized.
If the network card to be tested is a direct network card, starting a topology automatic detection process, automatically acquiring the actual connection topology with the test network card, and recording a server network port and a client network port according to the group; after the test topology is detected, IP addresses are distributed to the network ports in each group; and collecting various information on the target server, and downloading the information to the local and analyzing.
And further, 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 the Ethernet test, the RDMA test, the DPDK test and the SR-IOV test to obtain a test result.
In the embodiment of the invention, the analysis result obtained by analyzing the test configuration parameters is logged in the target server, the system information is determined, 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, and different test types are automatically executed to obtain the test result, so that the performance test work of the network card under different conditions is automatically completed based on the hardware and the system information, and the test efficiency and the test quality are improved.
The first 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; and 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 the test topology information and the test configuration parameters determined by the test configuration to obtain a test result. According to the technical scheme, after the target equipment inserted with the network card to be tested is logged in based on the analysis result obtained by analyzing the test configuration parameters, the target equipment is tested and configured according to the system information of the target equipment, the network card to be tested is automatically tested in the tested and configured target equipment based on the test topology information and the test configuration parameters of the network card to be tested, the test result is obtained, and according to the system information and the test requirement of the target equipment, the performance of the network card to be tested can be automatically tested without 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 purpose of comprehensively evaluating various performance indexes of the network card without expensive network testing instruments is achieved, and the testing input 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, where the embodiment is embodied on the basis of the foregoing embodiment. As shown in fig. 2, in this embodiment, the method may further include:
and 210, analyzing the test configuration parameters, and determining a result storage catalog of the test result according to the analysis result, the login information of the target equipment, and the model, the state and the test type of the network card to be tested.
In one embodiment, determining a result preservation list of the test result according to the analysis result includes:
multiplexing the result save directory to save the test result based on the result save directory if the result save directory exists; if the result saving directory does not exist, the result saving directory and related subdirectories are created, and the system information and the test topology information are initialized.
Specifically, the client may analyze the test configuration parameters, and further determine, according to the analysis result, a result storage directory of the test result obtained in the present test, login information (management IP address and root login password) of the target device, a type, a state, a test type, and a drive version to be tested of the network card to be tested.
In practical application, if the result storage catalog exists, the current catalog is used as the result storage catalog of the test result, and the configuration information under the result storage catalog is automatically loaded; if the result saving directory does not exist, the result saving directory and related subdirectories are created, and a system information file, a test topology file, a test result file and the like are initialized.
It should be noted that the client may be running on Windows or Linux, or may be running on a companion 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.
Step 220, logging in the target device inserted with the network card to be tested based on the login information of the target device contained in the analysis result.
Specifically, after analyzing the test configuration parameters, 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, server information and reasons for the failed log-in can be reported, and the user is requested to log in again after eliminating the related problems.
And 230, detecting the target equipment and determining the system information of the target equipment.
And 240, performing test configuration on the target equipment based on the system information, and performing performance test on the network card to be tested in the target equipment subjected to the test configuration based on the test topology information and the test configuration parameters determined by the test configuration to obtain a test result.
Fig. 3 is a flowchart of step 240 in a network card performance test method provided in the second embodiment of the present invention, 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. At maximum, the target server may support performing ethernet testing, RDMA testing, DPDK testing, and SR-IOV (network card virtualization function) testing on the network card under test. Different test units use different test tools and methods, and the test cases in the test types are sequentially executed for the network ports in each group generally in units of groups. 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 operating system type, the testing tool, script, driver and software package corresponding to the system information can be determined and uploaded. Although in most cases the test tools can be installed directly through the package management tools, since tool versions under different systems are often different, the same version of tools can be used to ensure consistency of version and output. Also, because the binaries under different CPU architecture types are not compatible, different binary version tools need to be compiled according to the different CPU architecture types.
Different installation processes are executed according to the type of the operating system, so that the required dependent package can be successfully installed in all supported scenes. Different test units depend on different systems with different software packages, and the same software package may have different names under different operating systems. 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 package can be successfully installed under all supporting scenes. On Linux systems, drivers bind to kernel versions, and precompiled binary versions are typically unusable. In an embodiment of the invention, the drivers are issued using source code and make necessary adaptations to different CPU architecture types and operating system types. After the drive uploading is completed, if the operating system on the target server does not have a drive about the network card to be tested, executing the step of drive compiling and installing, otherwise, skipping the drive compiling and installing process. To test performance of different drive versions, embodiments of the present 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 on 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 to be the network card to be detected. The naming of the network ports by different operating systems is not completely consistent, so that for better consistency, each network port on the network card to be tested needs to be named in a standard way, the kernel name of the network port is firstly obtained, then the name displayed by the network port under nmcli is modified through an nmcli command, and the consistency of the network port and the assigned name of 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, firstly, different temporary IP addresses are configured for the network port to be tested of the target server, ping test is carried out on the target server by using the accompanying test server, and the 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. Of course, in the embodiment of the present invention, the topology information may be automatically detected, and first, according to the port name obtained in the foregoing step 2420 and other related information (for example, the MAC address, MTU, PCIe address, and controller name of the port), a temporary IP is sequentially configured for all the ports to be tested of the target server, and an ARP response policy on the target server is configured, and only the ARP request with the destination MAC address being the MAC of the local port is responded; then, selecting a first network port to be tested on the accompanying test server, and configuring another temporary IP for the first network port to be tested; traversing the temporary IP configured by the target server, and executing ping operation on each IP; if the ping is enabled, the two network ports are indicated to be direct connection network ports, the two network ports are recorded, and the temporary IP of the accompany server is deleted; otherwise, executing the ping operation to the next network port. And traversing all the network ports to be tested on the accompanying test server, executing the operation, and skipping over the network ports which are confirmed to be interconnected, so that the test topology information can be automatically detected. After the detection is completed, the test topology information is stored in a test topology file, and the temporary IP of the target server is deleted.
Step 2440, in the target device after the test configuration, calling the test tool according to the test type contained in the test configuration parameter.
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 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 DPDK test, determining that the test tool is a DPDK test unit; when the test type is SR-IOV test, the test tool is determined to be an SR-IOV test unit.
And 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 for the network ports in different network port groups, so that the 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.
2460, testing the network card to be tested based on the test command determined by the test topology information determined by the test configuration and collecting the test result.
In one embodiment, ethernet testing is performed on the portals in the test set.
Among them, the ethernet protocol is the most widely used protocol in the server field, and there are various widely used testing tools, such as the iperf, the iperf3, the netperf, nuttcp, ethr, mtr, and the like, which can be abstracted as the testing of throughput (bandwidth), delay and packet loss rate of the TCP, UDP or SCTP protocols.
In the embodiment of the invention, the Ethernet test supports multiple 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 a switch.
The Ethernet test steps are as follows:
a) The iperf/iperf3 test is started.
b) And reading parameters such as a test tool, a test model, a test protocol, a test thread number, a test duration and the like.
Different test tools provide different test parameters for controlling certain aspects of the protocol test. In the embodiment of the invention, the most common parameter combination is used by default, and the throughput, time delay and jitter in the default mode and the optimized mode can be tested. It will be apparent that the present solution can easily support all the parameters of different test tools to provide the ability to maximize custom testing. And calling different testing subprocesses according to different testing parameters.
c) Testing is carried out according to default parameters of the system.
In the embodiment of the invention, the target system is not subjected to any optimization setting, and is used for testing a group of datum reference performance data.
d) And testing after the system and the network port are optimized.
In the embodiment of the invention, the system and the network port are automatically optimized based on the capability (such as the socket buffer area size, the queue number, the interrupt number, the NUMA Node and the like) supported by the target system and the network card, and the optimized test tool parameters are used for testing, so that the performance data of the optimal scene is tested.
e) And (5) 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 bandwidths of TCP and UDP under the limit condition. In the scheme, the maximum MTU is used for the smaller one of the maximum MTUs of all network ports in a group of network ports.
f) 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 side and the client side according to different test parameters, and recording the operation parameters of the server side and the client side.
h) And starting a server end process and a resource monitoring process according to the 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 waiting for the test to finish, and outputting and downloading the test result to the local.
In one embodiment, RDMA testing is performed on the portals in the test group.
Among them, there are 3 different underlying implementations of RDMA protocols: inifiniband, iWrap and RoCE v1/v2. In the environment initialization stage, various implementations are detected, whether the network port group to be tested on the target environment supports RDMA capability is determined, and if so, the used RDMA implementation mode is further determined. The same test method was used in either way.
In the embodiment of the invention, a group of ports supporting RDMA functions are tested by 6 different tools in the perftest tool group, and the capabilities provided by the tools are shown in the names of the tools: ibreadbw, ibwrite bw, ibsend bw, ibreadlat, ibwrite lat, ibsend lat.
Of course, if one or more of the ports in a particular group of ports do not support RDMA capabilities, then the group of RDMA-related tests are skipped.
RDMA test steps were as follows:
a) RDMA test was started.
b) And reading parameters such as a test tool, a test model, test times and the like.
c) Testing is carried out according to default parameters of the system.
Specifically, no tuning settings are made to the target server for testing a set of baseline reference performance data.
d) And testing after the system and the network port are optimized.
Specifically, based on RDMA capability supported by the target server and the network card to be tested, the system and the network port are automatically optimized, and the test is conducted again.
e) 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 side and the client side according to different test parameters, and recording the operation parameters of the server side and the client side.
g) And starting a server end process and a resource monitoring process according to the different test parameters.
h) And configuring the running parameters of the client process according to the different test parameters, and starting the test after starting the resource monitoring process.
i) And waiting for the test to finish, 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.
Wherein the DPDK test is usually performed by means of a tester, i 2fwd and i 3fwd tests.
In the embodiment of the invention, 4 network ports are taken as a group, each server uses 2 network ports, one of which is used for generating pktgen test flow, namely a flow generation network port, and the other one is used for executing l2fwd or l3fwd, namely a tested network port; after the test is completed, generating a network port and a tested network port for the traffic exchange, and repeating the above processes.
In one embodiment, SR-IOV testing is performed on portals in a test set.
Specifically, in view of the complex virtualized test environment and incapability of automatic execution, in the technical scheme, a tester is required to enable network card virtualization first, configure virtual machines, configure management IP of every two virtual machines as a group of hosts, and repeat environment initialization, ethernet test, RDMA test and DPDK test in the invention. In SR-IOV mode, continued nesting of SR-IOVs is generally not supported. It should be noted that different CPU architectures have different supporting capabilities for SR-IOV, and if SR-IOV is not supported in a specific architecture, the test cannot be executed.
And 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, socket number, NUMA Node number, main frequency, cache size), memory information, PCIe information, network card information, operating system information, software package information, etc. The test result is used for test, check and analysis, test report and backup and problem investigation.
According to the embodiment of the invention, according to different test types, the test results of all the test units are classified and summarized in the form of tables and charts, and a test report is automatically output.
The second embodiment of the invention provides a network card performance test method, which comprises the following steps: analyzing the test configuration parameters, and determining a result storage catalog of the test result according to the analysis result, login information of the target equipment, and the model, state and test type of the network card to be tested; 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 subjected to test configuration based on the system information, in the target equipment subjected to test configuration, performance test is performed on the network card to be tested based on test topology information and the test configuration parameters determined by the test configuration, so that a test result is obtained; 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 opened, the consistent result output is provided for different hardware platforms and operating systems through the standardized test model and the result collection rule, and a trusted, traceable and comparable test result is provided for development, test and support or other related personnel, so that the performance of equipment, drive, 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 device according to a third embodiment of the present invention, where the device may be suitable for situations where automatic testing of a network card is required, so as to reduce the complexity of testing and improve the testing efficiency and quality. The apparatus may be implemented in 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:
a login module 410, configured to parse the test configuration parameter, and login the target device with the network card to be tested inserted based on the parsing result;
the detection module 420 is configured to detect the target device and determine system information of the target device;
and the test module 430 is configured to perform a performance test on the network card to be tested based on the test topology information and the test configuration parameters determined by the test configuration in the target device after the test configuration is performed on the target device based on the system information, so as to obtain a test result.
The network card performance test device provided by the embodiment analyzes the test configuration parameters, and logs 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 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 the test topology information and the test configuration parameters determined by the test configuration to obtain a test result. According to the technical scheme, after the target equipment inserted with the network card to be tested is logged in based on the analysis result obtained by analyzing the test configuration parameters, the target equipment is tested and configured according to the system information of the target equipment, the network card to be tested is automatically tested in the tested and configured target equipment based on the test topology information and the test configuration parameters of the network card to be tested, the test result is obtained, and according to the system information and the test requirement of the target equipment, the performance of the network card to be tested can be automatically tested without expensive network test instruments, the test complexity is reduced, and the test efficiency and the test quality are improved.
Based on the above embodiment, the login module 410 is specifically configured to:
analyzing the test configuration parameters, determining a result storage catalog of the test result according to the analysis result, and determining login information of the target equipment, the model, the state and the test type of the network card to be tested; logging in the target equipment based on the login information of the target equipment.
In one embodiment, determining a result preservation list of the test result according to the analysis result includes:
multiplexing the result save directory to save the test result based on the result save directory if the result save directory exists;
if the result saving directory does not exist, the result saving directory and related subdirectories are created, and the system information and the test topology information are initialized.
Based on the above embodiment, the test 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 the test topology information of the network card to be tested;
Invoking the test tool in the target device subjected to test configuration according to the test type contained in the test configuration parameters, wherein the test type comprises at least one of an Ethernet test, an RDMA test, a DPDK test and an 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 test tool according to the test command determined by the test topology information determined by the test configuration, and collecting the test result.
On the basis of the above embodiment, the device 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 test device, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be realized; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Example IV
Fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. Fig. 5 shows a block diagram of an exemplary electronic device 5 suitable for use in implementing embodiments of the invention. The electronic device 5 shown in fig. 5 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
As shown in fig. 5, the electronic device 5 is 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, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include 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 can be any available media that is accessible by the electronic device 5 and includes both volatile and non-volatile 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 or write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard disk drive"). Although not shown in fig. 5, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, 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 or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 5 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the electronic device 5, and/or 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 occur through an input/output (I/O) interface 22. Also, the electronic device 5 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through the network adapter 20. As shown in fig. 5, the network adapter 20 communicates with 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 connection with the electronic device 5, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and page displays by running programs stored in the system memory 28, for example, implementing the network card performance test method provided in the present embodiment, 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 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 the test topology information and the test configuration parameters determined by the test configuration to obtain a test result.
Of course, those skilled in the art will understand that the processor may also implement the technical solution of the network card performance test method provided by any embodiment of the present invention.
Example five
A fifth embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a network card performance test method provided by, for example, the present embodiment, the method 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 and test topology information of the network card to be tested;
and 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 the test topology information and the test configuration parameters determined by the test configuration to obtain a test result.
The computer storage media of embodiments of the invention may take the form of 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 a combination of any of the foregoing. 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 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.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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 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 ++ and 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 case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
It will be appreciated by those of ordinary skill in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed over a network of computing devices, or they may alternatively be implemented in program code executable by a computer device, such that they are stored in a memory device and executed by the computing device, or they may be separately fabricated as individual integrated circuit modules, or multiple modules or steps within them may be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described 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, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (10)

1. The network card performance test method is characterized by comprising the following steps of:
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 subjected to test configuration based on the system information, in the target equipment subjected to test configuration, performance test is performed on the network card to be tested based on test topology information and the test configuration parameters determined by the test configuration, so that a test result is obtained;
And in the target device subjected to test configuration, performing performance test on the network card to be tested based on the test topology information and the test configuration parameters determined by the test configuration to obtain a test result, wherein the performance test method comprises the following steps of:
in the target equipment subjected to test configuration, taking the group of the network cards to be tested as a unit, and carrying out performance test on test cases in test types supported by the target equipment by sequentially executing network ports in each group of the network cards to be tested on the basis of the test topology information and the test configuration parameters determined by the test configuration to obtain a test result; and determining the test type according to the system information and the test configuration parameters.
2. The network card performance test method according to claim 1, wherein analyzing the test configuration parameters and logging in the target device in which the network card to be tested is inserted based on the analysis result parameters, comprises:
analyzing the test configuration parameters, determining a result storage catalog of the test result according to the analysis result, and determining login information of the target equipment, the model, the state and the test type of the network card to be tested;
logging in the target equipment based on the login information of the target equipment.
3. The network card performance test method according to claim 2, wherein determining a result save directory of the test result according to the analysis result comprises:
multiplexing the result save directory to save the test result based on the result save directory if the result save directory exists;
if the result saving directory does not exist, the result saving directory and related subdirectories are created, and the system information and the test topology information are initialized.
4. The network card performance test method according to claim 2, wherein 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.
5. The network card performance test method according to claim 4, wherein performing performance test on the network card to be tested based on the test topology information and the test configuration parameters determined by the test configuration to obtain a test result, includes:
Invoking the test tool according to the test type contained in the test configuration parameters, wherein the test type comprises at least one of an Ethernet test, an RDMA test, a DPDK test and an 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 network card performance test method according to claim 5, further comprising, before the test command determined according to the test topology information is based on the test tool to test the network card under test and the test result is collected:
and 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.
7. The network card performance test method according to claim 1, wherein after performing performance test on the network card to be tested based on the test topology information and the test configuration parameters determined by the test configuration, obtaining a test result, further comprising:
and collecting and analyzing the test result to obtain a test report.
8. A network card performance testing apparatus, 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;
the test module is used for performing test configuration on the target equipment based on the system information, and then performing performance test on the network card to be tested based on the test topology information and the test configuration parameters determined by the test configuration in the target equipment subjected to the test configuration to obtain a test result;
the test module is further configured to perform performance test on test cases in a test type supported by the target device in the target device after the test configuration, with the group of the network cards to be tested as a unit, based on the test topology information and the test configuration parameters determined by the test configuration, to sequentially execute the test cases in the test type supported by the target device on the network ports in each group of the network cards to be tested, so as to obtain the test result; and determining the test type according to the system information and the test configuration parameters.
9. An electronic device, the device comprising:
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 to enable the at least one processor to perform the network card performance test method of any one of claims 1-7.
10. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the network card performance test method of any one of claims 1-7.
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 CN114629831A (en) 2022-06-14
CN114629831B true 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)

Families Citing this family (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

Also Published As

Publication number Publication date
CN114629831A (en) 2022-06-14

Similar Documents

Publication Publication Date Title
US11321122B2 (en) Method, apparatus, device and medium for processing topological relation of tasks
CN108537543B (en) Parallel processing method, device, equipment and storage medium for blockchain data
CN108768730B (en) Method and device for operating intelligent network card
US8224957B2 (en) Migrating virtual machines among networked servers upon detection of degrading network link operation
US9331899B2 (en) Scalable BMC management stacks using virtual networks on single physical network device
CN105868149B (en) Serial port information transmission method and device
US8572625B2 (en) Method and system for application migration using per-application persistent configuration dependency
US8694992B2 (en) Traversing memory structures to parse guest operating system instrumentation information in a hypervisor
US11256590B1 (en) Agent profiler to monitor activities and performance of software agents
CN109672722B (en) Data deployment method and device, computer storage medium and electronic equipment
KR102262395B1 (en) Test apparatus to test interoperability of nfv system
WO2022127196A1 (en) Application identification method and apparatus, and device and storage medium
CN112162927A (en) Test method, medium and device of cloud computing platform and computing equipment
CN114629831B (en) Network card performance test method, device, equipment and storage medium
US11409759B2 (en) Data dump formatting utilizing dynamically created control structures
US9575781B1 (en) Automatic determination of a virtual machine's dependencies on storage virtualization
US8244891B2 (en) Simulating a large number of users
CN112506772B (en) Web automatic test method, device, electronic equipment and storage medium
JP6992697B2 (en) Network system, information acquisition device, information acquisition method and program
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
CN112416509B (en) Virtual machine control system and related equipment
US20210019210A1 (en) System and method of eliminating operational problem of services in a data transmission network containing virtual machines

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