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 [1] 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

iPerf3 [2] 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 [3].

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

[1] https://aws.amazon.com/premiumsupport/knowledge-center/network-throughput-benchmark-linux-ec2/

[2] https://iperf.fr/

[3] https://stackoverflow.com/questions/28598394/install-iperf3-ubuntu-14-04