SlideShare ist ein Scribd-Unternehmen logo
1 von 55
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Adam Boeglin, HPC Solutions Architect
Friday, July 1, 2016
Choosing the Right EC2 Instance
and Applicable Use Cases
 Understanding the factors that going into choosing an EC2 instance
 Defining system performance and how it is characterized for
different workloads
 How Amazon EC2 instances deliver performance while providing
flexibility and agility
 How to make the most of your EC2 instance experience through the
lens of several instance types
What to Expect from the Session
InstancesAPI
Networking
EC2
EC2
Purchase options
Amazon Elastic Compute Cloud is Big
Host Server
Hypervisor
Guest 1 Guest 2 Guest n
Amazon EC2 Instances
In the past
 First launched in August 2006
 M1 Instance
 “One size fits all”
M1
2006 2008 2010 2012 2014 2016
m1.small
m1.large
m1.xlarge
c1.medium
c1.xlarge
m2.xlarge
m2.4xlarge
m2.2xlarge
cc1.4xlarge
t1.micro
cg1.4xlarge
cc2.8xlarge
m1.medium
hi1.4xlarge
m3.xlarge
m3.2xlarge
hs1.8xlarge
cr1.8xlarge
c3.large
c3.xlarge
c3.2xlarge
c3.4xlarge
c3.8xlarge
g2.2xlarge
i2.xlarge
i2.2xlarge
i2.4xlarge
i2.4xlarge
m3.medium
m3.large
r3.large
r3.xlarge
r3.2xlarge
r3.4xlarge
r3.8xlarge
t2.micro
t2.small
t2.med
c4.large
c4.xlarge
c4.2xlarge
c4.4xlarge
c4.8xlarge
d2.xlarge
d2.2xlarge
d2.4xlarge
d2.8xlarge
g2.8xlarge
t2.large
m4.large
m4.xlarge
m4.2xlarge
m4.4xlarge
m4.10xlarge
Amazon EC2 Instances History
x1.32xlarge
t2.nano
Instance generation
c4.large
Instance family Instance size
Choices and Flexibility
 Choice of Processor
 Memory
 Storage Options
 Accelerated Graphics
 Burstable Performance
 Servers are hired to do jobs
 Performance is measured differently depending on the job
Hiring a Server
?
Performance Factors
Resource Performance factors Key indicators
CPU Sockets, number of cores, clock
frequency, bursting capability
CPU utilization, run queue length
Memory Memory capacity Free memory, anonymous paging,
thread swapping
Network
interface
Max bandwidth, packet rate Receive throughput, transmit throughput
over max bandwidth
Disks Input / output operations per
second, throughput
Wait queue length, device utilization,
device errors
Resource Utilization
 For given performance, how efficiently are
resources being used
 Something at 100% utilization can’t
accept any more work
 Low utilization can indicate more resource
is being purchased than needed
Example: Web Application
 MediaWiki installed on Apache with 140 pages of content
 Load increased in intervals over time
Example: Web Application
 Memory stats
Example: Web Application
 Disk stats
Example: Web Application
 Network stats
Example: Web Application
 CPU stats
“Launching new instances and running tests
in parallel is easy…[when choosing an
instance] there is no substitute for measuring
the performance of your full application.”
- EC2 Documentation
How not to choose an EC2 instance
 Brute Force Testing
 Ignoring Metrics
 Favoring old generation instances
 Guessing based on what you already have
EC2 Instance Families
General
purpose
Compute
optimized
C3
Storage and IO
optimized
I2 G2
GPU
enabled
Memory
optimized
R3C4
M4
D2
X1
 Give back instances as easily as you can acquire new ones
 Find an ideal instance type and workload combination
 EC2 Instance Pages provide “Use Case” Guidance
 With EBS, storage and instance size don’t need to be coupled
Instance Selection = Performance Tuning
Instance sizing
c4.8xlarge 2 - c4.4xlarge
≈
4 - c4.2xlarge
≈
8 - c4.xlarge
≈
Choosing the right size
Understand your unit of work
 Web request
 Database / Table
 Batch Process
What is that unit’s requirements?
 CPU threads
 Memory Constraints
 Disk & Network
What are it’s availability requirements?
CPU Instructions and Protection Levels
 CPU has at least two protection levels.
 Privileged instructions can’t be executed in user mode to protect
