The Science of Saving with AWS Reserved Instances

71
@cloudability

Transcript of The Science of Saving with AWS Reserved Instances

@cloudability

@cloudability

The Science of Saving with Reserved Instances

@cloudability

Infrastructure analytics for scaled web businesses and enterprises.

Cloud Cost ManagementAbout Us

$2B+ in tracked cloud costs. 14,000+ Users

Confidential, @cloudability

Dashboards Alerts API AccessReports

Detailed Billing Report Files

We generate custom dashboards, reports, recommendations and alerts

We retrieve your data using read only IAM credentials

AWS provides complex billing and usage data

We organize & analyze your cost & usage data

How It Works

CloudWatch & Usage APIs

(CPU, Bandwidth, Disk I/O)

EC2 APIs (Instance Dimensions,

Reservations)

@cloudability

Our SolutionsHow It Works

1 2 3

4 5

Spend Monitoring Spending visibility via custom dashboards, budget alerts, and daily email digests.

Cost Allocation Segment your cloud costs with detailed reports by tag, service, usage type, etc..

Usage Optimization Spot under-utilized resources w/ instance level usage metrics.

RI Portfolio Optimization Get recommendations to buy, modify and sell the right RIs. Then see their impact on your spending.

Company-Wide Governance Organizational group views/filtering/rollups, multi-user access.

@cloudability

How Good RIs Go Bad

๏ @cloudability7

0

45

90

135

180

Dev

/Tes

t

POC

App

#1

App

#3

App

#2

Exec team starts

really caring

“Loa

d Te

st”

How one company came to buy RIs

1.

Reserved cost

60% drop in spending

The Promise of RIs

@cloudability

Just bought… a bunch of RIs

๏ @cloudability10

0

45

90

135

180

The next month the bill went up anyway…

@cloudability11

1) Wrong people – didn’t involve business stakeholders

2) Wrong data – didn’t use billing data 3) Wrong time – bought based on future plans

They bought the wrong RIs due to…What Went Wrong

๏ @cloudability12

With RIs there’s a technology decision to make as well as a financial one.

- Tech commits to using a certain type of instance at least until the breakeven point

- Business commits to spending a certain amount of money and decides how to deploy capital (now or later)

Bought All Upfront Ris, increasing cash outlay and removing ability to do intra-month waste reporting.

1) Didn’t Involve Business/Finance StakeholdersWhat Went Wrong

@cloudability13

RIs are a billing construct, they are not a technology.

Tech knew they were running RHEL

... but they brought their own licenses so were actually being billed from vanilla Linux by AWS.

As a result their new RHEL RIs weren’t applied.

2) Didn’t Use Billing Data for RI PlanningWhat Went Wrong

@cloudability14

RIs applied each hour and can be changed rapidly.

Tech team expected to move from m3’s to c3’s in a few weeks so bought C3 Ris. ... but the move was delayed by several months.

As a result their new c3 RIs weren’t applied.

3) Bought based on future plans, not actualWhat Went Wrong

@cloudability@cloudability15

Cloud is Designed for “Just In Time Purchasing”

@cloudability

It was time for a new process and new players…

Buy

MeasureLearn

PurchaseAlign

ROI

RI Buying Cycle

๏ @cloudability

(n) RI Czar is a person or team focused on looking at the AWS billing data each month to identify opportunities to increase Reserved Instance coverage.

Why appoint one?

• Proper purchasing of Ris can save 30-60% on your AWS bill

• Assuming a $1M/yr spend there’s a potential savings of $300k+ year.

• Usually is a technically minded person in finance, procurement or vendor management

Introducing the “RI Czar”

@cloudability

Before we talk process, let’s go back to the basics…

@cloudability@cloudability

Cost Savings Capacity Reservation

Reservations have two parts

@cloudability@cloudability

Reservations give you 744 hourly coupons that can applied each hour of the month

@cloudability

RI Mechanics

What Makes Up a Reservation?

InstanceRI Term RI Type

Instance Family Size OS Location (AZ)

m1 large Linux us-east-1a 1 year No upfront

r3 8xlarge RHEL us-west-2b 3 years Partial upfront

m3 medium Windows ap-northeast-1b 1 year All upfront

@cloudability

RI Mechanics

The difference is in the payment structure

Upfront Fee Monthly Fee Savings

No upfront NO YES 28.6%

Partial upfront YES YES 38.1%

All upfront YES NO 39.4%

m3.medium:us-east:linux

All RI types are a commitment to pay for full utilization

(even if you don’t use it)

Reservations Infrastructure

@cloudability

RI “affinity” between linked accounts

@cloudability

Reservations in Linked AccountsUnderstanding Reservations

1.Master

Payer

1.Linked

Acc’t1.

Linked

Acc’t

@cloudability

Reservations in Linked AccountsUnderstanding Reservations

1.Master

Payer

1.Linked

Acc’t1.

Linked

Acc’t 1. RI

1. RI

@cloudability

Reservations in Linked AccountsUnderstanding Reservations

1.Master

Payer

1.Linked

Acc’t1.

Linked

Acc’t

1.$ 1.c

1.$ 1.c

1.$ 1.csavings capacity

@cloudability

Reservations in Linked AccountsUnderstanding Reservations

1.Master

Payer

1.Linked

Acc’t1.

Linked

Acc’t

