RFC2544 throughput performance test method, system, equipment and medium
Through the multiple iterative testing methods of the DPDK pktgen framework, the problems of expensive and insufficient performance of existing tools are solved, accurate RFC2544 throughput measurement of network equipment is achieved, and test accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202111589955.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-12-23
AI Technical Summary
Existing network testing tools are expensive and resource-constrained when conducting RFC2544 throughput testing, and common packet playback software cannot customize packets, has insufficient packet sending performance, and cannot automatically and iteratively test the true throughput of network devices.
Based on the DPDK pktgen message sending framework, by loading the pre-configured configuration file, parsing the configuration parameters, generating network messages and test operating parameters, multiple iterative tests of the device under test are implemented, and the packet loss rate and throughput are calculated and displayed. , automatically adjust the throughput of the next test until the configured upper limit of iterations is reached.
The accuracy and efficiency of the RFC2544 throughput test are improved, and traffic with specified concurrency, quintuple and throughput can be sent on ordinary PCs and 10G network cards to achieve accurate throughput measurement of the device under test.
Smart Images

Figure CN114363217B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network equipment testing, and in particular to an RFC2544 throughput performance testing method, system, equipment and medium. Background Art
[0002] Web RFC2544 protocol is an international standard proposed by the RFC organization for evaluating network interconnection equipment. RFC2544 specifies many parameters for testing different network devices, mainly throughput, packet loss rate, latency, back-to-back, etc. As a gateway security intercommunication device (such as a firewall, etc.), throughput is a very important performance indicator. In order to meet the throughput requirements, a lot of throughput optimization work needs to be done. Therefore, a more reliable traffic sending tool is needed that can send network messages with specified five-tuples, number of concurrent connections, and throughput.
[0003] Currently, commonly used network testing tools include TestCenter and Ixia, which can be used to test RFC2544 throughput. Since these devices are relatively expensive, the use of such resources is relatively tight. In addition, some common packet playback software can only play back the captured .pcap files, cannot customize the messages, and the message sending performance is also seriously insufficient.
[0004] Pktgen (Packet Generator) is a software framework based on DPDK. It can send packets at line speed, provide runtime management, real-time port measurement, and configure the five-tuple of packets. It can meet the throughput requirements of RFC2544 to a certain extent, but it cannot automatically test the actual throughput of network devices through multiple iterations like TestCenter. Summary of the invention
[0005] The main purpose of the present invention is to provide an RFC2544 throughput performance testing method, system, device and medium, which aims to automatically perform multiple iterations of testing based on the DPDK pktgen message sending framework, and obtain a more accurate RFC2544 throughput of the device under test, thereby improving the test accuracy.
[0006] To achieve the above object, the present invention provides a RFC2544 throughput performance testing method, the method comprising the following steps:
[0007] Load a pre-configured profile;
[0008] Parsing the configuration file to obtain configuration parameters;
[0009] Generate corresponding network messages according to the configuration parameters, and calculate test operation parameters according to the configuration parameters;
[0010] Based on the network message and the test operation parameters, multiple iteration tests are performed on the device under test to obtain the RFC2544 throughput of the device under test.
[0011] Optionally, the step of performing multiple iteration tests on the device under test based on the network message and the test operation parameters to obtain the RFC2544 throughput of the device under test includes:
[0012] S1, start this iteration test, during the test, send and receive the network messages, count the number of sent messages, the number of received messages, calculate the packet loss rate and the average throughput, and display them on the interactive interface;
[0013] S2, after the deadline of this iteration test arrives, the message sending and receiving operation is terminated, the packet loss rate and average throughput of this iteration test are calculated, and displayed on the interactive interface;
[0014] S3, at the end of this iteration test, the throughput of the next iteration test is calculated according to the packet loss rate obtained by the test and the packet loss rate allowed by the configuration parameters, and the process returns to step S1 and repeats in sequence until the configured upper limit of the number of iterations is reached.
[0015] Optionally, the RFC2544 throughput performance test method is implemented based on a DPDK pktgen test tool, and after the step of loading a pre-configured configuration file, the step further includes:
[0016] Initialize the DPDK pktgen test tool, wherein the throughput upper limit bpsHigh=1 and the throughput lower limit bpsLow=0 determined in the initial stage;
[0017] Initialize the message sending thread and the message receiving thread;
[0018] The steps of starting this iteration test, sending and receiving the network messages, counting the number of sent messages and the number of received messages, calculating the packet loss rate and the average throughput, and displaying them on the interactive interface during the test process include:
[0019] Start this iteration test. During the test, record the number of messages sent by each message sending thread, record the number of messages received by each message receiving thread, periodically calculate the number of lost packets, and display the total number of sent messages, the total number of received messages, and the total number of lost packets on the interactive interface until the running time of this iteration test ends;
[0020] The number of packet losses, the packet loss rate and the average throughput are calculated according to the total number of sent messages and the total number of received messages.
[0021] Optionally, the step of calculating the throughput of the next iterative test according to the packet loss rate obtained by the test and the packet loss rate allowed by the configuration parameters at the end of the current iterative test in S3, returning to execute step S1, and looping in sequence until the configured upper limit of the number of iterations is reached includes:
[0022] At the end of this iteration test, the throughput upper limit bpsHigh and the throughput lower limit bpsLow are updated according to the packet loss rate of this iteration test and the packet loss rate allowed by the configuration parameters, where:
[0023] If the packet loss rate of this iteration test is less than the allowed packet loss rate, the test passes, the throughput upper limit bpsHigh remains unchanged, and the throughput lower limit bpsLow is updated to the throughput bpsCur of this iteration test;
[0024] If the packet loss rate of this iteration test is greater than or equal to the allowed packet loss rate, the test fails, the lower limit of throughput bpsLow remains unchanged, and the upper limit of throughput bpsHigh is updated to the throughput bpsCur of this test. The next iteration test is performed until the limit of the number of configuration parameter iterations is reached;
[0025] The throughput of this iteration test is bpsCur = (bpsHigh + bpsLow) / 2. The actual throughput is bpsCur * 2 * network card line speed (for example, the maximum throughput of a 10 Gigabit network card is 20 Gbps).
[0026] Optionally, the method further comprises:
[0027] The RFC2544 throughput of the device under test obtained from the test is analyzed and displayed on an interactive interface.
[0028] Optionally, before the step of loading a pre-configured configuration file, the step further includes:
[0029] The configuration file is configured, wherein the configuration parameters involved in the configuration file include at least: an allowed packet loss rate, a number of concurrent connections, a message length, a message quintuple, and a duration of each iteration test.
[0030] Optionally, the step of generating a corresponding network message according to the configuration parameters, and calculating a test operation parameter according to the configuration parameters includes:
[0031] Generate the required UDP message according to the number of concurrent connections, message quintuple, and message length in the configuration parameters;
[0032] According to the number of message connections Ncon and the range of changes in the message quintuple, select Ncon source IP address, source port, destination IP address, and destination port information pairs;
[0033] After determining the five-tuple of Ncon sessions, a forward message and a reverse message are generated;
[0034] Determine the operation parameters related to the current iteration test, wherein the operation parameters include throughput.
[0035] In addition, an embodiment of the present invention further provides a network device throughput performance test system, the network device throughput performance test system comprising: a service module, and a control module interacting with the service module;
[0036] The business module is used to receive or send messages from the network card, manage message sending threads, message receiving threads, and perform data statistical analysis;
[0037] The control module is used to load a pre-configured configuration file; parse the configuration file to obtain configuration parameters; generate corresponding network messages according to the configuration parameters, and calculate test operation parameters according to the configuration parameters; based on the network messages and test operation parameters, perform multiple iterative tests on the device under test to obtain the RFC2544 throughput of the device under test.
[0038] In addition, an embodiment of the present invention also proposes a terminal device, which includes a memory, a processor, and a network device throughput performance test program stored in the memory and executable on the processor, wherein the network device throughput performance test program, when executed by the processor, implements the steps of the RFC2544 throughput performance test method as described above.
[0039] In addition, an embodiment of the present invention further proposes a computer-readable storage medium, on which a network device throughput performance test program is stored. When the network device throughput performance test program is executed by a processor, the steps of the RFC2544 throughput performance test method described above are implemented.
[0040] An RFC2544 throughput performance test method, system, device and medium proposed in an embodiment of the present invention are implemented based on a DPDK pktgen test tool, by loading a pre-configured configuration file; parsing the configuration file to obtain configuration parameters; generating corresponding network messages according to the configuration parameters, and calculating test operation parameters according to the configuration parameters; performing multiple iterative tests on a device under test based on the network messages and the test operation parameters to obtain the RFC2544 throughput of the device under test, and automatically performing multiple iterative tests on the basis of using a DPDK pktgen message sending framework to obtain a relatively accurate RFC2544 throughput of the device under test, thereby improving test accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a schematic diagram of the functional modules of the terminal device belonging to the network device throughput performance test system of the present invention;
[0042] Figure 2 It is a schematic diagram of the architecture of the network device throughput performance testing system of the present invention;
[0043] Figure 3 A flow chart of an exemplary embodiment of a method for testing RFC2544 throughput performance according to the present invention;
[0044] Figure 4 It is a schematic diagram of the processing flow of the test tool based on DPDK pktgen of the present invention;
[0045] Figure 5 The figure is a schematic diagram of a process of calculating the throughput of the next iteration in an embodiment of the present invention.
[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0048] The main solution of the embodiment of the present invention is: based on the DPDK pktgen test tool, by loading a pre-configured configuration file; parsing the configuration file to obtain configuration parameters; generating corresponding network messages according to the configuration parameters, and calculating test operating parameters according to the configuration parameters; based on the network messages and the test operating parameters, performing multiple iterative tests on the device under test to obtain the RFC2544 throughput of the device under test, and based on the use of the DPDKpktgen message sending framework, it is possible to automatically perform multiple iterative tests to obtain a more accurate RFC2544 throughput of the device under test, thereby improving the test accuracy.
[0049] Technical terms involved in the embodiments of the present invention:
[0050] RFC 2544 protocol: The full name of RFC is Request for comment. It is a series of documents that include international standards for the Internet. RFC 2544 is a standard for testing and measuring the performance of network equipment. The standard was established in 1999. RFC 2544 specifies the test language and test steps that testers need to use during the test process. Testers must strictly follow the steps specified in RFC 2544 to perform tests. RFC 2544 also provides standard performance results. By comparing the performance parameters of the equipment with the RFC standard, users can easily compare the advantages and disadvantages of equipment from different manufacturers.
[0051] RFC 2544 includes six tests on network device parameters, through which the performance of network devices in the real world can be evaluated. These tests are also called out-of-service tests, which do not use real business traffic during the test, but use traffic with specific characteristics generated by the tester.
[0052] The ideal device to implement this series of tests is a test device with a transmit port and a receive port. Traffic is sent from the packetizer to the DUT and then returned from the DUT to the packetizer. By checking the sequence number of the frame sent by the test device, the tester can determine whether all packets were successfully sent and all correct packets were successfully returned to the test device.
[0053] DPDK (Data Plane Development Kit) was developed by 6WIND, Intel and other companies. It mainly runs on the Linux system. It is a collection of function libraries and drivers for fast data packet processing. It can greatly improve data processing performance and throughput, and improve the work efficiency of data plane applications.
[0054] Pktgen, short for packet generator, is a software framework based on DPDK. It can send packets at line speed. It provides runtime management and real-time port measurement. It can control UDP, TCP, ARP, ICMP, GRE, MPLS and Queue-in-Queue packets, and can be remotely controlled via TCP.
[0055] TestCenter is a powerful test management tool that implements process management of test cases.
[0056] Commonly used network testing tools in the prior art include TestCenter, Ixia, etc., which can be used to test RFC2544 throughput. However, these devices are relatively expensive, and the use of such resources is relatively tight. Some other common packet playback software can only play back the captured .pcap files, cannot customize the messages, and the message sending performance is also seriously insufficient. Although Pktgen can send packets at line speed, provides runtime management, real-time port measurement, and can configure the five-tuple of the message, it can meet the RFC2544 throughput requirements to a certain extent, but it cannot automatically test the real throughput of the network device through multiple iterations like TestCenter.
[0057] The embodiment of the present invention provides a solution. Based on the use of the DPDK pktgen message sending framework, multiple iterations of testing can be automatically performed to obtain a relatively accurate RFC2544 throughput of the device under test, thereby improving the test accuracy.
[0058] Specifically, refer to Figure 1 , Figure 1 The functional module diagram of the terminal device to which the network device throughput performance test system of the present invention belongs. The network device throughput performance test system can be a device that is independent of the terminal device and can perform network device testing, such as a test tool based on DPDK pktgen, which can also be carried on the terminal device in the form of hardware or software. The terminal device can be a fixed terminal device such as a PC with data processing function or a server, etc.
[0059] In this embodiment, the terminal device of the network device throughput performance test system includes at least an output module 110 , a processor 120 , a memory 130 and a communication module 140 .
[0060] The memory 130 stores an operating system and a network device throughput performance test program; the output module 110 may be a display screen, etc. The communication module 140 may include a Gigabit network card, a 10 Gigabit network card, etc., and communicates with an external device or server through the communication module 140.
[0061] When the network device throughput performance test program in the memory 130 is executed by the processor, the following steps are implemented:
[0062] Load a pre-configured profile;
[0063] Parsing the configuration file to obtain configuration parameters;
[0064] Generate corresponding network messages according to the configuration parameters, and calculate test operation parameters according to the configuration parameters;
[0065] Based on the network message and the test operation parameters, multiple iteration tests are performed on the device under test to obtain the RFC2544 throughput of the device under test.
[0066] Furthermore, when the network device throughput performance test program in the memory 130 is executed by the processor, the following steps are also implemented:
[0067] S1, start this iteration test, during the test, send and receive the network messages, count the number of sent messages, the number of received messages, calculate the packet loss rate and the average throughput, and display them on the interactive interface;
[0068] S2, after the deadline of this iteration test arrives, the message sending and receiving operation is terminated, the packet loss rate and average throughput of this iteration test are calculated, and displayed on the interactive interface;
[0069] S3, at the end of this iteration test, the throughput of the next iteration test is calculated according to the packet loss rate obtained by the test and the packet loss rate allowed by the configuration parameters, and the process returns to step S1 and repeats in sequence until the configured upper limit of the number of iterations is reached.
[0070] Furthermore, when the network device throughput performance test program in the memory 130 is executed by the processor, the following steps are also implemented:
[0071] Also after the step of loading the pre-configured configuration file:
[0072] Initialize the DPDK pktgen test tool, wherein the throughput upper limit bpsHigh=1 and the throughput lower limit bpsLow=0 determined in the initial stage;
[0073] Initialize the message sending thread and the message receiving thread;
[0074] The steps of starting this iteration test, sending and receiving the network messages, counting the number of sent messages and the number of received messages, calculating the packet loss rate and the average throughput, and displaying them on the interactive interface during the test process include:
[0075] Start this iteration test. During the test, record the number of messages sent by each message sending thread, record the number of messages received by each message receiving thread, periodically calculate the number of lost packets, and display the total number of sent messages, the total number of received messages, and the total number of lost packets on the interactive interface until the running time of this iteration test ends;
[0076] The number of packet losses, the packet loss rate and the average throughput are calculated according to the total number of sent messages and the total number of received messages.
[0077] Furthermore, when the network device throughput performance test program in the memory 130 is executed by the processor, the following steps are also implemented:
[0078] At the end of this iteration test, the throughput upper limit bpsHigh and the throughput lower limit bpsLow are updated according to the packet loss rate of this iteration test and the packet loss rate allowed by the configuration parameters, where:
[0079] If the packet loss rate of this iteration test is less than the allowed packet loss rate, the test passes, the throughput upper limit bpsHigh remains unchanged, and the throughput lower limit bpsLow is updated to the throughput bpsCur of this iteration test;
[0080] If the packet loss rate of this iteration test is greater than or equal to the allowed packet loss rate, the test fails, the lower limit of throughput bpsLow remains unchanged, and the upper limit of throughput bpsHigh is updated to the throughput bpsCur of this test. The next iteration test is performed until the limit of the number of configuration parameter iterations is reached;
[0081] The throughput of this iteration test is bpsCur = (bpsHigh + bpsLow) / 2. The actual throughput is bpsCur * 2 * network card line speed (for example, the maximum throughput of a 10 Gigabit network card is 20 Gbps).
[0082] Furthermore, when the network device throughput performance test program in the memory 130 is executed by the processor, the following steps are also implemented:
[0083] The RFC2544 throughput of the device under test obtained from the test is analyzed and displayed on an interactive interface.
[0084] Furthermore, when the network device throughput performance test program in the memory 130 is executed by the processor, the following steps are also implemented:
[0085] The configuration file is configured, wherein the configuration parameters involved in the configuration file include at least: an allowed packet loss rate, a number of concurrent connections, a message length, a message quintuple, and a duration of each iteration test.
[0086] Furthermore, when the network device throughput performance test program in the memory 130 is executed by the processor, the following steps are also implemented:
[0087] Generate the required UDP message according to the number of concurrent connections, message quintuple, and message length in the configuration parameters;
[0088] According to the number of message connections Ncon and the range of changes in the message quintuple, select Ncon source IP address, source port, destination IP address, and destination port information pairs;
[0089] After determining the five-tuple of Ncon sessions, a forward message and a reverse message are generated;
[0090] Determine the operation parameters related to the current iteration test, wherein the operation parameters include throughput.
[0091] This embodiment is implemented based on the DPDK pktgen test tool through the above scheme, by loading a pre-configured configuration file; parsing the configuration file to obtain configuration parameters; generating corresponding network messages according to the configuration parameters, and calculating test operating parameters according to the configuration parameters; based on the network messages and the test operating parameters, performing multiple iterative tests on the device under test to obtain the RFC2544 throughput of the device under test, and based on the use of the DPDK pktgen message sending framework, it can automatically perform multiple iterative tests to obtain a more accurate RFC2544 throughput of the device under test, thereby improving the test accuracy.
[0092] Reference Figure 2 , Figure 2 The figure is a schematic diagram of the system architecture involved in the RFC2544 throughput performance testing method embodiment of the present invention.
[0093] like Figure 2 As shown, an embodiment of the present invention provides a network device throughput performance test system, the network device throughput performance test system comprising: a service module, and a control module interacting with the service module;
[0094] The business module is used to receive / send messages from the network card, manage message sending threads, message receiving threads, and perform data statistical analysis. The business module may include a statistical analysis module;
[0095] The control module is used to load a pre-configured configuration file; parse the configuration file to obtain configuration parameters; generate corresponding network messages according to the configuration parameters, and calculate test operation parameters according to the configuration parameters; based on the network messages and test operation parameters, perform multiple iterative tests on the device under test to obtain the RFC2544 throughput of the device under test.
[0096] Specifically, combined Figure 2 As shown, the system of the present invention implements an RFC2544 throughput test tool based on DPDK pktgen. The system is based on the DPDK development kit, adds configuration files and control modules on the basis of the original Pktgen, and enriches the statistical analysis module. Among them:
[0097] The configuration file may configure the allowed packet loss rate, number of concurrent connections, message length, message quintuple, etc.
[0098] The control module can perform multiple iteration tests according to the configuration parameters and the data provided by the statistical analysis module and obtain a relatively accurate RC2544 throughput, mainly being able to intelligently determine the throughput and other operating parameters of the next iteration test.
[0099] The service module mainly includes a message sending thread, a message receiving thread, a statistical analysis module, etc. The statistical analysis module mainly counts the total number of sent messages, the total number of received messages, the total number of lost packets, the packet loss rate, etc. of each iteration test.
[0100] The system is also configured with an interactive interface, which uses the original interface of Pktgen, and adds the display of real-time packet loss rate, throughput, and statistical information of each iteration, including actual throughput, number of packet losses, packet loss rate, etc. The embodiment of the present invention adds a control module based on the DPDK high performance, message construction, message sending and receiving, interactive interface, etc. of the DPDK pktgen message sending framework, which can automatically perform multiple iteration tests to obtain a more accurate RFC2544 throughput of the device under test. Only an ordinary PC and a 10 Gigabit network card are needed to send traffic with a specified number of concurrent connections, five-tuples, and throughput.
[0101] Based on the above terminal device architecture and system architecture but not limited to the above architecture, an embodiment of the method of the present invention is proposed.
[0102] The execution subject of the method of this embodiment may be a network device throughput performance test system or terminal device, or a test tool based on DPDK pktgen, etc. This embodiment takes a test tool based on DPDKpktgen as an example.
[0103] Reference Figure 3 , Figure 3 The figure is a flow chart of an exemplary embodiment of the RFC2544 throughput performance test method of the present invention. The RFC2544 throughput performance test method comprises the following steps:
[0104] Step S101, loading a pre-configured configuration file;
[0105] Specifically, as an implementation method, the RFC2544 throughput performance test method can be implemented based on the DPDKpktgen test tool. The system architecture of the test tool can refer to Figure 2 shown.
[0106] This embodiment is pre-configured with a configuration file to set basic parameters for this iteration test. The configuration parameters involved in the configuration file include at least: allowed packet loss rate, number of concurrent connections, message length, message quintuple, duration of each iteration test, etc. Specifically, the configuration parameters involved in the configuration file may be as follows:
[0107] concurrence=128#Number of concurrent connections;
[0108] packet_size=512# message length;
[0109] duration=30 #The duration of each iteration test, in seconds;
[0110] drop_rate=0.01% # allowed packet loss rate;
[0111] src_mac_client=10:7b:44:7c:ed:e9#Source MAC address of the message sent by network card 1;
[0112] dst_mac_client=20:7b:44:7c:ed:e9#Destination MAC address of the message sent by network card 1;
[0113] src_mac_server=F0:FF:ba:6a:fd:3d#Source MAC address of the message sent by network card 2;
[0114] dst_mac_server=F0:FE:ba:6a:fd:3d#Destination MAC address of the message sent by network card 2;
[0115] src_ip=10.0.0.1:100.255.255.254#The source IP address range of each session;
[0116] src_port=10000:30000#The source port range of each session;
[0117] dst_ip=110.0.0.1:200.255.255.254#The range of the destination IP address of each session;
[0118] dst_port=40000:60000#The range of the destination port for each session:
[0119] Before performing this iterative test, the configuration configuration file needs to be loaded first so as to parse the configuration file and obtain the configuration parameters.
[0120] Furthermore, after the step of loading the pre-configured configuration file, the following scheme may also be included:
[0121] Initialize the DPDK pktgen test tool, wherein the throughput upper limit bpsHigh=1 and the throughput lower limit bpsLow=0 determined in the initial stage;
[0122] Initialize the message sending thread and the message receiving thread.
[0123] Step S102, parsing the configuration file to obtain configuration parameters;
[0124] The configuration file is parsed to obtain configuration parameters such as the allowed packet loss rate, the number of concurrent connections, the message length, and the message quintuple.
[0125] Step S103, generating corresponding network messages according to the configuration parameters, and calculating test operation parameters according to the configuration parameters;
[0126] Generate a corresponding network message according to the configuration parameters, specifically including:
[0127] Generate the required UDP message according to the number of concurrent connections, message five-tuple, message length, etc. in the configuration parameters. Select Ncon source IP address, source port, destination IP address, destination port information pairs according to the number of message connections Ncon and the range of the message five-tuple. These information pairs only need to be non-repetitive. Generally, the selected IP addresses and ports are different. After determining the five-tuple of Ncon sessions, generate forward messages and reverse messages.
[0128] The test operation parameters are calculated according to the configuration parameters, specifically including:
[0129] The operation parameters related to this iteration test are determined according to the configuration parameters, mainly the throughput. Other parameters (such as the allowed packet loss rate and the running time) are determined in the configuration file. The calculation method is as follows:
[0130] The throughput of this iteration test is bpsCur = (bpsHigh + bpsLow) / 2;
[0131] The actual throughput is bpsCur*2*network card line speed;
[0132] Physical message length = message length + frame check sequence length + preamble length;
[0133] Number of packets sent per second = throughput of this iteration test bpsCur*2*network card line speed / physical packet length.
[0134] Step S104: Based on the network message and the test operation parameters, multiple iteration tests are performed on the device under test to obtain the RFC2544 throughput of the device under test.
[0135] Specifically, the step of performing multiple iteration tests on the device under test based on the network message and the test operation parameters to obtain the RFC2544 throughput of the device under test may include:
[0136] S1, start this iteration test, during the test, send and receive the network messages, count the number of sent messages, the number of received messages, calculate the packet loss rate and the average throughput, and display them on the interactive interface;
[0137] As an implementation method, this iterative test is started. During the test, the number of messages that have been sent by each message sending thread is recorded, the number of messages that have been received by each message receiving thread is recorded, the number of packet losses is periodically calculated, and the total number of message sending, the total number of message receiving, and the total number of packet losses are displayed on the interactive interface until the running time of this iterative test ends;
[0138] The number of packet losses, the packet loss rate and the average throughput are calculated according to the total number of sent messages and the total number of received messages.
[0139] More specifically, this iteration test is started. During the test, network messages are sent and received. This embodiment uses the existing message sending and receiving thread of pktgen. Each message sent is a message that has been constructed in the above process. In addition, this embodiment adds a global variable to record the number of messages sent by each message sending thread, the number of messages received by each message receiving thread, and the number of packet losses periodically. The total number of messages sent, the total number of messages received, and the total number of packet losses are displayed on the interactive interface until the running time of this iteration test ends.
[0140] After the current iteration is finished, a delay of 1 second can be set (considering that some packets may have been sent but have not yet reached the receiving network card, a delay is set. The delay time can be set). According to the total number of sent packets and the total number of received packets, the number of lost packets, the packet loss rate, and the average throughput are calculated. In addition, a unique startup command is added.
[0141] Among them, the startup command adds the auto field at the end of the original command to distinguish it from the original Pktgen command.
[0142] Among them, the number of lost packets = the total number of sent messages - the total number of received messages;
[0143] Packet loss rate = 100*(total number of messages sent - total number of messages received) / total number of messages sent;
[0144] Average throughput = total number of received messages * physical message length / running time;
[0145] Test start command: start 0,1auto.
[0146] S2, after the deadline of this iteration test arrives, the message sending and receiving operation is terminated, the packet loss rate and average throughput of this iteration test are calculated, and displayed on the interactive interface;
[0147] After the deadline of this iteration test arrives, the message sending and receiving operations are terminated, and the statistical data of this iteration is displayed on the interactive interface, including the total number of messages sent, the total number of messages received, the calculated number of lost packets, the packet loss rate, and the average throughput.
[0148] S3, at the end of this iteration test, the throughput of the next iteration test is calculated according to the packet loss rate obtained by the test and the packet loss rate allowed by the configuration parameters, and the process returns to step S1 and repeats in sequence until the configured upper limit of the number of iterations is reached.
[0149] At the end of this iteration test, the throughput of the next iteration test is calculated based on the packet loss rate obtained in the test and the packet loss rate allowed by the configuration parameters.
[0150] Specifically, as an implementation mode, at the end of this iteration test, the throughput upper limit bpsHigh and the throughput lower limit bpsLow are updated according to the packet loss rate of this iteration test and the packet loss rate allowed by the configuration.
[0151] Among them: If the packet loss rate of this iteration test is less than the allowed packet loss rate, this test passes, the throughput upper limit bpsHigh remains unchanged, and the throughput lower limit bpsLow is updated to the throughput bpsCur of this test; if the packet loss rate of this iteration test is greater than or equal to the allowed packet loss rate, this test fails, the throughput lower limit bpsLow remains unchanged, and the throughput upper limit bpsHigh is updated to the throughput bpsCur of this test. Continue to execute the next iteration test until the limit of the number of configuration parameter iterations is reached. For the specific processing flow, please refer to Figure 5 shown.
[0152] The throughput of this iteration test is bpsCur=(bpsHigh+bpsLow) / 2, and the actual throughput is bpsCur*2*network card line speed (for example, the maximum throughput of a 10 Gigabit network card is 20 Gbps).
[0153] After multiple iterations of the test are completed, the final result of the test is displayed, that is, the RFC2544 throughput of the device under test. The actual throughput is bpsCur*2*network card line speed (for example, the maximum throughput of a 10 Gigabit network card is 20 Gbps).
[0154] This embodiment is implemented through the above scheme and the DPDK pktgen-based test tool, by loading a pre-configured configuration file; parsing the configuration file to obtain configuration parameters; generating corresponding network messages according to the configuration parameters, and calculating test operation parameters according to the configuration parameters; performing multiple iterative tests on the device under test based on the network messages and the test operation parameters to obtain the RFC2544 throughput of the device under test. Based on the use of the DPDK pktgen message sending framework, multiple iterative tests can be automatically performed to obtain a relatively accurate RFC2544 throughput of the device under test, thereby improving the test accuracy.
[0155] Furthermore, the method further comprises:
[0156] The RFC2544 throughput of the device under test obtained from the test is analyzed and displayed on the interactive interface. For the specific processing flow, please refer to Figure 4 shown.
[0157] The following combination Figure 4 and Figure 5 , the processing flow of the test tool based on DPDK pktgen in the embodiment of the present invention is described in detail:
[0158] like Figure 4 and Figure 5 As shown, a RFC2544 throughput test method based on DPDK Pktgen, the main processing steps of this method include:
[0159] Step 1: Modify the configuration file and set the basic parameters for this test;
[0160] Step 2: Set the pktgen command line parameters and start the operation. Load the configuration file and parse the configuration parameters; the throughput upper limit bpsHigh = 1 and the throughput lower limit bpsLow = 0 determined in the initial stage.
[0161] Step 3: Generate the required message according to the number of concurrent connections and message quintuple in the configuration parameters;
[0162] Generate the required UDP message according to the configuration parameters such as the number of concurrent connections, message five-tuple, message length, etc. Select Ncon source IP address, source port, destination IP address, destination port information pairs according to the number of message connections Ncon and the range of the message five-tuple. These information pairs only need to be non-repetitive. Generally, the selected IP addresses and ports are different. After determining the five-tuple of Ncon sessions, generate forward messages and reverse messages.
[0163] Step 4: Calculate the operating parameters (mainly throughput) of this iteration test according to the configuration file and start the test;
[0164] Determine the parameters related to this iteration test, mainly the throughput. Other parameters (allowed packet loss rate, running time) are determined in the configuration file. The calculation method is as follows:
[0165] The throughput of this iteration test is bpsCur = (bpsHigh + bpsLow) / 2; the actual throughput is bpsCur * 2 * network card line speed;
[0166] Physical message length = message length + frame check sequence length + preamble length;
[0167] Number of packets sent per second = current throughput bpsCur*network card line speed / physical packet length.
[0168] Step 5: In this iterative test phase, start the test, send and receive messages, count the number of sent messages, the number of received messages, etc., calculate the packet loss rate, average throughput, etc., and display them on the interactive interface;
[0169] Step 6: After the deadline of this iteration test arrives, the message sending and receiving has been completed, and the packet loss rate, average throughput, etc. of this iteration test are calculated and displayed on the interactive interface;
[0170] The interactive interface displays the statistics of this iteration, including the total number of packets sent, the total number of packets received, the number of calculated packet loss, the packet loss rate, and the average throughput.
[0171] Step 7: After this iteration test is completed, the throughput of the next iteration is calculated based on the packet loss rate obtained from the test and the packet loss rate in the configuration file, and step 4 is executed again, and the cycle is repeated until the configured upper limit of the number of iterations is reached. If the configured upper limit of the number of iterations is reached, step 8 is executed;
[0172] The process of calculating the throughput of the next iteration can be referred to Figure 5 shown.
[0173] Update the throughput upper limit bpsHigh and the throughput lower limit bpsLow according to the packet loss rate of this iteration test and the packet loss rate allowed by the configuration. If the packet loss rate of this iteration test is less than the allowed packet loss rate, this test passes, the throughput upper limit bpsHigh remains unchanged, and the throughput lower limit bpsLow is updated to the throughput bpsCur of this test. If the packet loss rate of this iteration test is greater than or equal to the allowed packet loss rate, this test fails, the throughput lower limit bpsLow remains unchanged, and the throughput upper limit bpsHigh is updated to the throughput bpsCur of this test. Continue to execute the next iteration test until the limit of the number of configuration parameter iterations is reached.
[0174] Step 8: Display the final test result throughput of this test.
[0175] After all the multiple iterations of the test are completed, the final result of the test is displayed, that is, the RFC2544 throughput of the device under test. The actual throughput is bpsCur*2*network card line speed (for example, the maximum throughput of a 10G network card is 20Gbps).
[0176] Among them, in step 1, the configuration parameters involved in the configuration file are as follows:
[0177] concurrence=128#Number of concurrent connections;
[0178] packet_size=512# message length;
[0179] duration=30 #The duration of each iteration test, in seconds;
[0180] drop_rate=0.01% # allowed packet loss rate;
[0181] src_mac_client=10:7b:44:7c:ed:e9#Source MAC address of the message sent by network card 1;
[0182] dst_mac_client=20:7b:44:7c:ed:e9#Destination MAC address of the message sent by network card 1;
[0183] src_mac_server=F0:FF:ba:6a:fd:3d#Source MAC address of the message sent by network card 2;
[0184] dst_mac_server=F0:FE:ba:6a:fd:3d#Destination MAC address of the message sent by network card 2;
[0185] src_ip=10.0.0.1:100.255.255.254#The source IP address range of each session;
[0186] src_port=10000:30000#The source port range of each session;
[0187] dst_ip=110.0.0.1:200.255.255.254#The range of the destination IP address of each session;
[0188] dst_port=40000:60000 #The range of the destination port for each session.
[0189] In the above step 5, the existing message sending and receiving thread of pktgen is used. Each message sent is the message that has been constructed in step 3. New global variables are added to record the number of messages sent by each message sending thread, the number of messages received by each message receiving thread, and the number of packet losses are calculated periodically. The total number of messages sent, the total number of messages received, and the total number of packet losses are displayed on the interactive interface until the running time of this iteration test ends. After the end of this iteration, there is a delay of 1 second (some messages may have been sent but have not yet reached the receiving network card). According to the total number of messages sent and the total number of messages received, the number of packet losses, packet loss rate, and average throughput are calculated. In addition, a unique startup command is added. The startup command adds the auto field at the end of the original command to distinguish the original Pktgen command.
[0190] Among them, the number of lost packets = the total number of sent messages - the total number of received messages;
[0191] Packet loss rate = 100*(total number of messages sent - total number of messages received) / total number of messages sent;
[0192] Average throughput = total number of received messages * physical message length / running time;
[0193] Test start command: start 0,1auto.
[0194] This embodiment is implemented based on the DPDK pktgen test tool through the above scheme, by loading a pre-configured configuration file; parsing the configuration file to obtain configuration parameters; generating corresponding network messages according to the configuration parameters, and calculating test operating parameters according to the configuration parameters; based on the network messages and the test operating parameters, performing multiple iterative tests on the device under test to obtain the RFC2544 throughput of the device under test, and based on the use of the DPDK pktgen message sending framework, it can automatically perform multiple iterative tests to obtain a more accurate RFC2544 throughput of the device under test, thereby improving the test accuracy.
[0195] In addition, an embodiment of the present invention also proposes a terminal device, which includes a memory, a processor, and a network device throughput performance test program stored in the memory and executable on the processor. When the network device throughput performance test program is executed by the processor, the steps of the RFC2544 throughput performance test method described in the above embodiment are implemented.
[0196] Since all the technical solutions of all the aforementioned embodiments are adopted when the network device throughput performance test program is executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.
[0197] In addition, an embodiment of the present invention further proposes a computer-readable storage medium, on which a network device throughput performance test program is stored. When the network device throughput performance test program is executed by a processor, the steps of the RFC2544 throughput performance test method described in the above embodiment are implemented.
[0198] Since all the technical solutions of all the aforementioned embodiments are adopted when the network device throughput performance test program is executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.
[0199] Compared with the prior art, an RFC2544 throughput performance test method, system, terminal device and storage medium proposed in an embodiment of the present invention are implemented based on the DPDK pktgen test tool, by loading a pre-configured configuration file; parsing the configuration file to obtain configuration parameters; generating corresponding network messages according to the configuration parameters, and calculating test operating parameters according to the configuration parameters; based on the network messages and the test operating parameters, performing multiple iterative tests on the device under test to obtain the RFC2544 throughput of the device under test, and based on the use of the DPDK pktgen message sending framework, it is possible to automatically perform multiple iterative tests to obtain a relatively accurate RFC2544 throughput of the device under test, thereby improving the test accuracy.
[0200] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0201] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0202] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to execute the method of each embodiment of the present application.
[0203] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A RFC2544 throughput performance testing method, characterized in that: The method comprises the following steps: Load a pre-configured profile; Wherein, before the step of loading the pre-configured configuration file, the step further includes: Configuring the configuration file, wherein the configuration parameters involved in the configuration file at least include: an allowed packet loss rate, a number of concurrent connections, a message length, a message quintuple, and a duration of each iteration test; The RFC2544 throughput performance test method is implemented based on the DPDK pktgen test tool, and after the step of loading the pre-configured configuration file, the following steps are further included: Initialize the DPDK pktgen test tool, wherein the throughput upper limit bpsHigh=1 and the throughput lower limit bpsLow=0 determined in the initial stage; Initialize the message sending thread and the message receiving thread; Parsing the configuration file to obtain configuration parameters; Generate corresponding network messages according to the configuration parameters, and calculate test operation parameters according to the configuration parameters; Based on the network message and the test operation parameters, performing multiple iteration tests on the device under test to obtain the RFC2544 throughput of the device under test; The step of performing multiple iteration tests on the device under test based on the network message and the test operation parameters to obtain the RFC2544 throughput of the device under test includes: S1, start this iteration test, during the test, send and receive the network messages, count the number of sent messages, the number of received messages, calculate the packet loss rate and the average throughput, and display them on the interactive interface; The steps of starting the iteration test, sending and receiving the network messages, counting the number of sent messages and the number of received messages, calculating the packet loss rate and the average throughput, and displaying them on the interactive interface during the test process include: Start this iteration test. During the test, record the number of messages sent by each message sending thread, record the number of messages received by each message receiving thread, periodically calculate the number of lost packets, and display the total number of sent messages, the total number of received messages, and the total number of lost packets on the interactive interface until the running time of this iteration test ends; The number of packet losses, the packet loss rate, and the average throughput are calculated based on the total number of sent messages and the total number of received messages. S2, after the deadline of this iteration test arrives, the message sending and receiving operation is terminated, the packet loss rate and average throughput of this iteration test are calculated, and displayed on the interactive interface; S3, at the end of this iteration test, the throughput of the next iteration test is calculated according to the packet loss rate obtained by the test and the packet loss rate allowed by the configuration parameters, and the process returns to step S1 and repeats in sequence until the configured upper limit of the number of iterations is reached; Among them, the step S3, at the end of the current iteration test, calculates the throughput of the next iteration test according to the packet loss rate obtained by the test and the packet loss rate allowed by the configuration parameters, returns to execute step S1, and loops in sequence until the configured upper limit of the number of iterations is reached, including: At the end of this iteration test, the throughput upper limit bpsHigh and the throughput lower limit bpsLow are updated according to the packet loss rate of this iteration test and the packet loss rate allowed by the configuration parameters, where: If the packet loss rate of this iteration test is less than the allowed packet loss rate, the test passes, the throughput upper limit bpsHigh remains unchanged, and the throughput lower limit bpsLow is updated to the throughput bpsCur of this iteration test; If the packet loss rate of this iteration test is greater than or equal to the allowed packet loss rate, the test fails, the lower limit of throughput bpsLow remains unchanged, and the upper limit of throughput bpsHigh is updated to the throughput bpsCur of this test. The next iteration test is performed until the limit of the number of configuration parameter iterations is reached; The throughput of this iteration test is bpsCur=(bpsHigh+bpsLow) / 2, and the actual throughput is bpsCur*2*network card line speed.
2. The method according to claim 1, characterized in that The method further comprises: The RFC2544 throughput of the device under test obtained from the test is analyzed and displayed on an interactive interface.
3. The method according to any one of claims 1 to 2, characterized in that: The steps of generating corresponding network messages according to the configuration parameters, and calculating test operation parameters according to the configuration parameters include: Generate the required UDP message according to the number of concurrent connections, message quintuple, and message length in the configuration parameters; According to the number of message connections Ncon and the range of changes in the message quintuple, select Ncon source IP address, source port, destination IP address, and destination port information pairs; After determining the five-tuple of Ncon sessions, a forward message and a reverse message are generated; Determine the operation parameters related to the current iteration test, wherein the operation parameters include throughput.
4. A network equipment throughput performance testing system, characterized in that: The network equipment throughput performance test system includes: a service module, and a control module interacting with the service module; The business module is used to receive or send messages from the network card, manage message sending threads, message receiving threads, and perform data statistical analysis; The control module is used to load a pre-configured configuration file; parse the configuration file to obtain configuration parameters; generate corresponding network messages according to the configuration parameters, and calculate test operation parameters according to the configuration parameters; perform multiple iteration tests on the device under test based on the network messages and the test operation parameters to obtain the RFC2544 throughput of the device under test; The control module is further used to configure the configuration file, and the configuration parameters involved in the configuration file include at least: allowed packet loss rate, number of concurrent connections, message length, message quintuple, and duration of each iteration test; The control module is also used to initialize the DPDK pktgen test tool, wherein the throughput upper limit bpsHigh=1 and the throughput lower limit bpsLow=0 determined in the initial stage; initialize the message sending thread and the message receiving thread; Wherein, the control module is also used for S1, starting this iteration test, during the test, sending and receiving the network message, counting the number of sent messages and the number of received messages, calculating the packet loss rate and the average throughput, and displaying them on the interactive interface; starting this iteration test, during the test, recording the number of messages that have been sent by each message sending thread, recording the number of messages that have been received by each message receiving thread, periodically calculating the number of packet losses, and displaying the total number of messages sent, the total number of messages received, and the total number of packet losses on the interactive interface until the running time of this iteration test ends; wherein, according to the total number of messages sent and the total number of messages received, the number of packet losses, the packet loss rate, and the average throughput are calculated; S2, after the deadline of this iteration test arrives, the message sending and receiving operation is terminated, the packet loss rate and the average throughput of this iteration test are calculated, and displayed on the interactive interface; S3, at the end of this iteration test, the throughput of the next iteration test is calculated according to the packet loss rate obtained by the test and the packet loss rate allowed by the configuration parameters, and the execution returns to step S1, and the cycle is repeated in sequence until the configured upper limit of the number of iterations is reached; Among them, the control module is also used to update the throughput upper limit bpsHigh and the throughput lower limit bpsLow at the end of this iterative test according to the packet loss rate of this iterative test and the packet loss rate allowed by the configuration parameters, wherein: if the packet loss rate of this iterative test is less than the allowed packet loss rate, then this test passes, the throughput upper limit bpsHigh remains unchanged, and the throughput lower limit bpsLow is updated to the throughput bpsCur of this iterative test; if the packet loss rate of this iterative test is greater than or equal to the allowed packet loss rate, then this test fails, the throughput lower limit bpsLow remains unchanged, the throughput upper limit bpsHigh is updated to the throughput bpsCur of this test, and the next iterative test is continued until the limit on the number of iterations of the configuration parameters is reached; wherein, the throughput bpsCur of this iterative test = (bpsHigh + bpsLow) / 2, and the actual throughput is bpsCur*2*network card line speed.
5. A terminal device, characterized in that: The terminal device includes a memory, a processor, and a network device throughput performance test program stored in the memory and executable on the processor. When the network device throughput performance test program is executed by the processor, the steps of the RFC2544 throughput performance test method described in any one of claims 1 to 3 are implemented.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a network device throughput performance test program, and when the network device throughput performance test program is executed by the processor, the steps of the RFC2544 throughput performance test method as described in any one of claims 1-3 are implemented.
Citation Information
Patent Citations
Method for quickly realizing maximum throughput of RFC2544 with background flow
CN106230654A
Firewall performance test method and device
CN110213135A
Method and system for testing performance of network communication equipment based on binary iteration method
CN111162963A
Forwarding equipment data test method and device, computer equipment and storage medium
CN112019407A
Interconnection network end-to-end performance monitoring method and its system
CN1400774A
