© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Joshua Burgin, General Manager, EC2 Spot, Amazon Web Services November 2016 CMP 202 Get the Most Bang for Your Buck with #EC2 #Winning
Apr 16, 2017
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Joshua Burgin, General Manager, EC2 Spot, Amazon Web Services
November 2016
CMP 202
Get the Most Bang for Your Buck
with #EC2 #Winning
Amazon EC2 purchasing options
On-Demand
Pay for compute capacity by the
hour with no long-term
commitments
For spiky workloads, or to define
needs
Reserved
Make a 1 or 3 Year commitment
and receive a significant
discount over On-Demand
For committed or baseline
utilization
Spot
Pay market price for unused
compute capacity at a steep
discount over On-Demand
For fault tolerant, time-insensitive or
transient workloads
Pillars of performance and cost-optimization
Right sizing Purchasing
options
Increase
elasticity
Measure,
monitor, &
improve
Right sizing
Right sizing
• Selecting the cheapest instance available
while meeting performance requirements
• Looks at CPU, RAM, storage, and network
utilization to identify potential instances that
can be downsized
Increase elasticity
Turn off non-production instances
• Look for dev/test, non-prod instances that are
running always-on and turn off
Automatically scale production
• Use Auto Scaling to scale in and out based on
demand and usage (for example, spikes)
Measure, monitor, and improve: Uncover the
cost-optimization opportunities
Auto-tag resources
Identify always-on non-prod
Identify instances to downsize
Recommend Reserved Instances to purchase
Dashboard our status
Report on savings
AWS pricing principles
Pay as you go
Pay less when you reserve Pay less when AWS grows
No up-front investment
We completed the equivalent
of thirty-nine years of
computational chemistry in just
under 9 hours for a cost of
around $4200.
Steve Litster
Global Head of Scientific Computing, Novartis
”
“
Novartis: Acceleration of pre-clinical R&D
• Existing infrastructure to screen 10
million compounds in a computational
model not available
• New infrastructure would have cost
approximately $40 million to build
Novartis used AWS for HPC
computational chemistry
Amazon EC2 purchasing options
On-Demand Reserved Spot
EC2 On-Demand pricing
Short-term, spiky and
unpredictable
Low cost and
flexibleDevelop and test
EC2 Reserved pricing
Upfront payments to
reduce costs
Steady state Optional capacity
reservationNew
Characteristic Standard
Payment No upfront
Partial upfront
All upfront
Commitment 1 year
3 year
Sellable on RI Marketplace Yes
Change Availability Zone, instance size
(Linux), networking type
YesConsole and API:
ModifyReservedInstances
Change instance families, operating
system, and tenancy
No
Savings* Up to 75%
Standard Reserved Instance details
* Dependent on AWS service, size/type, and region
2007 2008 2009 2010 2011 2012-2013 2014
m1.xlarge
m1.large
m1.small
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
cc2.8xlarge
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
c3.large
c3.xlarge
c3.2xlarge
c3.4xlarge
c3.8xlarge
cr1.8xlarge
hs1.8xlarge
m3.xlarge
m3.2xlarge
hi1.4xlarge
m1.medium
cc2.8xlarge
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
c3.large
c3.xlarge
c3.2xlarge
c3.4xlarge
c3.8xlarge
hs1.8xlarge
m3.xlarge
m3.2xlarge
hi1.4xlarge
m1.medium
cc2.8xlarge
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
new
existing
g2.2xlarge
m3.medium
m3.large
i2.large
i2.xlarge
i2.4xlarge
i2.8xlarge
r3.large
r3.xlarge
r3.2xlarge
r3.4xlarge
r3.8xlarge
t2.micro
t2.small
t2.medium
c4.large
c4.xlarge
c4.2xlarge
c4.4xlarge
c4.8xlarge
Increasing customer choice…
2010
latest
2015
c3.large
c3.xlarge
c3.2xlarge
c3.4xlarge
c3.8xlarge
hs1.8xlarge
m3.xlarge
m3.2xlarge
hi1.4xlarge
m1.medium
cc2.8xlarge
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
g2.2xlarge
m3.medium
m3.large
i2.large
i2.xlarge
i2.4xlarge
i2.8xlarge
r3.large
r3.xlarge
r3.2xlarge
r3.4xlarge
r3.8xlarge
t2.micro
t2.small
t2.medium
c4.large
c4.xlarge
c4.2xlarge
c4.4xlarge
c4.8xlarge
d2.xlarge
d2.2xlarge
d2.4xlarge
d2.8xlarge
m4.large
m4.xlarge
m4.2xlarge
m4.4xlarge
m4.10xlarge
t2.large
As Technology Advances…
…Convert Your Reserved Instances
The Convertible Reserved Instance is a new type of Reserved Instance
that can be exchanged during the 3 year term for new Convertible
Reserved Instances of equal or greater value. The new Convertible
Reserved Instances can correspond to a different instance family or a
new price, instance size, platform, or tenancy
instance optimized
instance
Convertible Reserved Instance details
* Dependent on AWS service, size/type, and region
Characteristic Standard Convertible
Payment No upfront
Partial upfront
All upfront
No upfront
Partial upfront
All upfront
Commitment 1 year
3 year 3 year
Sellable on RI Marketplace Yes Coming soon
Change Availability Zone, instance size
(Linux), networking type
YesConsole and API:
ModifyReservedInstances
Yes
Console and API:ExchangeReservedInstances
Change instance families, operating
system, and tenancy
No Yes
Savings* Up to 75% Up to 45%
EC2 Spot pricing
Users with urgent
computing needs or
large amounts of
additional capacity
Time or instance
flexible
Experiment and/or
build cost-sensitive
businesses
Spot Instance details
Options
• Spot Fleet to maintain instance
availability
• Spot block durations (1-6 hours) for
workloads that must run continuously
Commitment level
• None
* Compared to On-Demand price based on specific EC2 instance type, region, and Availability Zone
Spot rules
Markets where the price of compute changes based on supply and demand
You’ll never pay more than your bid
50% bid
of OD
75% bid of OD
25% bid of OD
You pay the
market price
87% discount!
Which EC2 purchasing model is right for me?
Have a balanced meal!
Why choose just one business model?
Use a combination of all three!
1. Use Reserved Instances for known/steady-state workloads
2. Set up multiple Auto Scaling groups
3. Scale using Spot, On-Demand, or both
0
2
4
6
8
10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/Spot
On-Demand
Spot
Reserved
Examples
Example: Three-tier web app
Tagging is essential!
• How do we explain the costs?
• How do we allocate the charges to the right team?
• How do we save money?
Tagging is essential!
Stateless
Scale based on demand
Web tier
0
5
10
15
20
25
30
35
40
0 2 4 6 8 10 12 2 4 6 8 10
Web servers
Reserved Spot On-Demand
0
50
100
150
200
250
300
350
400
0 2 4 6 8 10 12 2 4 6 8 10
Web traffic
App tier
Stateful
Scale based on demand
0
10
20
30
40
50
0 2 4 6 8 10 12 2 4 6 8 10
App servers
Reserved On-Demand Spot block0
100
200
300
400
500
0 2 4 6 8 10 12 2 4 6 8 10
App requests
Database Tier
Highly stateful
Static at peak load
0
0.5
1
1.5
2
2.5
3
3.5
0 2 4 6 8 10 12 2 4 6 8 10
Database servers
Reserved On-Demand Spot0
100
200
300
400
500
600
700
800
900
0 2 4 6 8 10 12 2 4 6 8 10
Database requests
Summary: Three-tier web app
0
10
20
30
40
50
60
70
80
90
0 2 4 6 8 10 12 2 4 6 8 10
Three-tier application servers
Reserved On-Demand Spot
Summary
Have a balanced meal! Across the three
tiers, our meal consists of:
• Spot 13%
• On-Demand 11%
• Reserved 76%
Remember!
“No server is easier to manage than no
server” - Werner Vogels, CTO, Amazon.com
Ubisoft uses AWS to develop and launch
social games quickly
• Ubisoft is a Paris-based gaming company, and
creator of popular gaming titles, including Assassins
Creed, Far Cry, and Just Dance
• Moving games to social and mobile platforms
required capacity to scale fast; using a traditional
environment would be an extensive and costly
investment
• Using the AWS Cloud to optimize games at the
application, caching, and data layers, improving the
user experience
”
“By using the AWS cloud we
were able to launch 10 social
games within 18 months.
Lenin Gali
Senior Director, Ubisoft
Example: Grid processing
Time
Typical server utilization rates are low due to need to deploy for peak needs…
The old way: Low utilization, high costs
Time
Higher grid utilization rates result in hidden costs: longer queue wait times
and delayed results
The old way: Managing utilization with grids
0
20
40
60
80
100
120
140
160
3 year Reserved Instances
?
The old way: In the cloud!
Higher utilization can reduce IT spending…
0%
20%
40%
60%
80%
100%
Grid Utilization
The world as seen by central IT
-600%
-500%
-400%
-300%
-200%
-100%
0%
100%
0
200
400
600
800
1000
1200
1400
Jobs in the Queue
Grid Utilization
But higher utilization also creates IT constraints…
Every job in the
queue represents
business impact
But Grid
Utilization looks
great!
The world as seen by the business
Reduced Time
Project
Acceleration
Scale higher to reduce time to results: shorter wait times, greater agility,
faster innovation cycles
The cloud way: Scalability when needed
?
The new way: In the cloud!
0
100
200
300
400
500
600
1 2 3 4 5 6 7 8 9 10 11 12
Optimizing for cost and business results
Spot
Spot block
On-Demand
3 year Reserved Instances
0
100
200
300
400
500
600
1 2 3 4 5 6 7 8 9 10 11 12
Going a step further with Spot blocks!
Spot
Spot block
On-Demand
3 year Reserved Instances
The new way: In the cloud!
?
“We constantly understate what our capabilities are to solve problems. The
biggest constraint is never the constraint of time or money, it’s generally the
constraint of thought.”
– Jeff Smith, CEO, Suncorp Business Services
Founded: 1996 • Employees: 15,000+ • Headquarters: Brisbane, Australia
Accelerating transformation
EC2 purchasing options by industry
Web scale (e.g. Adtech) company Enterprise SaaS company
Purchasing model by industry
Onboarding enterprise Gaming company
Purchasing model by industry
Technology companyScientific research
Purchasing model by industry
Different purchasing options in a single company
Data science
New app development Test and development
Internal IT
Let’s recap
Remember the pillars of optimization Right-sizing
Increase elasticity (turn stuff off!)
Measure, monitor, and improve
Use tags to understand your services
There are 3 core purchasing options – have a balanced meal
Architect your workloads with performance and cost in mind
Summary
Freedom to build
unfettered
Freedom to get real
value from dataFreedom to say yes
AWS is more cost-effective in both short-term and long-term than on-premises
environments. By leveraging the EC2 purchasing models, you gain the…
Thank you!
Remember to complete
your evaluations!
Related Sessions
CMP205: Lessons Learned from a Year of Using Spot Fleet
CMP302: Disrupting Big Data with Cost-effective Compute
CMP307: Save 90% and Run Production Workloads on SPOT
CMP316: Spark on AWS (with SPOT)
ENT209: Cost Optimization at Scale
WIN307: Searching Inside Video at Petabyte Scale Using Spot