How can I find the network packets per second (PPS) limit for Amazon EC2 instances?

2 minute read
0

I have an Amazon Elastic Compute Cloud (Amazon EC2) instance and I want to find the network packets per second (PPS) limit for that instance.

Short description

The PPS for an Amazon EC2 instance depends on a number of network characteristics for the instance. This includes:

  • Traffic mix, Transmission Control Protocol (TCP) versus User Datagram Protocol (UDP)
  • Number of flows
  • Packet size
  • New connections versus existing connections
  • Applied security group rules

PPS allowance is considered separately from the overall bandwidth allowance. While an instance might be under overall bandwidth allowance, the PPS allowance can be exceeded if the mean packet size is too small.

Resolution

Customers can perform PPS benchmarking using the iperf2 test. Depending on the network characteristics, this test can help customers find out the approximate PPS limit of any Amazon EC2 Instance subjective to the network characteristics highlighted earlier.

To perform an iperf2 test, do the following:

1.    Create two Amazon EC2 instances in the same Availability Zone (AZ) using an Amazon Linux 2 image. The instance type of both the instances should be similar.

2.    Install development tools and git on both instances by running the following commands:

sudo yum groupinstall "Development Tools"
sudo yum install git

3.    Clone iperf code on both Amazon EC2 instances by running the following commands:

cd /usr/local/
sudo git clone https://git.code.sf.net/p/iperf2/code iperf2-code

4.    Build and install the package on both Amazon EC2 instances using the following:

cd /usr/local/iperf2-code
sudo ./configure
sudo make
sudo make install

5.    Run iperf on one instance while in listening mode. This instance will act as a server for your iperf test:

sudo /usr/local/bin/iperf -s -u

6.    Run the following iperf command on the other instance. This instance will act as a client:

sudo /usr/local/bin/iperf -c <private_IP_of_server_instance> -u -i 1 -l 16 -b 20kpps -e -P64

The response shows you the maximum PPS achieved for this instance type. For more information, see MANPAGE of IPERF.


AWS OFFICIAL
AWS OFFICIALUpdated 2 years ago
5 Comments

Can you please provide an example of an output with its interpretation?

replied 8 months ago

I am seeing the following output for e.g: Stripped off the initial part which shows the ip address.

[ ID] Interval Transfer Bandwidth Write/Err PPS [ 12] 0.00-1.00 sec 83.1 KBytes 681 Kbits/sec 0/0 5316 pps [ 48] 0.00-1.00 sec 80.8 KBytes 662 Kbits/sec 0/0 6313 pps [ 16] 0.00-1.00 sec 78.1 KBytes 640 Kbits/sec 0/0 4995 pps ....

[SUM] 0.00-10.03 sec 57.9 MBytes 48.4 Mbits/sec 0/0 378161 pps [SUM-128] Sent 3791670 datagrams [ 8] Server Report: [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 8] 0.00-9.76 sec 837 KBytes 703 Kbits/sec 0.020 ms 6786/60369 (11%) [ 8] 0.00-9.76 sec 2 datagrams received out-of-order [ 6] Server Report: [ 6] 0.00-10.02 sec 818 KBytes 669 Kbits/sec 0.018 ms 7630/59966 (13%) [ 6] 0.00-10.02 sec 165 datagrams received out-of-order .... [ 9] Server Report: [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 9] 0.00-10.01 sec 848 KBytes 694 Kbits/sec 0.791 ms 4281/58556 (7.3%)

I see the total datagrams sent and the loss per thread. Where do I see the pps limit?

replied 8 months ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

profile pictureAWS
MODERATOR
replied 8 months ago

Also if we test this on a windows instance, with iperf3, although there is a packet loss observed in the iperf output, we don't see any allowance_exeeded metrics in Windows Performance Monitor - ENA packet reshaping reflecting this. https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/monitoring-network-performance-ena.html

replied 7 months ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

profile pictureAWS
MODERATOR
replied 7 months ago