system. Applications leverage system calls to the kernel.
Kernel
Application
VMM
Application
Kernel
PV
X86 CPU Virtualization: Prior to Intel VT-x
 Binary translation for privileged instructions
 Para-virtualization (PV)
 PV requires going through the VMM, adding latency
 Applications that are system call bound are most affected
Kernel
Application
VMM
PV-HVM
X86 CPU Virtualization: After Intel VT-x
 Hardware assisted virtualization (HVM)
 PV-HVM uses PV drivers opportunistically for operations that
are slow emulated:
 e.g., network and block I/O
Tip: Use HVM AMIs with EBS
Time Keeping Explained
 Time keeping in an instance is deceptively hard
 gettimeofday(), clock_gettime(), QueryPerformanceCounter()
 The TSC
 CPU counter, accessible from userspace
 Requires calibration, vDSO
 Invariant on Sandy Bridge+ processors
 Xen pvclock; does not support vDSO
 On current generation instances, use TSC as clocksource
Tip: Use TSC as clocksource
Review: C4 Instances
 Custom Intel E5-2666 v3 at 2.9 GHz
 P-state and C-state controls
Model vCPU Memory (GiB) EBS (Mbps)
c4.large 2 3.75 500
c4.xlarge 4 7.5 750
c4.2xlarge 8 15 1,000
c4.4xlarge 16 30 2,000
c4.8xlarge 36 60 4,000
Batch & HPC workloads, Game Servers, Ad Serving, & High Traffic Web Servers
What’s new in C4: P-state and C-state control
 Intel Turbo Boost up to 3.5Ghz
 By entering deeper idle states, non-idle cores can achieve up to 300MHz
higher clock frequencies
 But… deeper idle states require more time to exit, may not be appropriate
for latency-sensitive workloads
Tip: P-state control for AVX2
 If an application makes heavy use of AVX2 on all cores, the processor
may attempt to draw more power than it should
 Processor will transparently reduce frequency
 Frequent changes of CPU frequency can slow an application
Review: T2 Instances
 Lowest cost EC2 instance at $0.0065 per hour
 Burstable performance
 Fixed allocation enforced with CPU credits
Model vCPU Baseline CPU Credits
/ Hour
Memory
(GiB)
Storage
t2.nano 1 5% 3 .5 EBS Only
t2.micro 1 10% 6 1 EBS Only
t2.small 1 20% 12 2 EBS Only
t2.medium 2 40%** 24 4 EBS Only
t2.large 2 60%** 36 8 EBS Only
General Purpose, Web Serving, Developer Environments, Small Databases
How Credits Work
 A CPU credit provides the performance of a
full CPU core for one minute
 An instance earns CPU credits at a steady rate
 An instance consumes credits when active
 Credits expire (leak) after 24 hours
Baseline rate
Credit
balance
Burst
rate
Tip: Monitor CPU credit balance
Tip: How to Interpret Steal Time
 Fixed CPU allocations of CPU can be offered through CPU caps
 Steal time happens when CPU cap is enforced
 Leverage CloudWatch metrics
Announced: X1 Instances
 Largest memory instance with 2TB of DRAM
 Quad socket, Intel E7 processors with 128 vCPUs
Model vCPU Memory (GiB) Local
Storage
x1.32xlarge 128 1952 2x 1920GB
In-Memory Databases, Big Data Processing, HPC Workloads
NUMA
 Non-uniform memory access
 Each processor in a multi-CPU system has local memory that is
accessible through a fast interconnect
 Each processor can also access memory from other CPUs, but local
memory access is a lot faster than remote memory
 Performance is related to the number of CPU sockets and how they
are connected - Intel QuickPath Interconnect (QPI)
QPI
122GB 122GB
16 vCPU’s 16 vCPU’s
r3.8xlarge
QPI
QPI
QPIQPI
QPI
488GB
488GB
488GB
488GB
32 vCPU’s 32 vCPU’s
32 vCPU’s 32 vCPU’s
x1.32xlarge
Tip: Kernel Support for NUMA Balancing
 An application will perform best when the threads of its processes are
accessing memory on the same NUMA node.
 NUMA balancing moves tasks closer to the memory they are accessing.
 This is all done automatically by the Linux kernel when automatic NUMA
balancing is active: version 3.8+ of the Linux kernel.
 Windows support for NUMA first appeared in the Enterprise and Data
Center SKUs of Windows Server 2003.
Review: I2 Instances
 16 vCPU: 3.2 TB SSD; 32 vCPU: 6.4 TB SSD
 365K random read IOPS for 32 vCPU instance
