A method and tool for testing virtual network bandwidth

By using RSS scripts and the iperf3 tool to perform virtual machine network performance testing, the accuracy of bandwidth testing between virtual machines was resolved, and the comprehensiveness of test results and the effectiveness of business deployment were improved.

CN118921305BActive Publication Date: 2026-01-23SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410986903.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2026-01-23
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

Existing technologies make it difficult to comprehensively and accurately test the network performance bandwidth between virtual machines, which affects the network connection quality of cloud servers and the efficiency of business deployment.

Method used

Using RSS scripts combined with RPS and RFS technologies, single-stream and multi-stream tests were performed using the iperf3 tool. Combined with CPU affinity and packet loss rate monitoring, the average bandwidth between virtual machines was calculated.

Benefits of technology

It enables accurate testing of virtual machine network performance bandwidth, improves test results for concurrent multi-connection scenarios, helps users better understand and optimize network performance, and supports business deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921305B_ABST
    Figure CN118921305B_ABST
Patent Text Reader

Abstract

The application discloses a kind of virtual network bandwidth test method and tool, it is related to network performance test technical field, method includes: S1, enter the two machines of the virtual machine network performance test to be carried out, execute the RSS script of opening virtual machine prepared in advance;S2, test virtual machine single network connection performance;S3, carry out multi-connection bandwidth test;S4, exchange test role, calculate average bandwidth.The application can improve the result of concurrent multi-connection, can accurately and comprehensively test the value of virtual machine network performance bandwidth, so that user can start from own business, more comprehensively understand the network performance bandwidth between virtual machine, carry out tuning or service deployment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of network performance testing, in particular to a virtual network bandwidth testing method and tool. BACKGROUND

[0002] Cloud computing is a computing model based on the Internet, which allows users to access and use data and applications stored on remote servers through the network. Cloud computing brings flexibility, rapid resource expansion, reduces IT costs, and improves remote work and collaboration efficiency. Automatic data backup and recovery functions reduce the risk of data loss. Cloud services use advanced encryption techniques and security protocols to ensure data security. Rapid experimentation and deployment of new applications promote innovation. Optimizing resource use reduces energy consumption and carbon emissions, and is environmentally friendly. Strong disaster recovery capabilities ensure data and application security. Centralized management and monitoring improve IT management efficiency and effectiveness.

[0003] Cloud server network performance is a key factor affecting user experience and business efficiency. Fast and stable network connections ensure high-speed data transmission and processing, reduce latency, and improve application response speed. Good network performance also ensures service reliability and scalability, supporting user access volume during peak periods. For distributed and global businesses, cloud server network performance is the foundation for efficient data synchronization and collaboration.

[0004] Testing cloud server network performance is crucial to ensure the efficient operation of applications and services. Through network performance testing, bandwidth, latency, data transmission speed, and reliability can be evaluated. These data help businesses choose the right cloud service provider, optimize application performance, and improve user experience. Regular testing can also identify and resolve network problems in a timely manner, ensuring business continuity and stability. SUMMARY

[0005] The present application provides a virtual network bandwidth testing method and tool to scientifically test the network performance between virtual machines and deploy services based on the test results, addressing the needs and shortcomings of current technology development.

[0006] In a first aspect, the present application provides a virtual network bandwidth testing method to solve the above technical problems by adopting the following technical solutions:

[0007] A virtual network bandwidth testing method includes the following steps:

[0008] S1, enter two machines to be tested for virtual machine network performance, and execute a pre-written virtual machine RSS script;

[0009] S2, test the virtual machine single network connection performance;

[0010] S3, performing multi-connection bandwidth test;

[0011] S4, exchanging test roles and calculating average bandwidth.

[0012] Optionally, when performing step S1, the implementation of the pre-written RSS script for starting virtual machine depends on RPS and RFS technologies.

[0013] After executing the RSS script for starting virtual machine, use the ping command to test network connectivity. If not connected, check the network configuration and network settings of the virtual machine. If connected, directly configure the read / write buffer size of TCP / UDP according to actual business requirements.

[0014] Further optionally, the two machines to be tested for virtual machine network performance are referred to as client and server.

[0015] Perform step S2 to test virtual machine single network connection performance, which specifically includes:

