How do I enable and configure enhanced networking on my EC2 instances?
Last updated: 2022-03-16
I am running an Amazon Elastic Compute Cloud (Amazon EC2) instance, and I want to enable enhanced networking. What is enhanced networking and when should I use it?
Enhanced networking provides higher bandwidth, higher packet-per-second (PPS) performance, and consistently lower interinstance latencies.
Amazon EC2 instances have three different virtual network adapters, VIF, Intel 82599 VF, and Elastic Network Adapter (ENA). For the latest instance types and adapters, see Enhanced networking on Linux and Enabling enhanced networking with the Intel 82599 VF interface on Windows instances.
When considering using enhanced networking, keep the following in mind:
- If your packets-per-second rate reaches its ceiling, consider moving to enhanced networking. If your rate reaches its ceiling, you've likely reached the upper thresholds of the virtual network interface driver.
- If your throughput is near or exceeding 20 K packets per second (PPS) on the VIF driver, then it's a best practice to use enhanced networking.
- To provide the lowest latency and the highest packet-per-second network performance for your instances, consider using a cluster placement group.
- If you need to reach speeds up to 10 Gbps between instances, then launch your instances into a cluster placement group with the enhanced networking instance type. These instance types are placed physically close to each other, further reducing latency and improving transfer speeds.
- If you need to reach speeds up to 25 Gbps between instances, launch instances in a cluster placement group along with ENA compatible instances. Then make sure traffic has multiple flows between the instances.
Depending on your instance and adapter type, follow one of these two guides:
- Enabling enhanced networking with the Intel 82599 VF interface on Linux instances
- Enabling enhanced networking with the Elastic Network Adapter (ENA) on Linux instances
After completing the steps for enabling the enhanced networking driver for your instance type, consider performing some network or kernel tuning. Achieving as much system performance as possible requires intensive research and testing to assess necessary changes to the kernel for your workload. Note that using the default network kernel parameters is fine for most workloads. However, you might need to tune to optimize the throughput, depending on the workload.
It's a best practice to perform any tuning of the kernel based on observable behavior and metrics. When possible, use the guidance provided by your operating system or application. The information provided by your OS or application reflects a real world scenario. For example, kernel tuning for a database server is different than that used for a webserver, as the characteristics of both workloads differ.
For information on enhanced networking, see Enhanced networking on Windows. The elastic network interface driver is installed on all Amazon AMIs for Windows Server 2008 R2 and newer.
For information on elastic network interfaces, see Enabling enhanced networking with the Elastic Network Adapter (ENA) on Windows instances.