Model vCPU Memory
(GiB)
Storage Read IOPS Write IOPS
i2.xlarge 4 30.5 1 x 800 SSD 35,000 35,000
i2.2xlarge 8 61 2 x 800 SSD 75,000 75,000
i2.4xlarge 16 122 4 x 800 SSD 175,000 155,000
i2.8xlarge 32 244 8 x 800 SSD 365,000 315,000
NoSQL Databases, Clustered Databases, Online Transaction Processing (OLTP)
Hardware
Split Driver Model
Driver Domain Guest Domain Guest Domain
VMM
Frontend
driver
Frontend
driver
Backend
driver
Device
Driver
Physical
CPU
Physical
Memory
Network
Device
Virtual CPU
Virtual
Memory
CPU
Scheduling
Sockets
Application
1
23
4
5
Granting in pre-3.8.0 Kernels
 Requires “grant mapping” prior to 3.8.0
 Grant mappings are expensive operations due to TLB flushes
read(fd, buffer,…)
I/O domain Instance
Granting in 3.8.0+ Kernels, Persistent and Indirect
 Grant mappings are setup in a pool once
 Data is copied in and out of the grant pool
read(fd, buffer…)
Copy to
and from
grant pool
2009 – Longer ago than you think
 Avatar was the top movie in the theaters
 Facebook overtook MySpace in active users
 President Obama was sworn into office
 The 2.6.32 Linux kernel was released
Tip: Use 3.8+ kernel
 Amazon Linux 13.09 or later
 Ubuntu 14.04 or later
 RHEL/Centos 7 or later
 Etc.
Device Pass Through: Enhanced Networking
 SR-IOV eliminates need for driver domain
 Physical network device exposes virtual function to instance
 Requires a specialized driver, which means:
 Your instance OS needs to know about it
 EC2 needs to be told your instance can use it
Hardware
After Enhanced Networking
Driver Domain Guest Domain Guest Domain
VMM
NIC
Driver
Physical
CPU
Physical
Memory
SR-IOV Network
Device
Virtual CPU
Virtual
Memory
CPU
Scheduling
Sockets
Application
1
2
3
NIC
Driver
Elastic Network Adapter
 Next Generation of Enhanced Networking
 Hardware Checksums
 Multi-Queue Support
 Receive Side Steering
 20Gbps in a Placement Group
 New Open Source Amazon Network Driver
EBS Performance
 Instance Size Matters
 Match your volume size and
type to your instance
 Use EBS Optimization if EBS
performance is important
 Choose HVM AMI’s
 Time keeping: use TSC
 C state and P state controls
 Monitor T2 CPU credits
 Use a modern Linux kernel
 NUMA balancing
 Persistent grants for I/O performance
 Enhanced networking
Summary: Getting the Most Out of EC2 Instances
 Bare metal performance goal, and in many scenarios already there
 History of eliminating hypervisor intermediation and driver domains
 Hardware assisted virtualization
 Scheduling and granting efficiencies
 Device pass through
Virtualization Themes
Next steps
 Visit the Amazon EC2 documentation
 Launch an instance and try your app!
Thank you!

Weitere ähnliche Inhalte

Was ist angesagt?

Amazon EMR 고급 활용 기법 - AWS Summit Seoul 2017
Amazon EMR 고급 활용 기법 - AWS Summit Seoul 2017Amazon EMR 고급 활용 기법 - AWS Summit Seoul 2017
Amazon EMR 고급 활용 기법 - AWS Summit Seoul 2017
Amazon Web Services Korea
 

Was ist angesagt? (20)

Getting Started with Amazon EC2
Getting Started with Amazon EC2Getting Started with Amazon EC2
Getting Started with Amazon EC2
 
Introduction to Cloud Computing with AWS (Thai Session)
Introduction to Cloud Computing with AWS (Thai Session)Introduction to Cloud Computing with AWS (Thai Session)
Introduction to Cloud Computing with AWS (Thai Session)
 
AWS basics
AWS basicsAWS basics
AWS basics
 
Amazon EMR 고급 활용 기법 - AWS Summit Seoul 2017
Amazon EMR 고급 활용 기법 - AWS Summit Seoul 2017Amazon EMR 고급 활용 기법 - AWS Summit Seoul 2017
Amazon EMR 고급 활용 기법 - AWS Summit Seoul 2017
 