[0016] Single flow test: run iperf3 server mode on the server to listen to connection requests from the client and respond to these requests to provide services; use iperf3 client mode on the client to initiate network requests, establish connections with the server and transmit data;

[0017] TCP and UDP bandwidth test: first test TCP bandwidth, then test UDP bandwidth; when testing UDP bandwidth, initially unlimited speed (-b 0g), if the packet loss rate is less than the set threshold, no further testing is required, if the packet loss rate exceeds the set threshold, gradually reduce the bandwidth until the packet loss rate is less than 0.5%.

[0018] Test time and CPU affinity: set the test time to more than 100 seconds to avoid the influence of slow start; use the -A parameter to bind the CPU affinity of the client and server to find the optimal CPU performance.

[0019] Further optionally, perform step S3 to perform multi-connection bandwidth test, which specifically includes:

[0020] Multi-flow test: use the -P parameter to perform multi-flow test to observe the maximum bandwidth of TCP and UDP; wherein a) for TCP, start testing from -P 8, b) for UDP, start from -P 2 and gradually increase until the bandwidth no longer increases and the packet loss rate exceeds the set threshold.

[0021] CPU usage monitoring: use the top command to monitor the CPU usage of the iperf3 process. If it approaches 100% indefinitely, use the multi-process testing method, listen to different ports on the server side, and simultaneously perform stream transmission on the client side, and calculate the total bandwidth of all processes.

[0022] Further optionally, the step S4 specifically comprises: exchanging the roles of the two test machines, repeating the test content of steps S1-S3, calculating the test results before and after the role exchange, and taking the average value as the final network performance index.

[0023] In the second aspect, the present application provides a virtual network bandwidth testing tool, which solves the above technical problems by adopting the technical scheme as follows:

[0024] A virtual network bandwidth testing tool, the structure of which comprises:

[0025] A test preparation module for entering two machines to be tested for virtual machine network performance, and executing a pre-written virtual machine RSS script;

[0026] A test module one for testing virtual machine single network connection performance;

[0027] A test module two for performing multi-connection bandwidth testing;

[0028] An exchange calculation module for exchanging test roles and calculating average bandwidth.

[0029] Optionally, the implementation of the pre-written virtual machine RSS script relies on RPS and RFS technologies;

[0030] After executing the virtual machine RSS script, the test preparation module first tests network connectivity using the ping command. If it is not connected, the network configuration and virtual machine network settings need to be checked. If it is connected, the TCP / UDP read / write buffer size is directly configured according to actual business requirements.

[0031] Optionally, the two machines to be tested for virtual machine network performance are referred to as client and server;

[0032] The test module one tests virtual machine single network connection performance, and the specific content includes:

[0033] Single flow testing: run the iperf3 server mode on the server side to listen to connection requests from the client side and respond to these requests to provide services; use the iperf3 client mode on the client side to initiate network requests, establish connections with the server side and transmit data;

[0034] TCP and UDP bandwidth test: first test TCP bandwidth, then test UDP bandwidth; when testing UDP bandwidth, initially unlimited speed (-b 0g), if the packet loss rate is less than the set threshold, no further testing is required, if the packet loss rate exceeds the set threshold, gradually reduce the bandwidth until the packet loss rate is less than 0.5%;

[0035] Test time and CPU affinity: set the test time to more than 100 seconds to avoid the influence of slow start; use the -A parameter to bind the CPU affinity of the client and server to find the optimal CPU performance.

[0036] Further optionally, the test module two involved carries out multi-connection bandwidth test, and the specific content comprises:

[0037] Multi-flow test: use the -P parameter to perform multi-flow test to observe the maximum bandwidth of TCP and UDP; wherein, a) for TCP, start testing from -P 8, b) for UDP, start from -P 2 and gradually increase until the bandwidth no longer increases and the packet loss rate exceeds the set threshold;

[0038] CPU usage monitoring: use the top command to monitor the CPU usage of the iperf3 process, if it is close to 100%, use the multi-process test method, listen to different ports on the server side, simultaneously perform flow on the client side, and calculate the total bandwidth of all processes.

[0039] Further optionally, the exchange computing module exchanges the test roles, and calculates the average bandwidth, and the specific content comprises:

[0040] Firstly, the roles of the two test machines are exchanged, and the test preparation module, the test module one and the test module two are sequentially and re-invoked to execute the test content;

