Measuring the Network Performance between two EC2 instances
In this blog we will measure the maximum network bandwidth between two Amazon EC2 instances of type t2.xlarge using iPerf3.
The factors that can affect Amazon EC2 network performance (refer to  for more details):
Instance type: larger instance types typically provide better network performance
Single virtual private cloud (VPC):
- Default interface configuration for EC2 instances uses jumbo frames (9001 MTU), which support higher throughput in a single virtual private cloud (VPC)
- Outside a single VPC, the maximum MTU is 1500 or less, requiring large packets to be fragmented by intermediate systems
High performance computing (HPC) support (using placement groups.)
Enhanced networking support
iPerf3  is a tool for measuring the maximum achievable bandwidth on IP networks. It allows you to tune parameters related to timing, buffers and protocols (TCP, UDP, SCTP with IPv4 and IPv6). To install iPerf3 on ubuntu following the instructions provided in .
Configure one instance as a server to listen on the port specified with -p
iperf3 -s -p 85
Run a second instance as a client with the desired parameters.
For example, the following command initiates a TCP test against the specified server instance on port 85:
iperf3 -c 10.1.2.176 -i 1 -t 60 -V -p 85
Network Performance Results
Client: client-side network performance results are shown below
Network Bandwidth measured from the client = 1 Gbits/second
Server: server-side network performance results are shown below
Network bandwidth measured from the server= 1.02 Gbits/sec