Aws 101 A walk-through the aws cloud (2013)
Aws 101  A walk-through the aws cloud (2013)Aws 101  A walk-through the aws cloud (2013)
Aws 101 A walk-through the aws cloud (2013)
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
 
Amazon EC2 Masterclass
Amazon EC2 MasterclassAmazon EC2 Masterclass
Amazon EC2 Masterclass
 
AWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro TipsAWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro Tips
 
AWS Basics
AWS BasicsAWS Basics
AWS Basics
 
게임을 위한 DynamoDB 사례 및 팁 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
게임을 위한 DynamoDB 사례 및 팁 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming게임을 위한 DynamoDB 사례 및 팁 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
게임을 위한 DynamoDB 사례 및 팁 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
 
Introduction to AWS
Introduction to AWSIntroduction to AWS
Introduction to AWS
 
Amazon Web Services - Elastic Beanstalk
Amazon Web Services - Elastic BeanstalkAmazon Web Services - Elastic Beanstalk
Amazon Web Services - Elastic Beanstalk
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
 
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
 
Getting Started on AWS
Getting Started on AWSGetting Started on AWS
Getting Started on AWS
 
Introducing Amazon Lex
Introducing Amazon Lex Introducing Amazon Lex
Introducing Amazon Lex
 
Microsoft Azure Cloud Services
Microsoft Azure Cloud ServicesMicrosoft Azure Cloud Services
Microsoft Azure Cloud Services
 
HA/DR options with SQL Server in Azure and hybrid
HA/DR options with SQL Server in Azure and hybridHA/DR options with SQL Server in Azure and hybrid
HA/DR options with SQL Server in Azure and hybrid
 
Andy Jassy Illuminates Amazon Web Services
Andy Jassy Illuminates Amazon Web ServicesAndy Jassy Illuminates Amazon Web Services
Andy Jassy Illuminates Amazon Web Services
 
Introduction to AWS Batch
Introduction to AWS BatchIntroduction to AWS Batch
Introduction to AWS Batch
 

Ähnlich wie Choosing the Right EC2 Instance and Applicable Use Cases - AWS June 2016 Webinar Series

Ähnlich wie Choosing the Right EC2 Instance and Applicable Use Cases - AWS June 2016 Webinar Series (20)

Deep Dive on Delivering Amazon EC2 Instance Performance
Deep Dive on Delivering Amazon EC2 Instance PerformanceDeep Dive on Delivering Amazon EC2 Instance Performance
Deep Dive on Delivering Amazon EC2 Instance Performance
 
Deep Dive on Delivering Amazon EC2 Instance Performance
Deep Dive on Delivering Amazon EC2 Instance PerformanceDeep Dive on Delivering Amazon EC2 Instance Performance
Deep Dive on Delivering Amazon EC2 Instance Performance
 
20160503 Amazed by AWS | Tips about Performance on AWS
20160503 Amazed by AWS | Tips about Performance on AWS20160503 Amazed by AWS | Tips about Performance on AWS
20160503 Amazed by AWS | Tips about Performance on AWS
 
Deep Dive on Amazon EC2 Instances - January 2017 AWS Online Tech Talks
Deep Dive on Amazon EC2 Instances - January 2017 AWS Online Tech TalksDeep Dive on Amazon EC2 Instances - January 2017 AWS Online Tech Talks
Deep Dive on Amazon EC2 Instances - January 2017 AWS Online Tech Talks
 
(CMP402) Amazon EC2 Instances Deep Dive
(CMP402) Amazon EC2 Instances Deep Dive(CMP402) Amazon EC2 Instances Deep Dive
(CMP402) Amazon EC2 Instances Deep Dive
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instances
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
 
Introduction on Amazon EC2
Introduction on Amazon EC2Introduction on Amazon EC2
Introduction on Amazon EC2
 
Deep Dive Amazon EC2
Deep Dive Amazon EC2Deep Dive Amazon EC2
Deep Dive Amazon EC2
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
 
CMP301_Deep Dive on Amazon EC2 Instances
CMP301_Deep Dive on Amazon EC2 InstancesCMP301_Deep Dive on Amazon EC2 Instances
CMP301_Deep Dive on Amazon EC2 Instances
 
Deep Dive on Amazon EC2
Deep Dive on Amazon EC2Deep Dive on Amazon EC2
Deep Dive on Amazon EC2
 
