EC2 network performance demystified: m3 and m4

Andreas WittigUpdated 16 Apr 2018

AWS offers EC2 instances in different sizes, defined by the instance type. How do you decide which instance type to use? Do you need an m4.large or m4.xlarge instance? At least the following factors should affect your decision:

  • How much memory does the operating system and application need?
  • Does your application benefit from multiple CPU cores?
  • What is the expected network throughput going in and out your instance?

It’s easy to get the information about the memory and CPU capacity of an instance type at Amazon EC2 Instance Types. For example, an m4.large instance comes with two vCPUs and 8 GiB memory. But which network performance can you expect with an m4.large instance? AWS promises a Moderate network performance without any hint how to translate this vague information into GBit/s.

I’ve been dissatisfied with the lack of information about the actual network performance of EC2 instances for a while. Therefore, I remembered the saying my father told me: “Messen heißt wissen!” which translates to “Measuring means knowledge!”.

Therefore, I’ve measured the networking performance of EC2 instances in the real world, and I’m happy to share the results with you.

Summary of the benchmarking infrastructure:

  • benchmarking tool: iperf3
  • instance type of iperf3 server: c5.18xlarge
  • regions: us-east-1
  • period: 60 minutes per instance type at April 12th, 2018

m3 Instance Family

The benchmark results within the m3 instance family are very consistent with a minimal variance between different measurements. Expect a network throughput from 0.3 Gbit/s to 1.0 Gbit/s with m3 instances.

Instance Type Target Maximum (Gbit/s) Minimum (Gbit/s) Average (Gbit/s)
m3.medium Moderate 0.30 0.32 0.30
m3.large Moderate 0.69 0.70 0.69
m3.xlarge High 0.99 1.01 0.99
m3.2xlarge High 0.99 1.01 0.99

m4 Instance Family

With m4 instances network throughput varies from 0.45 Gbit/s to 20.37 Gbit/s.

Instance Type Target Maximum (Gbit/s) Minimum (Gbit/s) Average (Gbit/s)
m4.large Moderate 0.45 0.47 0.45
m4.xlarge High 0.74 0.81 0.75
m4.2xlarge High 0.99 1.02 0.99
m4.4xlarge High 1.99 2.04 1.99
m4.10xlarge 10 Gigabit/s 9.85 9.86 9.85
m4.16xlarge 25 Gigabit/s 19.59 23.25 20.37

Summary

When choosing an instance type, the network performance should be one of the main criteria. Especially, for network-intensive workloads. As AWS is only providing very vague information about the networking performance of each instance types our benchmark helps you to avoid bottlenecks caused by the networking capacity of your instances.

Have a look at the EC2 Network Performance Cheat Sheet if you are looking for other instance types.

Andreas Wittig

Andreas Wittig

I’ve been building on AWS since 2012 together with my brother Michael. We are sharing our insights into all things AWS on cloudonaut and have written the book AWS in Action. Besides that, we’re currently working on bucketAV,HyperEnv for GitHub Actions, and marbot.

Here are the contact options for feedback and questions.