(ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

71
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc. November 12, 2014 | Las Vegas ENT203 Iterating Your Way to 95% Reserved Instance Usage Toban Zolman, Cloudability

description

Managing a large portfolio of reservations across an ever-changing infrastructure requires a sophisticated and systematic approach. Attendees in this session walk away with a strategy for maximizing Reserved Instance (RI) coverage in their organization, as well as an understanding of specific tools and tactics to put that strategy into action. Sponsored by Cloudability. Topics include: - Reducing cycle times on the RI buying process - Building a RI-friendly architecture - Implementing a buy-measure-learn methodology that adapts to change

Transcript of (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Page 1: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.

November 12, 2014 | Las Vegas

ENT203

Iterating Your Way to 95% Reserved

Instance UsageToban Zolman, Cloudability

Page 2: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Today’s topics

• Introduce a Reserved Instance purchasing

methodology

• Understand how RIs are applied

• Learn the best metrics to measure RI

effectiveness

• How to adjust reservations and infrastructure to

achieve 95% coverage Toban Zolman

VP, Product Development

Cloudability

[email protected]

Page 3: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

@cloudabilit

y

Cloud cost analytics

Cloudability

1 2 3

4 5

Spend

management

Spending visibility via

monthly forecasts, dash-

board, budget alerts, and

daily email digests.

Cost

analytics

Dig into your operating

costs with detailed

costs by tag, service,

and usage type.

EC2 usage

analytics

Spot underutilized

resources w/ instance

level usage metrics.

RI purchase

analytics

Understand the exact

combination of reserved

instances that will

maximize your savings.

Enterprise

enablement

Organizational group

views/filtering/rollups,

multi-user access.

$1B+ of cloud spending under management • 13,000 users

Page 4: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

RI buying methodology

Page 5: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Why RIs? And why 95% coverage?

• RIs can be the easiest way to control costsAs a Product & Engineering head, I’d much rather use RIs to reduce cost than work

on other efficiencies

• Every dollar spent on on-demand could be 50% cheaper with an RIWith the exception of unplanned or short-lived usage you should be running almost

everything under a reservation

• With scalable architecture its not practical to have full 100% coverageA monthly buying and modification cycle can net you at about 95% coverage over

the course of a year

Page 6: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

What drives infrastructure changes?

• Application needsApps change, scale, and become more sophisticated needing more compute,

memory, or storage

• Price changesAs Amazon drives down prices, it changes the cost profile of existing infrastructure

• New optimized instance typesLeverage optimized instances to be more efficient

The goal is to anticipate these items and constantly tweak

reservations to maximize coverage (and thus savings)

Page 7: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Bet the house on reactionary purchases

Page 8: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

too little too late

Page 9: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

BURNING MONEY

Page 10: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

How is your company structuring RI buys?

Page 11: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Reservation management

methodology

Page 12: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Reservations Infrastructure

Page 13: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Buy

MeasureLearn

PurchaseAlign

ROI

Minimize time

through loop

Page 14: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Buy

Page 15: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Topics

• Understanding reservations

• Purchasing strategies

Page 16: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Understanding reservations

Page 17: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Cost savings Capacity reservation

Reservations have two parts

Page 18: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Reservations are applied each hour

Page 19: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

What makes up a reservation?

InstanceRI term RI type

Instance family Size OS Location (AZ)

m1 large Linux us-east-1a 1 year Light

r3 8xlarge RHEL us-west-2b 3 years Medium

m3 medium Windows ap-northeast-1b 1 year Heavy

Source: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/reserved-instances-fundamentals.html

Page 20: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Each combination has a different price

There are 2,000+ different reservation configurations

• Each with their own up-front fee

• Each with their own hourly usage price

• Each with their own “break-even” points

Source: http://aws.amazon.com/ec2/pricing/

Page 21: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Purchasing strategies

Page 22: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Buy early and often

Page 23: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Fear, uncertainty, doubt stalls decisions

• Should I wait until prices drop?

• What if our usage changes?

• What if I don’t want to be in a contract for three years?

Page 24: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Actual AWS price history

$0.00

$0.25

$0.50

$0.75

$1.00

3/1/09 12/1/09 9/1/10 6/1/11 3/1/12 12/1/12 9/1/13 6/1/14

1 Year RI 3 Year RI On Demand

Page 25: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Actual AWS price history (effective rate)

$0.00

$0.25

$0.50

$0.75

$1.00

3/1/09 12/1/09 9/1/10 6/1/11 3/1/12 12/1/12 9/1/13 6/1/14

1 Year RI 3 Year RI On Demand

Page 26: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Total price 3 years of use

• Prices drop, but not fast enough to erode saving

• If usage is greater than 50% 3 year RIs saved money

Source: http://blog.cloudability.com/cloud-cost-war-shouldnt-stop-buying-reserved-instances/

Page 27: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Analyze worst case scenarioWhat if we bought an RI the day before a price change?

Old price New price Change

On demand $0.26 $0.208 20%

1 year ri $0.064 $0.056 12.5%

February 2013 price change (m1.large medium RI 80% usage):

Total cost

1 Year RI before

change$1,201

On demand after

change$1,458

New on-demand price still

higher than old RI price

Total cost before and after

Source: http://blog.cloudability.com/cloud-cost-war-shouldnt-stop-buying-reserved-instances/

Page 28: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Cost of waiting for a change

Extra cost for 4 months of OD Savings from locking in new price Amount over paid

$387 $154 $233

Source: http://blog.cloudability.com/cloud-cost-war-shouldnt-stop-buying-reserved-instances/

Page 29: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

It doesn’t pay to waitCONCLUSION

Page 30: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Scenario 2: Purchase frequency

0

13

25

38

50

1 3 5 7 9 11 13 15 17 19 21 23

Page 31: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

On-demand Annual Quarterly Monthly

Total cost $309,053 $205,209 $134,900 $95,854

Discounted hours 0% 48% 90% 95%

Savings 0% 34% 63% 69%

$40k savings

Scenario 2: Purchase frequency

Source: http://blog.cloudability.com/why-you-need-to-buy-aws-reservations-more-than-once-year/

Page 32: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Purchase RIs as frequently as possibleCONCLUSION

Page 33: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Buy

MeasureLearn

Minimize time

through loop

Page 34: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

How to structure monthly purchases

1. Cover as many hours as you can as quickly as you can

The faster you can get coverage the more you will save over time

2. Focus your budget on high confidence purchases

Buy reservations for instances that are (almost) always running

3. Focus on the highest savings first

Buy reservations for instances that have a rapid ROI

Page 35: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Identify instances with high

savings and heavy utilization

Page 36: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

How to structure monthly purchases

1. Cover as many hours as you can as quickly as you can

The faster you can get coverage the more you will save over time

2. Focus your budget on high confidence purchases

Buy reservations for instances that are (almost) always running

3. Focus on the highest savings first

Buy reservations for instances that have a rapid ROI

4. Spread purchases horizontally across infrastructure

Purchase tactically across all instance families to avoid cliffs and

lock-in

Page 37: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Measure

Page 38: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Instance coverage

Page 39: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014
Page 40: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Focus measurement on two factors:

Instance coverage & reducing hourly cost

Page 41: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Learn

Page 42: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Migrate, modify, or mature

Page 43: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Migrate

Page 44: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Migration is about building an

RI friendly architecture:

Increase flexibility & maximize cost savings

Page 45: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

1. Consolidate instance families

Page 46: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Why instance families matter

• RI modifications can only happen within a family

Reservations can be changed at any time from one size to another

within a family

• RIs can apply across consolidated billing accounts

Reservations can apply across linked accounts if the original account

is not using it. Fewer families means more spots an RI can be

applied.

Page 47: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

2. Migrate to modern instances

Page 48: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Cost savings

m1.medium m3.medium

On demand $0.087 $0.07

Heavy RI upfront $247 $222

Heavy RI hourly $0.02 $0.018

Annual cost (100% util) $762 $613

Save $150 yr20% savings

Source: http://aws.amazon.com/ec2/pricing/

Page 49: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Instance type migration pathsLegacy instance type Modern instance type

T1T2

M1

M1 M3

C1 C3

H1 I2

M2R3

CR1

Source: http://aws.amazon.com/ec2/previous-generation/

Page 50: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Migration strategy

• Proactively plan instance type migrations

Finance and Ops have to talk on this one to understand when

upgrades should happen and what impact it has on reservations

• Tactically renew reservations on legacy instances

If you’re going to run a legacy instance for a while, you might as well

cover it with an RI but only renew what you have to

High frequency reservation purchases make this transition easier

Page 51: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

M1 reservations can still be a good deal

Buy RIs on legacy instance types if you are still going to be using

them in 6 months (or shop in the marketplace for shorter term RIs)

savings

Page 52: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Modify

Page 53: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Modifying Reserved Instances

• Instances with Linux OSInstance type (within family)

Availability Zone (within region)

Network (VPC or Classic)

• Instances with a licensed OS or without a familyAvailability Zone (within region)

Network (VPC or Classic)

• Reservations cannot be moved between accounts

Page 54: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

We are family

M1* M2* M3 C1* C3 R3 i2 t2

small

medium

large

xlarge

xlarge

2xlarge

4xlarge

medium

large

xlarge

2xlarge

medium

xlarge

large

xlarge

2xlarge

4xlarge

8xlarge

large

xlarge

2xlarge

4xlarge

8xlarge

xlarge

2xlarge

4xlarge

8xlarge

micro

small

medium

* LEGACY FAMILY

Page 55: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Instance types without a family

• t1.micro*

• cr1.8xlarge*

• cc2.8xlarge*

• cg1.4xlarge*

• cr1.8xlarge*

• hi1.4xlarge*

• hs1.8xlarge

• g2.2xlarge

* LEGACY FAMILY

Page 56: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Modifying instance type

Instance size Normalization factor

micro 0.5

small 1

medium 2

large 4

xlarge 8

2xlarge 16

4xlarge 32

8xlarge 64

Page 57: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

2xlarge

Modifying instance type

=16PTS

Page 58: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

2xlarge

xlarge xlarge

Modifying instance type

168 8+ =

Page 59: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

2xlarge

xlarge xlarge

large large large large

Modifying instance type

Page 60: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

medium medium medium medium medium medium medium medium

2xlarge

xlarge xlarge

large large large large

Modifying instance type

Page 61: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

small small small small small small small small small small small small small small small small

medium medium medium medium medium medium medium medium

2xlarge

xlarge xlarge

large large large large

Modifying instance type

Page 62: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

small small small small small small small small small small small small small small small small

medium medium medium medium medium medium medium medium

2xlarge

xlarge xlarge

large large large large

Modifying instance type

Page 63: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Reservations represent sunk costModifications let you move those reservations to

maximize savings as your infrastructure changes

Page 64: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014
Page 65: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Amazon EC2 Reserved Instance Marketplace

If you simply can’t use existing reservations then selling them

on the marketplace is a viable option

Page 66: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Mature

Page 67: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Coverage is king

Page 68: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Conclusion

Page 69: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Buy

MeasureLearn

PurchaseAlign

ROI

Page 70: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

Take aways

• Buy RIs early and often

• Focus budget on “high confidence” purchases

• Measure RI coverage and cost-per-hour metrics

• Migrate, modify, and mature reservations to achieve 95%

coverage

Page 71: (ENT203) Iterating Your Way To 95% Reserved Instance Usage | AWS re:Invent 2014

http://bit.ly/awsevals