Amazon EC2 Instances, Featuring Performance Optimisation Best Practices
Amazon EC2 Instances, Featuring Performance Optimisation Best PracticesAmazon EC2 Instances, Featuring Performance Optimisation Best Practices
Amazon EC2 Instances, Featuring Performance Optimisation Best Practices
 
AWS Summit Bogotá Track Avanzado: EC2 avanzado
AWS Summit Bogotá Track Avanzado: EC2 avanzadoAWS Summit Bogotá Track Avanzado: EC2 avanzado
AWS Summit Bogotá Track Avanzado: EC2 avanzado
 
AWS re:Invent 2016: [JK REPEAT] Deep Dive on Amazon EC2 Instances, Featuring ...
AWS re:Invent 2016: [JK REPEAT] Deep Dive on Amazon EC2 Instances, Featuring ...AWS re:Invent 2016: [JK REPEAT] Deep Dive on Amazon EC2 Instances, Featuring ...
AWS re:Invent 2016: [JK REPEAT] Deep Dive on Amazon EC2 Instances, Featuring ...
 
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
 
Deep Dive on Amazon EC2 Instances - AWS Summit Cape Town 2017
Deep Dive on Amazon EC2 Instances - AWS Summit Cape Town 2017Deep Dive on Amazon EC2 Instances - AWS Summit Cape Town 2017
Deep Dive on Amazon EC2 Instances - AWS Summit Cape Town 2017
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
 
Handle a higher rate of Microsoft SQL Server transactions with Google Cloud C...
Handle a higher rate of Microsoft SQL Server transactions with Google Cloud C...Handle a higher rate of Microsoft SQL Server transactions with Google Cloud C...
Handle a higher rate of Microsoft SQL Server transactions with Google Cloud C...
 
Arquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWS
Arquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWSArquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWS
Arquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWS
 

