www.cloudyn.com | @cloudyn_buzz | cloudyn.com/blog
White Paper
THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES
Introduction
Amazon Web Services (AWS), which was officially launched in 2006, offers you
varying cloud services that are not only cost effective, but also scalable and available
on-demand. AWS’ portfolio constitutes lots of different services such as computing,
data loading, creating applications, networking, management, workflows, databases,
storage, and much more. Every year, AWS increases their portfolio of services with
innovative cloud service offerings.
The core focus of AWS is that an enterprise application can be developed, tested,
processed, deployed and executed on the cloud without buying any physical, on-
premises infrastructure. This helps in reducing your capital expenditure while
providing you with better performance on a secure infrastructure, on-demand
scalability, and reliance on an operational expenditure model.
Today, AWS is spread across 11 geographical regions, 9 of which are public and
available to registered users. Each region has multiple Edge Locations that provide
high availability as well as support to achieve disaster recovery for applications and
data.
AWS Regions (Orange) and AWS Edge Locations (Blue)
(Source: Amazon Web Services)
2 Your Ultimate Guide to Cloud Optimization
White Paper
Though AWS’ portfolio has over 30 products, its core services, Elastic Compute Cloud
(EC2) and Simple Storage Service (S3) are the most popular. These services were
introduced to provide online compute power and data storage. Over time, these
services have improved by leaps and bounds and continue to be of the most
important services in AWS’ portfolio.
Elastic Compute Cloud (EC2)
EC2 is a core service on Amazon Web Services’ cloud computing platform where
users can start virtual servers with almost any server operating system, then
develop and deploy their applications on them.
Below are just a few of EC2’s many features:
1. Agile models due to the large number of instance sizes, multiple OS and
architectures (32/64 bit), as well as one of the most cost effective solutions
due to its pay-as-you-go pricing.
2. The option to reduce costs with varying price models, such as on-demand,
reserved or spot instances.
3. EC2 provides multiple, inherent security features, such as private key pairs,
security groups, and subnetting with VPC.
4. An Amazon Machine Image (AMI), which is bundled software, allows you to
re-launch instances in the future, and helps with High Availability (HA) and
Disaster Recovery (DR) schemes.
5. A variety of instance families that offer end users the flexibility to choose the
right instance sizes according to their applications’ needs. In addition, EC2
always allows you to modify your instance family in order to achieve vertical
scaling (Increase/Decrease CPU-Memory).
ECU vs vCPU
AWS EC2 creates virtual machines on commodity hardware and it is important that
each same-sized EC2 instance has a similar performance. AWS takes measures to
ensure that each instance has a consistent and predictable amount of CPU capacity.
Understanding that developers and IT infrastructure like to benchmark performance
or compare CPU capacity between different instance types, AWS has defined an
3 Your Ultimate Guide to Cloud Optimization
White Paper
Amazon EC2 Compute Units (ECU), which exhibit the amount of CPU that is allocated
to a particular instance.
In early 2014, AWS changed how CPU capacity was measured, from ECU to vCPU.
Generally, a virtual CPU (vCPU) acts as a virtual processor; a physical central
processing unit (CPU) that is assigned to a virtual machine (VM). For AWS, each vCPU
is a hyperthread of an Intel Xeon core for M3, C3, R3, HS1, G2, and I2.
EC2 AMIs
Users can launch instances from Amazon Machine Images (AMIs). AMIs have
Operating Systems (OS) as well as some custom bundled software so that when an
instance is launched, it will have the same OS, application and data as its AMI.
Additionally, users can launch multiple instances from a single AMI.
Generally, there are two types of AMIs based on their root device: EBS-Backed and
Instance Store-Backed. Each of these AMIs uses one of two types of virtualization:
Para Virtual (PV) or Hardware Virtual Machine (HVM). PV guests can run on host
hardware that does not have explicit support for virtualization and they cannot take
advantage of special hardware extensions, such as enhanced networking or GPU
processing.
All current generation EC2 instance types support HVM AMIs. Some previous
generation instance types, such as T1, C1, M1, and M2 do not support Linux
HVM AMIs. On the other end of the spectrum, some current generation
instance types, such as T2, I2, R3, G2, CR1, and CC2 do not support PV AMIs.
The main difference between PV and HVM AMIs is the way in which they boot
and whether they can take advantage of special hardware extensions (CPU,
network, and storage) for better performance.
For the best performance, AWS recommends using current generation instance
types and HVM AMIs when launching new instances. We have provided more details
about current and previous generation instance types in the section below.
4 Your Ultimate Guide to Cloud Optimization
White Paper
Two Generations of EC2 Instances
Amazon introduced small EC2 instances in 2006. They then added different
types of instances according to application loads, memory and a number of
other factors. Now, each instance type is optimized according to its
respective application’s requirements. Each instance type has a different
CPU, memory, storage and networking capacity. The matrix below illustrates
various types of instances and their instance families.
As AWS improves so does EC2. Each instance type has its own generation
because Amazon constantly improves the performance-oriented
infrastructure in order to offer new, better performing instance families.
Currently, AWS has two generations of EC2 instance families: previous and
current.
1st Generation EC2
AWS cloud customers still use Previous Generation Instance types because
they have optimized their applications against this instance group or they
just may not have moved to Current Generation Instances.
Below is the previous generation family:
Instance Family Previous Generation Instance Types
General purpose m1.small | m1.medium | m1.large | m1.xlarge
Compute optimized c1.medium | c1.xlarge | cc2.8xlarge
Memory optimized m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge
Storage optimized hi1.4xlarge
GPU instances cg1.4xlarge
Micro instances t1.micro
5 Your Ultimate Guide to Cloud Optimization
White Paper
2nd Generation EC2
As of late 2012, AWS added a few more instance types that were similar to
the earlier standard instances but with better firmware and higher CPU
power. AWS calls these the second or current generation family:
Instance Family Current Generation Instance Types
General purpose t2.micro | t2.small | t2.medium | m3.medium |
m3.large | m3.xlarge | m3.2xlarge
Compute optimized c3.large | c3.xlarge | c3.2xlarge | c3.4xlarge | c3.8xlarge
Memory optimized r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge
Storage optimized i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge |
hs1.8xlarge
GPU instances g2.2xlarge
Dense storage
instances d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge
6 Your Ultimate Guide to Cloud Optimization
White Paper
Eight Families of EC2 Instances
Some applications need higher memory, some require higher CPU, and some need
a balance between both. Keeping this in mind, AWS has distributed their instance
families across eight broad categories based on instance configuration. We have
listed all eight families with their instance types, configuration as well usage below.
General Purpose Instances
There are two types of instances in this family: Fixed Performance (e.g. M3, C3, R3)
and Burstable Performance (e.g. T2).
T2 / Burstable Performance Instances
Model vCPU CPU credits /
hour
Mem (GiB) Storage (GB)
t2.micro 1 6 1 EBS only
t2.small 1 12 2 EBS only
t2.medium 2 24 4 EBS only
t2.large 2 36 8 EBS only
T2 instances are burstable performance instances and generally have a baseline
level of CPU performance. The T2 is different than traditional instances because
they do not provide fixed performance, but rather generate the credit for the
underutilized CPU and use this credit to burst occasionally. When you talk about
CPU credit it is equivalent to the performance of a full CPU core for one minute.
The T2 instance, when launched, will have a fixed set of CPU credits and whenever
CPU is underutilized, this will result in a CPU credit which is valid for 24 hours. For
example, say you launched a T2 instance and your application is consuming full CPU
only during the hours of 9 AM to 6 PM and from 6 PM to next day at 9 AM it is
almost not utilized. In this case, AWS will create a CPU credit for unutilized hours
that can be applied to burst the performance from 9 AM to 6 PM.
7 Your Ultimate Guide to Cloud Optimization
White Paper
To explain the above case: if you launched a t2.medium instance and that instance
is just consuming 10% of CPU from 6 PM to 9 AM, it will be consuming 6 CPU credits
(10% of 60 minutes), but at the same time, AWS will keep adding 24 CPU
credits/hour so it will get 18 additional credits/hour. This credit can be used during
the higher usage period from 9 AM to 6 PM.
It is important to note the following:
.
This family offers three sizes and is one of the most cost effective EC2
instance options.
This family is only supported by Amazon Virtual Private Cloud (VPC).
It solely supports HVM AMIs.
The T2 family also offers micro instances, which are part of AWS’ free usage
tier.
If you stop the instance all the credit will be lost.
If your instance has consumed all of its CPU credit then it will perform at the
baseline CPU performance, depending on the instance size.
When comparing the T2 family with the T1 Previous Generation Instance Types, it is
clear that the current generation has far outweighed the past. In terms of
processors and storage, the previous generation didn’t have the latest version of
Intel Xeon processors and instance-storage was only available for M1 instance types.
Additionally, the current family offers better CPU and memory for less than what the
previous generation charged.
Recommendation: This family is useful for Web Servers, non-production
environments, and small databases that occasionally require a CPU burst.
8 Your Ultimate Guide to Cloud Optimization
White Paper
M3 Instances
Model vCPU Mem (GiB) SSD Storage (GB)
m3.medium 1 3.75 1 x 4
m3.large 2 7.5 1 x 32
m3.xlarge 4 15 2 x 40
m3.2xlarge 8 30 2 x 80
This family provides balanced memory and CPU usage. It has different capacities for
CPU, memory and solid state drives (SSDs) according to the instance size that is
chosen. These instances use SSDs instead of traditional HDDs, so they offer better
I/O performance. M3 instances are a good-fit for memory-intensive applications.
There is no comparison between previous generation M1 instance types and current
generation M3 instance types. The previous generation lacked the latest version of
Intel Xeon processors as well as SSD storage. I/O performance has also been
enhanced in the current generation.
Recommendation: M3 instances are better for small and medium-sized databases
that run backend servers, such as SAP. They can also be used for small and medium
caching servers and for data processing applications that require additional
memory.
9 Your Ultimate Guide to Cloud Optimization
White Paper
M4 Instances
Model vCPU Mem (GiB) SSD Storage (GB)
m4.large 2 8 EBS only. Dedicated
throughput: 450Mbps
m4.xlarge 4 16 EBS only. Dedicated
throughput: 750Mbps
m4.2xlarge 8 32 EBS only. Dedicated
throughput: 1000Mbps
m4.4xlarge 16 64 EBS only. Dedicated
throughput: 2000Mbps
m4.10xlarge 40 160 EBS only. Dedicated
throughput: 4000Mbps
The M4 family, released in June 2015 is the newer generation of general purpose
compute instances. It provides balanced memory and CPU usage and has different
capacities for CPU, memory and provisioned EBS throughput according to the
instance size that is chosen. It boasts the Intel Xeon v3 processor (Haswell) and twice
the RAM of the M3 family. It also hosts EC2’s only instance with 40 vCPU cores.
Recommendation: AWS recommends these instances be used for relational and in-
memory databases, gaming servers, caching fleets, batch processing, and business
applications like SAP and Microsoft SharePoint.
10 Your Ultimate Guide to Cloud Optimization
White Paper
Compute Optimized (C3) Instances
Model vCPU Mem (GiB) SSD Storage (GB)
c3.large 2 3.75 2 x 16
c3.xlarge 4 7.5 2 x 40
c3.2xlarge 8 15 2 x 80
c3.4xlarge 16 30 2 x 160
c3.8xlarge 32 60 2 x 320
Some applications require very high CPU usage, but balanced memory usage. This
situation is ideal for C3 instances because of their optimized compute capacity. They
are recommended for applications that require more compute power because they
offer high performing processors. They offer one of the highest levels of
performance at a low cost because of their memory to vCPU and SSD storage ratio.
The pattern continues when comparing the previous generations of C1 and CC2
instance types with the current generation of C3 instances. The current generation
has the latest version of Intel Xeon processors as well enhanced networking and
SSD storage.
Recommendation: C3 instances are great for applications that require on-demand
batch processing, and distributed analytics. They are also ideal for high performance
science and engineering applications.
11 Your Ultimate Guide to Cloud Optimization
White Paper
Compute Optimized (C4) Instances
Model vCPU Mem (GiB) Storage (GB)
c4.large 2 3.75 EBS only. Dedicated
throughput: 500Mbps
c4.xlarge 4 7.5 EBS only. Dedicated
throughput: 750Mbps
c4.2xlarge 8 15 EBS only. Dedicated
throughput: 1000Mbps
c4.4xlarge 16 30 EBS only. Dedicated
throughput: 2000Mbps
c4.8xlarge 36 60 EBS only. Dedicated
throughput: 4000Mbps
AWS offers this solution for instances that require strong compute power. The new
C4 instances are based on the Intel Xeon E5-2666 v3 (aka ‘Haswell’) processor and
use hardware virtualization (HVM). Intel has designed the special custom Xeon
processor to optimize performance. As per AWS specifications, C4 instances run at a
base speed of 2.9 GHz, and can go up to a clock speed of 3.5 GHz with Intel Turbo
Boost. Intel’s turbo boost technology allows the processor to run faster than the
rated speed (2.9 GHz) as long as it stays within the design limits for power
consumption and heat generation. This higher speed can boost the clock speed to
as high as 3.5 GHz under optimal conditions to provide a powerful compute
experience.
Recommendation: If you are seeking greater performance over cost, C4 seems to
be the go-to option. When using lots of EBS-optimized EC2 instances with the C3
family, it is recommended to switch to C4 for greater cost savings because C4 does
not charge extra for EBS-optimized instances. At the same time, it offers ultra-high
computation, making it well suited for applications that offer top-end website
hosting, simulation, rendering, risk analysis, and online gaming.
12 Your Ultimate Guide to Cloud Optimization
White Paper
Memory Optimized (R3) Instances
Model vCPU Mem (GiB) SSD Storage (GB)
r3.large 2 15.25 1 x 32
r3.xlarge 4 30.5 1 x 80
r3.2xlarge 8 61 1 x 160
r3.4xlarge 16 122 1 x 320
r3.8xlarge 32 244 2 x 320
R3 instances are specialized for memory-intensive applications. They use the latest
Intel Xeon Ivy Bridge processor and offer one of the best prices per GB of RAM.
Additionally, they can sustain a memory bandwidth of 63,000 MB/s (according to
AWS’ official announcement).
The previous generation M2 and CR1 instance types lacked the latest version of Intel
Xeon processors and enhanced networking. SSD backed storage was only available
to CR1 instances. With R3 instances, major enhancements have been made to
memory bandwidth, I/O performance, memory per instance and price point per GB
of RAM.
Recommendation: R3 instances are great for high performance databases, in-
memory analytics, and distributed memory caches.
13 Your Ultimate Guide to Cloud Optimization
White Paper
GPU Optimized (G2) Instances
Model vCPU Mem (GiB) SSD Storage (GB)
g2.2xlarge 8 15 1 x 60
G2 instances are ideal for gaming applications that require very heavy graphics and
3D application data streaming. This instance family is backed by a high-performance
NVIDIA GPU, and is suitable for audio, video, 3D imaging, and graphic streaming
kinds of applications. In order to run the GPU instances, NVIDIA drivers need to be
installed and can be launched from HVM AMIs.
Recommendation: This instance type is ideal for game streaming, video encoding,
and 3D application streaming.
Storage Optimized (I2) Instances
Model vCPU Mem (GiB) SSD Storage (GB)
i2.xlarge 4 30.5 1 x 800 SSD
i2.2xlarge 8 61 2 x 800 SSD
i2.4xlarge 16 122 4 x 800 SSD
i2.8xlarge 32 244 8 x 800 SSD
I2 instances provide heavy SSDs for random I/Os that are required for databases,
data warehouses and distributed systems such as Hadoop. They are suitable for
NoSQL databases like HBase, Cassandra, MongoDB and OLTP.
The previous generation of HI1 instance types lacked the latest version of Intel Xeon
processors, EBS optimization, enhanced networking and TRIM support.
Recommendation: NoSQL databases, Data warehousing, Distributed systems such
as Hadoop and cluster file systems.
14 Your Ultimate Guide to Cloud Optimization
White Paper
Dense Storage (D2) Instances
Model vCPU Mem (GiB) HDD Storage (GB)
d2.xlarge 4 30.5 3 x 2000GB
d2.2xlarge 8 61 6 x 2000GB
d2.4xlarge 16 122 12 x 2000GB
d2.8xlarge 36 244 24 x 2000GB
D2 instances provide the highest instance store of all EC2 instances, for data-rich
workloads such as NoSQL databases, data warehousing and distributed workloads
like “Hadoop”. It boasts very high read/write speeds (up to 3500/3100 MB/s
respectively) and ranges between three and 24 2TB volumes. While the latter is
equivalent with the previous generation HS1 instance in terms of storage, it exceeds
it over twice-fold in both RAM and number (and generation) of vCPUs.
Recommendation: Distributed file systems, massively parallel processing (MPP)
data warehousing,
15 Your Ultimate Guide to Cloud Optimization
White Paper
EC2 Pricing
Selecting an appropriate instance type requires understanding how an EC2 instance
is priced. AWS provides three types of pricing models:
1. On-Demand Instances EC2’s on-demand purchase option provides more flexibility to end users by
charging per hour of use. Once an instance is started, based on its pricing
model (e.g. OS/size), AWS will charge users according to their pay-as-you-go
model. There is no upfront cost. This is more useful for users that want to try
AWS in production for a few months; for users that don’t use AWS on a
regular basis, but only for a few hours a day; or for spike-natured
applications that scale temporarily.
2. Reserved Instances (RIs) AWS’ EC2 reserved instances provide up to 75% savings for long-running EC2
instances. There are three separate models that charge end users: all costs
upfront, partial costs upfront or no costs upfront. This case is ideal for long
running production systems.
3. Spot Instances In this pricing model, EC2 allows users to bid for unutilized capacity. The only
catch is that the bid rate constantly changes and sometimes if it exceeds your
bid, AWS will terminate your instance with a two-minute notice. This makes it
ideal for temporary jobs like batch processing/Hadoop.
16 Your Ultimate Guide to Cloud Optimization
White Paper
Summary
We explained various instance types, their families, as well as use cases. There are
different parameters that define an instance. The major differences are RAM, ECU
and vCPU.
However, this depends on the type of application that requires the instance. Using
these parameters, we prepared the tables below to help identify the right instance
type for you. The first table specifies EC2 instances with Intel Xeon v2 processor
families or lower. The second table specifies EC2 instances with the new Intel Xeon
v3 processor, which was custom-designed and optimized for EC2.
Instances with Intel Xeon v2 (Sandy Bridge) Architectures
vCPU 1 2-4 5-15 16-23 24-31 32+
RAM
(GB)
0-1
t1.micro
t2.micro
1-
3.75
t2.small C4.large
m3.medium c3.large
4-7.5 t2.medium
m3.large
8-
15.25
c3.xlarge c3.2xlarge
m3.xlarge g2.2xlarge
16-
31
r3.large m3.2xlarge c3.4xlarge
r3.xlarge
32-
63
i2.xlarge r3.2xlarge c3.8xlarge
i2.2xlarge
64-
127
r3.4xlarge
i2.4xlarge
128+ r3.8xlarge i2.8xlarge
Burstable Instances (t2) GPU Optimized (g2)
General Purpose (m3) Storage Optimized (i2)
Compute Optimized (c3) Memory Optimized (r3)
17 Your Ultimate Guide to Cloud Optimization
White Paper
Instances with Intel Xeon v3 (Haswell) Architectures
vCPU 2-4 5-15 16-23 24-31 32+
RAM
(GB)
1-
3.75
c4.large
4-7.5 c4.xlarge
8-
15.25
m4.large c4.2xlarge
16-
31
m4.xlarge c4.4xlarge
32-
63
m4.2xlarge c4.8xlarge
d2.xlarge d2.2xlarge
64-
127
m4.4xlarge
d2.4xlarge
128+ d2.8xlarge
m4.10xlarge
Compute-Optimized (C4) General Purpose (M4)
Dense-Storage (D2)
These tables give an idea of how instances can be chosen. Each row shows an
instance type along with its associated RAM and CPU cores. It may happen that
there could be more than one instance available for the same CPU capacity range,
which means you’d need to decide which one is best for you based on RAM as well
as pricing. It is important to understand that there is no one-size-fits-all need. You
must understand your application requirement (e.g. high CPU/memory, etc...) and
select the right instance that meets your requirement. Choosing between the two
tables depends on your preference of CPU generation: Up to Xeon v2 (Sandy Bridge)
and Xeon v3 (Haswell)
18 Your Ultimate Guide to Cloud Optimization
White Paper
Founded in 2011, Cloudyn is the leader in cloud monitoring and optimization. The
company’s industry award-winning SaaS solution delivers unprecedented insights
into usage, performance, and cost, coupled with custom prescriptive actions for
enhancing performance and reducing cloud spend .With more than 10,000,000
virtual instances monitored Cloudyn helps businesses select the right mix of cloud
vendors, increase operational performance, reduce cloud costs to bring them
under optimum control, and capitalize on customer choice. More than 2,400
customers use Cloudyn’s technology worldwide including F500 industry leaders in
aerospace, infrastructure, consumer online travel services, IT management
consulting, and manufacturing . For more information, interested parties may visit
www.cloudyn.com.
ABOUT CLOUDYN