[0041] Subsequently, the test results before and after the exchange of roles are calculated, and the average value is taken as the final network performance index.

[0042] The virtual network bandwidth test method and tool of the application has the beneficial effects compared with the prior art:

[0043] The application uses scripts to realize RSS, which can improve the results of concurrent multi-connection, accurately and comprehensively test the network performance bandwidth value of the virtual machine, including the maximum value of single connection and the maximum value of multi-connection, so that the user can understand the network performance bandwidth between virtual machines more comprehensively according to his own business, and perform tuning or business deployment. BRIEF DESCRIPTION OF DRAWINGS

[0044] ATTACHMENT Figure 1 is the method flowchart of the embodiment one of the application;

[0045] ATTACHMENTFigure 2 is a module connection block diagram of embodiment two of the present application. DETAILED DESCRIPTION

[0046] In order to make the technical solutions, the technical problems solved and the technical effects of the present application clearer, the technical solutions of the present application are described clearly and completely in combination with specific embodiments.

[0047] Embodiment one:

[0048] In combination with the accompanying Figure 1 , the present embodiment proposes a virtual network bandwidth test method, which includes the following steps:

[0049] S1, enter two machines to be tested for virtual machine network performance, and execute a pre-written virtual machine RSS script.

[0050] This step, the implementation of the pre-written virtual machine RSS script depends on RPS and RFS technology.

[0051] After executing the virtual machine RSS script, use the ping command to test network connectivity. If it is not connected, the network configuration and virtual machine network settings need to be checked. If it is connected, directly configure the read / write buffer size of TCP / UDP according to the actual business requirements.

[0052] S2, the two machines to be tested for virtual machine network performance are called client and server, and the single network connection performance of the virtual machine is tested, which specifically includes:

[0053] Single flow test: run the iperf3 server mode on the server to listen to the connection request from the client and respond to these requests to provide services; use the iperf3 client mode on the client to initiate network requests, establish connections with the server and transmit data;

[0054] TCP and UDP bandwidth test: first test TCP bandwidth, then test UDP bandwidth; when testing UDP bandwidth, initially unlimited speed (-b 0g), if the packet loss rate is less than the set threshold, no further testing is required, if the packet loss rate exceeds the set threshold, gradually reduce the bandwidth until the packet loss rate is less than 0.5%;

[0055] Test time and CPU affinity: set the test time to more than 100 seconds to avoid the influence of slow start; use the -A parameter to bind the CPU affinity of the client and the server to find the optimal CPU performance.

[0056] S3, perform multi-connection bandwidth test, which specifically includes:

[0057] Multi-stream test: use the -P parameter to perform multi-stream test to observe the maximum bandwidth of TCP and UDP; wherein, a) for TCP, start testing from -P 8, b) for UDP, start from -P 2 and gradually increase until the bandwidth no longer increases and the packet loss rate exceeds the set threshold;

[0058] CPU usage monitoring: use the top command to monitor the CPU usage of the iperf3 process, if it approaches 100% infinitely, use the multi-process test method, listen to different ports on the server side, simultaneously perform stream pushing on the client side, and calculate the total bandwidth of all processes.

[0059] S4, exchange test roles and calculate average bandwidth, specifically including: exchanging the roles of the two test machines, repeating the test content of steps S1-S3, calculating the test results before and after exchanging the roles, and taking the average value as the final network performance index.

[0060] Embodiment two:

[0061] In combination with the accompanying Figure 2 , the embodiment provides a virtual network bandwidth test tool, which has the structure of:

[0062] A test preparation module is used to enter two machines to be tested for virtual machine network performance, and execute a pre-written virtual machine RSS starting script.

[0063] A test module one is used to test the performance of a single network connection of a virtual machine.

[0064] A test module two is used to perform multi-connection bandwidth test.

[0065] An exchange calculation module is used to exchange test roles and calculate average bandwidth.

[0066] In the embodiment, the implementation of the pre-written virtual machine RSS starting script depends on RPS and RFS technologies. After executing the virtual machine RSS starting script, the test preparation module first tests network connectivity using the ping command. If the network is not connected, the network configuration and virtual machine network settings need to be checked. If the network is connected, the TCP / UDP read / write buffer size is directly configured according to actual business requirements.