1.$ 1.c

@cloudability

Reservations in Linked AccountsUnderstanding Reservations

1.Master

Payer

1.Linked

Acc’t1.

Linked

Acc’t

1.c

1.$1.$

@cloudability

Reservations in Linked AccountsUnderstanding Reservations

1.Master

Payer

1.Linked

Acc’t1.

Linked

Acc’t 1. RI

@cloudability

Reservations in Linked AccountsUnderstanding Reservations

1.Master

Payer

1.Linked

Acc’t1.

Linked

Acc’t1.c

1.$

1.$

Buy

MeasureLearn

PurchaseAlign

ROI

minimize time

through loop

@cloudability

Instrumentation

Two primary metrics

Green Line: Percentage of hours that are covered by reservations

Red Line: Amount of unused (but paid for) RI hours

Start with the Green Line

Green are hours that are running under reservations

Blue are on-demand

Start with the Green Line Monitor your RI Coverage Throughout the Month

Keep tabs on the “Red” Line = Amount of unused RI hours

Month over month total spending on Ris vs. Unused Ri hours

Total Hours

Buy

MeasureLearn

PurchaseAlign

ROI

@cloudability

RI Management

Buying Reserved Instances

1. Walk before you run. First buy should be small and uncontroversial.

2. Focus your budget on high confidence purchases first

3. Focus on the highest savings first

@cloudability@cloudability

Plan based on the master if possible

Date range is key

@cloudability@cloudability

Look at each class of instance

@cloudability@cloudability

Start with high savings

@cloudability@cloudability

Also look at high confidence (high usage)…

@cloudability@cloudability

Confirm the math behind each purchase

When will you start saving?

Why is the purchase needed?

Buy

MeasureLearn

PurchaseAlign

ROI

Track impact of buys against goals with Green Line

Green are hours that are running under reservations

Blue are on-demand

Many organizations strive for 80%+ coverage

How many of our

prepaid RI hours

have we used?

“Red Line” = Number of unused RI hours

Total Hours

@cloudability@cloudability

Wait. We made a ‘good’ RI purchase last month.

Why didn’t my bill go down?

@cloudability@cloudability

Remember: An effective RI purchase drives hourly rates down but increasing

usage may overshadow the savings.

Get granular with specific RI classes to see how rates were affected…

Buy

MeasureLearn

PurchaseAlign

ROI

@cloudability@cloudability

Decrease Red Line (unused RI hours)by making RI “Modifications"

@cloudability

You can modify within a family…

@cloudability

Modifying Instance TypeUnderstanding Reservations

2xlarge 16 PTS=

@cloudability

Modifying Instance TypeUnderstanding Reservations

2xlarge

xlarge xlarge

168 8+ =

@cloudability

Modifying Instance TypeUnderstanding Reservations

2xlarge

xlarge xlarge

large large large large

@cloudability

Modifying Instance TypeUnderstanding Reservations

2xlarge

xlarge xlarge

large large large large

medium medium medium medium medium medium medium medium

@cloudability

Modifying Instance TypeUnderstanding Reservations

2xlarge

xlarge xlarge

large large large large

medium medium medium medium medium medium medium medium

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

@cloudability

Modifying Instance TypeUnderstanding Reservations

2xlarge

xlarge xlarge

large large large large

medium medium medium medium medium medium medium medium

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

@cloudability

You can also modify within a region…

@cloudability

Us-east-1a RIs can modify to: us-east-1b

us-east-1c

us-east-1dus-west-2a

@cloudability@cloudability

Calculate modifications before purchases

@cloudability@cloudability

Modifications utilize underused reservationsUnderused

RIs

Currently on-demand

@cloudability@cloudability

Sunk cost of Unused RIs = $744/mo ($0.25/hr * 744) * 4 RIs

Savings from modifications are two-fold

r3.2xlarge hourly pricing

RI 3-year all-upfront = $0.25/hr

on-demand = $0.70/hr

On-demand savings assumes 100% usage

Unnecessary on-demand charge = $2,080/mo ($0.70/hr * 744) * 4 equivalent units

Total savings = $2,824/mo

@cloudability@cloudability

Increase modification opportunities

by focusing on common families and regions

Plan by family

Plan by region

Buy

MeasureLearn

PurchaseAlign

ROI

repeat as often

as you can

@cloudability

Reserved Instance Strategy

Typical RI Buying Schedule

28th of the month:Modifications executed

29th of the month:RI Recommendations pulled from Cloudability

30th to 31st of the month:Data is reviewed with stakeholders

1st of the month:Purchase is made

๏ @cloudability69

1) RIs are frequently misunderstood. Train everyone on the fundamentals.

2) RI Coverage changes constantly. Start tracking your Green Line (percentage of hours covered by an RI) and Red Line (cost of unused RI hours) closely.

3) Modifications are powerful and free. Make modifications to maximize use of RIs (easy) when your infrastrucrure changes.

4 ) It’s easy to get distracted. Appoint an RI Tzar and schedule monthly RI management meetings to ensure changes happen.

5) Manage iteratively. Make small, uncontroversial purchases with future modification in mind to keep up with infrastructure changes.

Things to remember (and do) after this presentation

@cloudability

Thank you!Try Cloudability free

Learn more

Questions

cloudability.com

blog.cloudability.com

[email protected]

@cloudability@cloudability