🆕 Video Course Out Now: Rapid Docker on AWS

EC2 network performance demystified: m3 and m4

Andreas Wittig – 30 Nov 2017 (updated 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:

Cover of Amazon Web Services in Action

Level up, strengthen your AWS skills.

Our book Amazon Web Services in Action is a comprehensive introduction to computing, storing, and networking in the AWS cloud. You'll find clear, relevant coverage of all the essential AWS services, emphasizing best practices for security, high availability, and scalability. Get the first chapter for free!

  • 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’m an independent consultant, technical writer, and programming founder. All these activities have to do with AWS. I’m writing this blog and all other projects together with my brother Michael.

In 2009, we joined the same company as software developers. Three years later, we were looking for a way to deploy our software—an online banking platform—in an agile way. We got excited about the possibilities in the cloud and the DevOps movement. It’s no wonder we ended up migrating the whole infrastructure of Tullius Walden Bank to AWS. This was a first in the finance industry, at least in Germany! Since 2015, we have accelerated the cloud journeys of startups, mid-sized companies, and enterprises. We have penned books like Amazon Web Services in Action and Rapid Docker on AWS, we regularly update our blog, and we are contributing to the Open Source community. Besides running a 2-headed consultancy, we are entrepreneurs building Software-as-a-Service products.

We are available for projects.

You can contact me via Email, Twitter, and LinkedIn.

Briefcase icon
Hire me