[0067] In the embodiment, the two machines to be tested for virtual machine network performance are referred to as client and server. The test module one tests the performance of a single network connection of a virtual machine, and the specific content includes:

[0068] Single flow test: run iperf3 server mode on server side to listen to connection requests from client side and respond to these requests to provide services; use iperf3 client mode on client side to initiate network requests, establish connection with server side and transmit data;

[0069] TCP and UDP bandwidth test: first test TCP bandwidth, then test UDP bandwidth; when testing UDP bandwidth, initially unlimited speed (-b 0g), if the packet loss rate is less than the set threshold, no further testing is required, if the packet loss rate exceeds the set threshold, gradually reduce the bandwidth until the packet loss rate is less than 0.5%;

[0070] Test time and CPU affinity: set the test time to more than 100 seconds to avoid the influence of slow start; use the -A parameter to bind the CPU affinity of the client and server to find the optimal CPU performance.

[0071] In this embodiment, the second test module is used to perform multi-connection bandwidth test, and the specific content includes:

[0072] Multi-flow test: use the -P parameter to perform multi-flow test to observe the maximum bandwidth of TCP and UDP; wherein a) for TCP, start testing from -P 8, b) for UDP, start from -P 2 and gradually increase until the bandwidth no longer increases and the packet loss rate exceeds the set threshold;

[0073] CPU usage monitoring: use the top command to monitor the CPU usage of the iperf3 process, if it approaches 100%, use multi-process testing method, listen to different ports on the server side, simultaneously perform flow on the client side, and calculate the total bandwidth of all processes.

[0074] In this embodiment, the exchange computing module exchanges the test roles and calculates the average bandwidth, and the specific content includes:

[0075] First, exchange the roles of the two test machines, and sequentially and re-call the test preparation module, test module one and test module two to execute the test content;

[0076] Then, calculate the test results before and after the role exchange, and take the average value as the final network performance index.

[0077] It should be noted that the test commands involved in embodiment one and embodiment two are as follows:

[0078] TCP bandwidth: Client side: iperf3–c serverIp–p port–t 100–P 8

[0079] Server side: iperf3–s–p port;

[0080] UDP bandwidth: Client side: iperf3–c serverIp–p port–u–b 0g–P 8–A 1,1–t 100

[0081] Server side: iperf3–s–p port.

[0082] According to actual business requirements, the read-write buffer size of TCP / UDP is configured, and the command for modifying the read-write buffer size is as follows:

[0083] echo <8388608> / proc / sys / net / core / rmem_default

[0084] echo <8388608> / proc / sys / net / core / wmem_default

[0085] echo <8388608> / proc / sys / net / core / rmem_max

[0086] echo <8388608> / proc / sys / net / core / wmem_max.

[0087] The RSS script of the virtual machine is started as follows:

[0088]

[0089]

[0090]

[0091] As can be seen from the above, the virtual network bandwidth test method and tool can improve the concurrent multi-connection result, can accurately and comprehensively test the value of the virtual machine network performance bandwidth, including the maximum value of single connection and the maximum value of multi-connection, so that the user can understand the network performance bandwidth between virtual machines more comprehensively according to his own business, and perform tuning or business deployment.

[0092] The above application specific examples have described the principles and implementation modes of the present application in detail, and these examples are only used to help understand the core technical content of the present application. Based on the above specific embodiments of the present application, any improvement and modification of the present application made by the person skilled in the art without departing from the principles of the present application shall fall within the patent protection scope of the present application.

Claims

