I am having low bandwidth and capacity issues on my VPN connection. What tests can I run to ensure the issue is not taking place inside my AWS VPC?

Before beginning performance tests, launch and configure your EC2 Linux instances:

  1. Follow the steps in Launch an Amazon EC2 Instance to launch Linux instances in at least two different Availability Zones under the same VPC from which you can run network performance testing.
  2. For the best possible network performance, ensure that the instances support enhanced networking for Linux, launch the instances in the same VPC, and follow the steps in Enabling Enhanced Networking on Linux Instances in a VPC.
  3. If you are performing network testing between instances that are not co-located in the same placement group or do not support jumbo frames, follow the steps in Network Maximum Transmission Unit (MTU) for Your EC2 Instance to Check and Set the MTU on your Amazon EC2 Instance.
  4. Complete the steps in Connect to Your Linux Instance to verify that you can access the instances.

Install the iperf3 network benchmark tool on both instances

Connect to your Linux instances via a terminal session and run the following commands to install iperf3.

To install iperf3 on RHEL-based Linux hosts:

$ sudo yum --enablerepo=epel install iperf iperf3

To install iperf3 on Debian/Ubuntu hosts:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install git gcc make
$ git clone https://github.com/esnet/iperf
$ cd iperf
$ ./configure
$ sudo make
$ sudo make install
# optionally run "make clean" to free up disk space
# by removing artifacts in the build tree.
$ sudo make clean
$ sudo ldconfig

iperf3 communicates over port 5001 by default when testing TCP performance. However, this port is configurable using the -p switch. Ensure that security groups are configured to allow communication over the port that will be used by iperf3.

Configure one instance as a server to listen on the default port, or specify an alternate listener port with the -p switch:

$ sudo iperf3 -s -V

Configure your on-premises host as a client, and run a test against the server with the desired parameters.

(TCP) IPerf Test with increasing window size and 20 parallel connections

The output displays results of 20 parallel streams and with increasing window size per TCP connection:

sudo iperf3 -c <Private/public IP of instance> -P 20 -w 128K -V
sudo iperf3 -c <Private/public IP of instance> -P 20 -w 512K -V
sudo iperf3 -c <Private/public IP of instance> -P 20 -w 1024K -V

(UDP) IPerf Test with increasing bandwidth capacity

The output displays results of increasing bandwidth capacity and time frame of 30 seconds per UDP connection:

iperf3 -c <Private/public IP of EC2 instance> -u -b 200M -t 30
iperf3 -c <Private/public IP of EC2 instance> -u -b 500M -t 30
iperf3 -c <Private/public IP of EC2 instance> -u -b 1G -t 30

Note: You should run the test between the private and public IP address of your EC2 instances and your on-premises host bidirectionally in order to benchmark the network throughput on your VPN connection.

Note: Check with your specific vendor documentation for instructions on how to check network devices for analysis and troubleshooting.

bandwidth, capacity, tools, iperf, VPC, VPN, Linux


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2017-02-24