THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families...

15
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 scalable and available on-demand. AWS’ portfolio constitutes lots of different services like computing, data loading, creating applications, networking, management, workflows, databases, storage and many 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 infrastructure on-premises. This helps in reducing your capital expenditure and provides you with better performance and secure infrastructure, on-demand, relying on an operational expenditure model. Today, AWS is spread across 11 geographical regions (out of which 9 are public and available to registered users), where each region has multiple Availability Zones that provide high availability as well as support to achieve disaster recovery for applications and data. AWS Regions (Orange) and Availability Zones (Blue (Source: Amazon Web Services) 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

Transcript of THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families...

Page 1: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

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 scalable and available on-demand. AWS’ portfolio constitutes lots of different services like computing, data loading, creating applications, networking, management, workflows, databases, storage and many 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 infrastructure on-premises. This helps in reducing your capital expenditure and provides you with better performance and secure infrastructure, on-demand, relying on an operational expenditure model. Today, AWS is spread across 11 geographical regions (out of which 9 are public and available to registered users), where each region has multiple Availability Zones that provide high availability as well as support to achieve disaster recovery for applications and data.

AWS Regions (Orange) and Availability Zones (Blue

(Source: Amazon Web Services)

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

Page 2: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

2 The Definitive Guide for AWS Cloud EC2 Families

White Paper

have improved by leaps and bounds and continue to be of the most important services in AWS’ portfolio.

Elastic Compute Cloud (EC2)

EC2 is the most important 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 as the result of its pay-as-you-go model.

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 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. Since AWS has not provided many details about vCPU, it is possible for two machines with same CPU to have different performance since they could both run on different hardware.

Page 3: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

3 The Definitive Guide for AWS Cloud EC2 Families

White Paper

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). The Para Virtual (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 EC2 instance current generation 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.

Page 4: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

4 The Definitive Guide for AWS Cloud EC2 Families

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 adds growing performance oriented infrastructure in order to offer better performing new 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

Page 5: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

5 The Definitive Guide for AWS Cloud EC2 Families

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

Page 6: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

6 The Definitive Guide for AWS Cloud EC2 Families

White Paper

Five 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 five broad categories based on instance configuration. We have listed all five 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 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 instances are burstable performance instances and generally have a baseline level of CPU performance. The T2 is different than traditional because they do not provide fixed performance rather they 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 fixed set of CPU credits balance and whenever CPU is underutilized, this will result in a CPU credit which is valid for 24 hours. For an example, say you launched a T2 instance and your application is consuming full CPU only during 9 AM to 6 PM and from 6 PM to next day morning 9 AM it is almost not utilized. In this case AWS will create a CPU credit for unutilized hours which can be applied to burst the performance between 9 AM to 6 PM.

To explain the above case: if you have launched t2.medium instance and that instance is just consuming 10% of CPU during 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 credit / hour so it will get 18 additional credits / hour. This credit can be used during 9 AM to 6 PM of higher usage period.

Page 7: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

7 The Definitive Guide for AWS Cloud EC2 Families

White Paper

It is important to note the following: .

This family offers 3 sizes and 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 instance all the credit will be lost. If your instance has consumed all of its CPU credit balance 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.

Page 8: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

8 The Definitive Guide for AWS Cloud EC2 Families

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.

Page 9: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

9 The Definitive Guide for AWS Cloud EC2 Families

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.

Page 10: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

10 The Definitive Guide for AWS Cloud EC2 Families

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 GiB of RAM.

Recommendation: R3 instances are great for high performance databases, in-memory analytics, and distributed memory caches.

Page 11: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

11 The Definitive Guide for AWS Cloud EC2 Families

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 Instances

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, like 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.

Page 12: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

12 The Definitive Guide for AWS Cloud EC2 Families

White Paper

Recommendation: NoSQL databases, Data warehousing, Distributed systems like Hadoop, cluster file systems

HS1 Instances

Model vCPU Mem (GiB) SSD Storage (GB)

hs1.8xlarge 16 117 24 x 2000

Highest in the family in terms of storage, HS1 instances also have the highest SSDs and are used by applications that require sequential I/Os.

Recommendation: These are ideal for data warehousing, Hadoop/MapReduce, and parallel file systems

Page 13: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

13 The Definitive Guide for AWS Cloud EC2 Families

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 spiky-natured applications (that scale temporarily).

2. Reserved Instances (RIs) AWS’ EC2 Reserved Instances provide up to 75% saving 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 the unutilized capacity. The only catch is that the bid rate constantly changes and sometimes if it exceeds your bid, AWS will terminate your instance without notifying you. This makes it ideal for temporary jobs (e.g. Batch Processing/Hadoop).

Page 14: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

14 The Definitive Guide for AWS Cloud EC2 Families

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 table below, to help identify the right instance type for you.

vCPU 1 2-4 5-15 16-23 24-31 32+

Memory (GB)

0-1

t1.micro

t2.micro

1-3.75 t2.small

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

hs1.8xlarge

128+ r3.8xlarge i2.8xlarge

Burstable Instances (t2)

General Purpose (m3)

Compute Optimized (c3)

Memory Optimized (r3)

GPU Optimized (g2)

Storage Optimized (i2)

High Storage Density Optimized (hs1)

Page 15: THE DEFINITIVE GUIDE FOR AWS CLOUD EC2 FAMILIES · The Definitive Guide for AWS Cloud EC2 Families 4 White Paper Two Generations of EC2 Instances Amazon introduced small EC2 instances

15 The Definitive Guide for AWS Cloud EC2 Families

White Paper

This table gives 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 need to understand your application need (such as high CPU / Memory etc.) and select the right instance meeting your requirement.

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