Voiced by Amazon Polly |
Overview
Monitoring the actual bandwidth for applications is usually beneficial, particularly when managing time-sensitive workflows and applications that produce a lot of traffic. It makes it possible to set a baseline for the real bandwidth that is accessible. It helps to locate any bottlenecks that may be present, which is important for troubleshooting. Making knowledgeable business decisions may be greatly aided by the data acquired. Additionally, it may significantly raise consumer happiness and service quality.
In this blog post, we’ll look at using the iPerf tool to find bandwidth problems between two servers.
Pioneers in Cloud Consulting & Migration Services
- Reduced infrastructural costs
- Accelerated application deployment
Introduction
The Internet Performance Working Group, or iPerf, is an open-source program for measuring network performance and conducting speed tests. The process is rather straightforward: it generates TCP and UDP streams, transfers data between hosts, and notifies users of the available bandwidth. Users can ascertain the maximum bandwidth speed and network throughput due to this.
How does it Work?
- It may operate in client or server mode. Data is typically sent by the client and received by the server.
- iPerf will, therefore, determine the bandwidth, performance, and speed of the network between our client and server.
- It creates a packet, which may be TCP or UDP, sends it to the server, and uses that information to calculate various parameters, such as the size of the packet and the time it takes for the packet to reach the server. When the packet is sent from the client, iPerf determines the network’s speed, performance, and bandwidth.
Prerequisites
- Set up two Ubuntu servers on the Cloud.
- We will test bandwidth using public and private IP addresses to introduce some latency.
- We will call the two servers server-01 and server-02.
- If there is a delay in data transfer between the two servers, you can try to find out how much bandwidth each has. Let’s investigate how to use iperf for this.
Installing iPerf on Client and Server
iPerf must be installed on the client and the server.
1 |
$ sudo apt install iperf |
Next, let’s see if it has been installed:
1 |
$ iperf --version |
Evaluate the performance of the TCP network between the instances
To assess TCP performance, iperf automatically connects via port 5001. Nonetheless, you may use the -p flag to configure that port. Ensure that the port perf used for communication is open in your security group configuration.
- Set up a single instance as a server to listen on the default port or use the -p parameter to specify a different listener port.
2. Set up a second instance to function as a client, then use the appropriate settings to perform a test against the server. A TCP test against the designated server instance with 40 simultaneous connections, for instance, is started by the following command
1 |
$ iperf -c 13.233.141.115 –parrallel 40 -i 1 -t 2 |
Evaluate UDP network functionality between the instances
When iperf evaluates UDP performance, it automatically uses port 5001 for communication. On the other hand, you can set your port with the -p switch. Ensure that the port iperf uses for communication is open in your security group configuration. You can use the -p parameter to specify a different listener port or configure one instance as a server to listen on the default UDP port. If different, substitute your port for 5001:
1 |
$ iperf -s -u |
After setting up a second instance as a client, run a test with the appropriate settings against the server. With the -b argument set to 5g, the following example starts a UDP test against the designated server instance. Using the -b argument, the UDP default bandwidth of 1 Mbit per second is changed to 5g. For a single traffic flow inside a VPC, a c5n18xlarge instance may offer up to 5g of network performance:
1 |
$ iperf -c 13.233.141.115 -u -b 5g |
What does the Columns Mean?
- Interval (sec): Time period for each measurement.
- Data Transferred (MBytes): Amount of data transferred during the interval.
- Bitrate (Gbits/sec): Speed of data transfer.
- Retransmissions (Retr): The quantity of data packets that require a second transmission.
- Congestion Window (Cwnd): The amount of data in transit is determined by the size of the TCP congestion window.
Conclusion
In today’s changing technological world, integrating iPerf into standard network maintenance procedures enables users to proactively fix issues, optimize performance, and guarantee a flawless network experience.
Drop a query if you have any questions regarding iPerf and we will get back to you quickly.
Making IT Networks Enterprise-ready – Cloud Management Services
- Accelerated cloud migration
- End-to-end view of the cloud environment
About CloudThat
CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.
CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 850k+ professionals in 600+ cloud certifications and completed 500+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training Partner, AWS Migration Partner, AWS Data and Analytics Partner, AWS DevOps Competency Partner, AWS GenAI Competency Partner, Amazon QuickSight Service Delivery Partner, Amazon EKS Service Delivery Partner, AWS Microsoft Workload Partners, Amazon EC2 Service Delivery Partner, Amazon ECS Service Delivery Partner, AWS Glue Service Delivery Partner, Amazon Redshift Service Delivery Partner, AWS Control Tower Service Delivery Partner, AWS WAF Service Delivery Partner, Amazon CloudFront Service Delivery Partner, Amazon OpenSearch Service Delivery Partner, AWS DMS Service Delivery Partner, AWS Systems Manager Service Delivery Partner, Amazon RDS Service Delivery Partner, AWS CloudFormation Service Delivery Partner, AWS Config, Amazon EMR and many more.
FAQs
1. How can I use iPerf to simulate various network conditions?
ANS: – There are no built-in capabilities in iPerf itself for emulating particular network circumstances. Nevertheless, before doing iPerf testing, you can alter the network environment (e.g., add latency or restrict bandwidth) using third-party tools or scripts.
2. Is it possible to utilize iPerf for ongoing network performance monitoring?
ANS: – Even while iPerf is primarily meant for point-in-time testing, you may use scheduling tools or scripts to put up iPerf tests regularly for continuous monitoring. Remember that too much testing could interfere with the network’s ability to function normally. Therefore, it should be done sparingly.
3. Which typical mistakes should one avoid while utilizing iPerf for network diagnostics?
ANS: – Not taking into account the network environment as a whole, doing tests without knowing how they would affect real systems, and misinterpreting results are common mistakes. To ensure precise troubleshooting, thoroughly comprehend the network context and closely examine the outcomes.

WRITTEN BY Ritushree Dutta
Comments