Mehr von Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Mehr von Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Choosing the Right EC2 Instance and Applicable Use Cases - AWS June 2016 Webinar Series

  • 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Adam Boeglin, HPC Solutions Architect Friday, July 1, 2016 Choosing the Right EC2 Instance and Applicable Use Cases
  • 2.  Understanding the factors that going into choosing an EC2 instance  Defining system performance and how it is characterized for different workloads  How Amazon EC2 instances deliver performance while providing flexibility and agility  How to make the most of your EC2 instance experience through the lens of several instance types What to Expect from the Session
  • 4. Host Server Hypervisor Guest 1 Guest 2 Guest n Amazon EC2 Instances
  • 5. In the past  First launched in August 2006  M1 Instance  “One size fits all” M1
  • 6. 2006 2008 2010 2012 2014 2016 m1.small m1.large m1.xlarge c1.medium c1.xlarge m2.xlarge m2.4xlarge m2.2xlarge cc1.4xlarge t1.micro cg1.4xlarge cc2.8xlarge m1.medium hi1.4xlarge m3.xlarge m3.2xlarge hs1.8xlarge cr1.8xlarge c3.large c3.xlarge c3.2xlarge c3.4xlarge c3.8xlarge g2.2xlarge i2.xlarge i2.2xlarge i2.4xlarge i2.4xlarge m3.medium m3.large r3.large r3.xlarge r3.2xlarge r3.4xlarge r3.8xlarge t2.micro t2.small t2.med c4.large c4.xlarge c4.2xlarge c4.4xlarge c4.8xlarge d2.xlarge d2.2xlarge d2.4xlarge d2.8xlarge g2.8xlarge t2.large m4.large m4.xlarge m4.2xlarge m4.4xlarge m4.10xlarge Amazon EC2 Instances History x1.32xlarge t2.nano
  • 8. Choices and Flexibility  Choice of Processor  Memory  Storage Options  Accelerated Graphics  Burstable Performance
  • 9.  Servers are hired to do jobs  Performance is measured differently depending on the job Hiring a Server ?
  • 10. Performance Factors Resource Performance factors Key indicators CPU Sockets, number of cores, clock frequency, bursting capability CPU utilization, run queue length Memory Memory capacity Free memory, anonymous paging, thread swapping Network interface Max bandwidth, packet rate Receive throughput, transmit throughput over max bandwidth Disks Input / output operations per second, throughput Wait queue length, device utilization, device errors
  • 11. Resource Utilization  For given performance, how efficiently are resources being used  Something at 100% utilization can’t accept any more work  Low utilization can indicate more resource is being purchased than needed
  • 12. Example: Web Application  MediaWiki installed on Apache with 140 pages of content  Load increased in intervals over time
  • 17. “Launching new instances and running tests in parallel is easy…[when choosing an instance] there is no substitute for measuring the performance of your full application.” - EC2 Documentation
  • 18. How not to choose an EC2 instance  Brute Force Testing  Ignoring Metrics  Favoring old generation instances  Guessing based on what you already have
  • 19. EC2 Instance Families General purpose Compute optimized C3 Storage and IO optimized I2 G2 GPU enabled Memory optimized R3C4 M4 D2 X1
  • 20.  Give back instances as easily as you can acquire new ones  Find an ideal instance type and workload combination  EC2 Instance Pages provide “Use Case” Guidance  With EBS, storage and instance size don’t need to be coupled Instance Selection = Performance Tuning
  • 21. Instance sizing c4.8xlarge 2 - c4.4xlarge ≈ 4 - c4.2xlarge ≈ 8 - c4.xlarge ≈
  • 22. Choosing the right size Understand your unit of work  Web request  Database / Table  Batch Process What is that unit’s requirements?  CPU threads  Memory Constraints  Disk & Network What are it’s availability requirements?
  • 23. CPU Instructions and Protection Levels  CPU has at least two protection levels.  Privileged instructions can’t be executed in user mode to protect system. Applications leverage system calls to the kernel. Kernel Application
  • 24. VMM Application Kernel PV X86 CPU Virtualization: Prior to Intel VT-x  Binary translation for privileged instructions  Para-virtualization (PV)  PV requires going through the VMM, adding latency  Applications that are system call bound are most affected
  • 25. Kernel Application VMM PV-HVM X86 CPU Virtualization: After Intel VT-x  Hardware assisted virtualization (HVM)  PV-HVM uses PV drivers opportunistically for operations that are slow emulated:  e.g., network and block I/O
  • 26. Tip: Use HVM AMIs with EBS
  • 27. Time Keeping Explained  Time keeping in an instance is deceptively hard  gettimeofday(), clock_gettime(), QueryPerformanceCounter()  The TSC  CPU counter, accessible from userspace  Requires calibration, vDSO  Invariant on Sandy Bridge+ processors  Xen pvclock; does not support vDSO  On current generation instances, use TSC as clocksource
  • 28. Tip: Use TSC as clocksource
  • 29. Review: C4 Instances  Custom Intel E5-2666 v3 at 2.9 GHz  P-state and C-state controls Model vCPU Memory (GiB) EBS (Mbps) c4.large 2 3.75 500 c4.xlarge 4 7.5 750 c4.2xlarge 8 15 1,000 c4.4xlarge 16 30 2,000 c4.8xlarge 36 60 4,000 Batch & HPC workloads, Game Servers, Ad Serving, & High Traffic Web Servers
  • 30. What’s new in C4: P-state and C-state control  Intel Turbo Boost up to 3.5Ghz  By entering deeper idle states, non-idle cores can achieve up to 300MHz higher clock frequencies  But… deeper idle states require more time to exit, may not be appropriate for latency-sensitive workloads
  • 31. Tip: P-state control for AVX2  If an application makes heavy use of AVX2 on all cores, the processor may attempt to draw more power than it should  Processor will transparently reduce frequency  Frequent changes of CPU frequency can slow an application
  • 32. Review: T2 Instances  Lowest cost EC2 instance at $0.0065 per hour  Burstable performance  Fixed allocation enforced with CPU credits Model vCPU Baseline CPU Credits / Hour Memory (GiB) Storage t2.nano 1 5% 3 .5 EBS Only t2.micro 1 10% 6 1 EBS Only t2.small 1 20% 12 2 EBS Only t2.medium 2 40%** 24 4 EBS Only t2.large 2 60%** 36 8 EBS Only General Purpose, Web Serving, Developer Environments, Small Databases
  • 33. How Credits Work  A CPU credit provides the performance of a full CPU core for one minute  An instance earns CPU credits at a steady rate  An instance consumes credits when active  Credits expire (leak) after 24 hours Baseline rate Credit balance Burst rate
  • 34. Tip: Monitor CPU credit balance
  • 35. Tip: How to Interpret Steal Time  Fixed CPU allocations of CPU can be offered through CPU caps  Steal time happens when CPU cap is enforced  Leverage CloudWatch metrics
  • 36. Announced: X1 Instances  Largest memory instance with 2TB of DRAM  Quad socket, Intel E7 processors with 128 vCPUs Model vCPU Memory (GiB) Local Storage x1.32xlarge 128 1952 2x 1920GB In-Memory Databases, Big Data Processing, HPC Workloads
  • 37. NUMA  Non-uniform memory access  Each processor in a multi-CPU system has local memory that is accessible through a fast interconnect  Each processor can also access memory from other CPUs, but local memory access is a lot faster than remote memory  Performance is related to the number of CPU sockets and how they are connected - Intel QuickPath Interconnect (QPI)
  • 38. QPI 122GB 122GB 16 vCPU’s 16 vCPU’s r3.8xlarge
  • 39. QPI QPI QPIQPI QPI 488GB 488GB 488GB 488GB 32 vCPU’s 32 vCPU’s 32 vCPU’s 32 vCPU’s x1.32xlarge
  • 40. Tip: Kernel Support for NUMA Balancing  An application will perform best when the threads of its processes are accessing memory on the same NUMA node.  NUMA balancing moves tasks closer to the memory they are accessing.  This is all done automatically by the Linux kernel when automatic NUMA balancing is active: version 3.8+ of the Linux kernel.  Windows support for NUMA first appeared in the Enterprise and Data Center SKUs of Windows Server 2003.
  • 41. Review: I2 Instances  16 vCPU: 3.2 TB SSD; 32 vCPU: 6.4 TB SSD  365K random read IOPS for 32 vCPU instance Model vCPU Memory (GiB) Storage Read IOPS Write IOPS i2.xlarge 4 30.5 1 x 800 SSD 35,000 35,000 i2.2xlarge 8 61 2 x 800 SSD 75,000 75,000 i2.4xlarge 16 122 4 x 800 SSD 175,000 155,000 i2.8xlarge 32 244 8 x 800 SSD 365,000 315,000 NoSQL Databases, Clustered Databases, Online Transaction Processing (OLTP)
  • 42. Hardware Split Driver Model Driver Domain Guest Domain Guest Domain VMM Frontend driver Frontend driver Backend driver Device Driver Physical CPU Physical Memory Network Device Virtual CPU Virtual Memory CPU Scheduling Sockets Application 1 23 4 5
  • 43. Granting in pre-3.8.0 Kernels  Requires “grant mapping” prior to 3.8.0  Grant mappings are expensive operations due to TLB flushes read(fd, buffer,…) I/O domain Instance
  • 44. Granting in 3.8.0+ Kernels, Persistent and Indirect  Grant mappings are setup in a pool once  Data is copied in and out of the grant pool read(fd, buffer…) Copy to and from grant pool
  • 45. 2009 – Longer ago than you think  Avatar was the top movie in the theaters  Facebook overtook MySpace in active users  President Obama was sworn into office  The 2.6.32 Linux kernel was released
  • 46. Tip: Use 3.8+ kernel  Amazon Linux 13.09 or later  Ubuntu 14.04 or later  RHEL/Centos 7 or later  Etc.
  • 47. Device Pass Through: Enhanced Networking  SR-IOV eliminates need for driver domain  Physical network device exposes virtual function to instance  Requires a specialized driver, which means:  Your instance OS needs to know about it  EC2 needs to be told your instance can use it
  • 48. Hardware After Enhanced Networking Driver Domain Guest Domain Guest Domain VMM NIC Driver Physical CPU Physical Memory SR-IOV Network Device Virtual CPU Virtual Memory CPU Scheduling Sockets Application 1 2 3 NIC Driver
  • 49. Elastic Network Adapter  Next Generation of Enhanced Networking  Hardware Checksums  Multi-Queue Support  Receive Side Steering  20Gbps in a Placement Group  New Open Source Amazon Network Driver
  • 50. EBS Performance  Instance Size Matters  Match your volume size and type to your instance  Use EBS Optimization if EBS performance is important
  • 51.  Choose HVM AMI’s  Time keeping: use TSC  C state and P state controls  Monitor T2 CPU credits  Use a modern Linux kernel  NUMA balancing  Persistent grants for I/O performance  Enhanced networking Summary: Getting the Most Out of EC2 Instances
  • 52.
  • 53.  Bare metal performance goal, and in many scenarios already there  History of eliminating hypervisor intermediation and driver domains  Hardware assisted virtualization  Scheduling and granting efficiencies  Device pass through Virtualization Themes
  • 54. Next steps  Visit the Amazon EC2 documentation  Launch an instance and try your app!