1. A method for testing virtual network bandwidth, characterized in that, Includes the following steps: S1. Access the two machines for which you want to perform virtual machine network performance testing. These two machines are referred to as the client and server. Execute the pre-written script to enable virtual machine RSS. S2. Test the single network connection performance of the virtual machine, specifically including: Single-stream test: Run iperf3 server mode on the server side to listen for connection requests from the client and respond to these requests to provide services; use iperf3 client mode on the client side to initiate network requests, establish connections to the server side and transmit data. TCP and UDP bandwidth testing: Test TCP bandwidth first, then test UDP bandwidth; when testing UDP bandwidth, initially there is no speed limit. If the packet loss rate is less than the set threshold, no further testing is needed. If the packet loss rate exceeds the set threshold, gradually reduce the bandwidth until the packet loss rate is below 0.5%. Test time and CPU affinity: Set the test time to more than 100 seconds to avoid the impact of slow start; use the -A parameter to bind the CPU affinity of the client and server to find the optimal CPU performance; S3. Perform multi-connection bandwidth testing, specifically including: Multi-stream test: Use the -P parameter to perform a multi-stream test and observe the maximum bandwidth of TCP and UDP; where a) for TCP, start the test from -P 8, b) for UDP, start from -P 2 and gradually increase it until the bandwidth no longer increases and the packet loss rate exceeds the set threshold. CPU utilization monitoring: Use the top command to monitor the CPU utilization of the iperf3 process. If it is very close to 100%, use the multi-process test method. Listen on different ports on the server side and stream on the client side at the same time, and count the total bandwidth of all processes. S4. Switch test roles and calculate average bandwidth.

2. The method for testing virtual network bandwidth according to claim 1, characterized in that, When executing step S1, the implementation of the pre-written script to enable virtual machine RSS relies on RPS and RFS technologies; After executing the script to enable virtual machine RSS, use the ping command to test network connectivity. If the connection fails, check the network configuration and virtual machine network settings. If the connection is successful, configure the TCP / UDP read / write buffer size according to actual business needs.

3. The method for testing virtual network bandwidth according to claim 1, characterized in that, Step S4 specifically includes: swapping the roles of the two test machines, repeating the test content of steps S1-S3, calculating the test results before and after the role swap, and taking the average value as the final network performance indicator.

4. A virtual network bandwidth testing tool, characterized in that, Its structure includes: The test preparation module is used to access the two machines to be tested for virtual machine network performance. These two machines are called the client and the server. The pre-written script to start the virtual machine RSS is executed. Test Module 1 is used to test the performance of a single network connection on a virtual machine. Specific content includes: Single-stream test: Run iperf3 server mode on the server side to listen for connection requests from the client and respond to these requests to provide services; use iperf3 client mode on the client side to initiate network requests, establish connections to the server side and transmit data. TCP and UDP bandwidth testing: Test TCP bandwidth first, then test UDP bandwidth; when testing UDP bandwidth, initially there is no speed limit. If the packet loss rate is less than the set threshold, no further testing is needed. If the packet loss rate exceeds the set threshold, gradually reduce the bandwidth until the packet loss rate is below 0.5%. Test time and CPU affinity: Set the test time to more than 100 seconds to avoid the impact of slow start; use the -A parameter to bind the CPU affinity of the client and server to find the optimal CPU performance; Test module two is used for multi-connection bandwidth testing, and its specific contents include: Multi-stream test: Use the -P parameter to perform a multi-stream test and observe the maximum bandwidth of TCP and UDP; where a) for TCP, start the test from -P 8, b) for UDP, start from -P 2 and gradually increase it until the bandwidth no longer increases and the packet loss rate exceeds the set threshold. CPU utilization monitoring: Use the top command to monitor the CPU utilization of the iperf3 process. If it is close to 100%, use the multi-process test method, listen on different ports on the server side, and simultaneously stream on the client side, and count the total bandwidth of all processes. The switching calculation module is used to switch test roles and calculate average bandwidth.

5. The virtual network bandwidth testing tool according to claim 4, characterized in that, The implementation of pre-written scripts to enable virtual machine RSS relies on RPS and RFS technologies; After executing the script to enable virtual machine RSS, the test preparation module first uses the ping command to test network connectivity. If the connection fails, it needs to check the network configuration and the virtual machine's network settings. If the connection is successful, it directly configures the TCP / UDP read / write buffer size according to actual business needs.

6. The virtual network bandwidth testing tool according to claim 4, characterized in that, The switching calculation module switches test roles and calculates average bandwidth, including the following: First, switch the roles of the two test machines, and then sequentially and re-call the test preparation module, test module one, and test module two to execute the test content. Subsequently, the test results before and after the role swap were calculated, and the average value was taken as the final network performance indicator.

Citation Information

Patent Citations

  • Method, device and equipment for testing performance of domestic server and readable medium

    CN115408225A

  • Optimizing the deployment of virtual resources and automating post-deployment actions in a cloud environment

    US20170199752A1