aws re:invent 2016: cost optimization at scale (ent209)

88
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Keith Jarrett, AWS Business Development Manager, Cloud Economics & Cost Optimization November 29, 2016 ENT209 Cost Optimization at Scale

Upload: amazon-web-services

Post on 16-Apr-2017

730 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Keith Jarrett, AWS Business Development Manager, Cloud Economics & Cost Optimization

November 29, 2016

ENT209

Cost Optimization at Scale

Page 2: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

You’re using AWS

and you like it!

Page 3: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

But maybe you are spending more

than you planned…

Page 4: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Or you’d just like to spend less

Page 5: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

With the AWS

cloud, you only

pay for what you

use.

Page 6: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

How do you ensure that you

only pay for what you need?

Page 7: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

What to expect

We will introduce our framework for optimizing your AWS bill by focusing on paying only for what you need.

Share lessons learned from our most successful customers.

And leave you with actionable ideas to take back to the office to implement immediately.

Page 8: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Chapter I: Build With Cost In Mind (Well Architected)

Page 9: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Analysts have shown AWS reduces cost over the long term

Source: IDC, Quantifying the Business Value of Amazon Web Services (May, 2015)

Page 10: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

And we’ve heard it from our customers…

“We’ve seen a 52% total cost of

ownership reduction.”

Ben Wilson

CTO GE Oil & Gas

Page 11: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

But it doesn’t just happen.

Page 12: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Best Practice Framework for Architecting on AWS

Performance

Ensure a system delivers maximum

performance for a set of resources.

Cost Optimization

Achieve the lowest price for a workload

taking into account fluctuating needs.

Reliability

Ensuring a given system is architected to

meet operational thresholds during a

specific period of time.

Security

Review definitions and compliance best

practices.

Page 13: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Limit

Provisioning

Target

Setting

Automation

Periodic

Review

Charge-

backs

Pricing

Model

Autoscaling

Turn off

unused

Cost

Optimized

Direct

Inputs

Indirect

Inputs

Key Cost

Optimization

Drivers at

Scale

Page 14: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Where do you start?

Page 15: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

The Five Pillars of Cost Optimization

Right-sizing your

instances

Pick the right

pricing model

Increase elasticity

Measuring &

monitoring

Match usage to

storage class

Page 16: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Pillar 1: Right-Sizing

Right-sizing

• Selecting the cheapest instance available

while meeting performance requirements

• Looking at CPU, RAM, storage, and network

utilization to identify potential instances that

can be downsized

• Leveraging Amazon CloudWatch metrics and

setting up custom RAM metrics

Rule of thumb: Right size, then reserve.(But if you’re in a pinch, reserve first.)

Page 17: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Pillar 2: Increase Elasticity

Turn off nonproduction instances

• Look for dev/test, nonproduction instances that

are running always-on and turn them off.

• Lambda + CloudWatch = Automated Scheduling*

Autoscale production

• Use Auto Scaling to scale up and down based on

demand and usage (for example, spikes).

* https://aws.amazon.com/premiumsupport/knowledge-center/start-stop-lambda-cloudwatch/

Page 18: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
Page 19: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Pillar 3:

Leveraging the Right

Pricing ModelReserved Instances

Spot Instances

On-Demand

Page 20: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Reserved Instances for Always-On Instances

Commitment level1 year

3 year

AWS services offering Reserved InstancesAmazon EC2

Amazon RDS

Amazon DynamoDB

Amazon Redshift

Amazon ElastiCache

* Dependent on specific AWS service, size/type, and region

Page 21: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

What’s New?

Introducing New Benefits to

Reserved Instances

Page 22: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

EC2 Instance Growth

2007 2008 201120102009 20162013 2014 2015

3

60+

Increasing customer choice through accelerating

Instance innovation

Instances Launched in 2016:

• Accelerated Computing: p2

• Memory Optimized: x1.16xl

• General purpose: m4.16xl

57

1112

23

42

52

Page 23: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

How to take advantage of

Reserved Instances while

maximizing flexibility?

Page 24: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Introducing Convertible Reserved Instances

With a Convertible Reserved Instance, you can modify

your existing reservation across:

Instance families

Instance sizes

Operating systems

Tenancy

Page 25: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Using Convertible Reserved

Instances to Unlock Savings

Page 26: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

6x

increase

17%

M-1

15%

M0

91%

M1

92%

M2

RI

OD

SPOT

Key

16%

M-2

93%

M3

Improving EC2 RI Usage with Convertible Reserved Instances

(Bar: EC2 Instances by Purchase Option [count])

Page 27: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

39%

Unit Cost

Decrease

17%

M-1

15%

M0

91%

M1

92%

M2

RI

OD

SPOT

Key

16%

M-2

93%

M3

Improving EC2 RI Usage with Convertible Reserved Instances

(Bar: EC2 Instances by Purchase Option [count])

(Line: Cost per Normalized Instance Hour [usd])

Unit Cost*

*Upfront portion amortized

over life of RI

Page 28: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Reserved Instances

Step 1: Reserved Instance Coverage

• Cover always-on resources with standard or

convertible Reserved Instances

Step 2: Increase Reserved Instance

Utilization

• Known architectures: Leverage Standard

Reserved Instance flexibility to increase

utilization.

• Growing or changing architectures: Leverage

Convertible Reserved Instances across

families, sizes, and OS.

• Regional Benefit: Consolidated billing,

reservation not critical

Page 29: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

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

Consider Spot for Elastic Workloads

Page 30: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Spot Rules

50% of OD

75% of OD

25% of OD

You pay the market price

87% discount!

You’ll Never Pay More Than Your Bid

Page 31: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Strike a Balance

Finding balance between pricing options

Reserved

InstancesOn-Demand Spot

Page 32: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Pillar 4:

Leveraging the Right

Storage ClassBlock Storage

Object Storage

Page 33: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Object Storage is Foundational

Page 34: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

And it’s even easier to get data

into S3

Page 35: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

But are you optimizing your

object storage?

Page 36: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Object Storage Classes on Amazon S3

Active data Archive dataInfrequently accessed data

Standard

Hot

Standard - Infrequent Access

Warm

Amazon Glacier

Cold

Page 37: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Running the Numbers: S3 or S3-IAComparing 1 PB of object storage*

1PB Monthly

S3 S3-IA Savings %

$24,117 $14,116 41%

Rule of thumb: Breakeven = 105% Retrieved per Month

Content Accessed

per Month

10%

$24,117 $18,350 24%50%1PB Monthly

$24,117 $23,593 2%100%1PB Monthly

* Based on US-East Prices

Page 38: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Case Study: Putting it Together

Page 39: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

A Technology Company

In three months…

Page 40: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

A Technology Company

Doubled CPU and

traffic used by its

Web servers

Page 41: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

A Technology Company

While reducing

EC2 spend by

33%

$72k saving per month!

Page 42: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

How did they do it?

Page 43: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Solving the growth challenge

Page 44: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Step 1: Right-size and update instances

m1 on demand

$0.07 per ECU

c4 on demand

$0.02 per ECU

Page 45: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

The impact of right-sizing

70% reduction

in unit cost

Page 46: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Step 2: Reserve

Page 47: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

The impact of reservations

30% reduction

In unit cost

Page 48: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Putting it together

85% reduction

in unit cost!

Page 49: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Sounds pretty easy, right?

Not really.

In reality, it is very complex.

• Scale

• Behavioral change

• Visibility

• Ownership

Page 50: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Chapter II: Implement & Maintain(Well Operated)

Page 51: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

How do you implement those

best practices at scale? (Spoiler Alert: Remember the 5th Pillar of Cost Optimization?)

Page 52: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Pillar 5: Measure & Monitor

Page 53: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Automation.

1. Identify always on instances.

2. Identify instances to downsize.

3. Identify warm / cold storage.

4. Recommend Reserved

Instances to purchase.

5. Dashboard our status.

6. Report on savings.

Page 54: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Enabling Cost Transparency

Page 55: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Enabling Cost Transparency

Must have tagging:

• Cost center

• Application or workload

• User

• Expiration date

• Automation support

http://ape.gs/AWSAutoTag

Page 56: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Tools for Measuring &

Monitoring

Page 57: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Option 1: DIYBuild your own custom dashboard

Page 58: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

We’ve helped customers set up their own

dashboards and tools.

Metric tracking

savings

Spend & metrics

by account

EC2 usage by

purchase option

Page 59: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Option 2: Use a Partner

Page 60: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

And partners have been successful helping

customers monitor & manage cost

Page 61: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Leveraging Partners to Drive Optimization

21% Savings

Automated policies and tasks for:

• Termination of unused volumes

• Termination of non-compliant resources

• Notifications of possible budget overages

• Reserved Instance modifications

• And weekend lights-out rules

Page 62: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Option 3: AWS ToolsTrusted Advisor

Page 63: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

AWS Trusted Advisor

Helping customers automate best practices (checks) across

cost optimization, security, fault tolerance, and performance

improvement

Red (action recommended)

Orange (investigation recommended)

Green (no problem detected)

Page 64: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

“We estimate an average

33% monthly savings on our

total AWS spend.”

Amit Vora, CTO for Hungama

Page 65: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
Page 66: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Idle Test Instances Running in us-west-1

Page 67: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Automating Trusted Advisor

with AWS Lambda

AWS Trusted

Advisor

AWS

Lambda

Actions on AWS resources

Amazon

CloudWatch

events

Notifications

http://docs.aws.amazon.com/awssupport/latest/user/cloudwatch-events-ta.html

Page 68: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
Page 69: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
Page 70: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Creating a Culture of Cost

AccountabilityPeople & Process

Page 71: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Solving the

“Principle-Agent Problem”

Page 72: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

If you were going to buy a car

tomorrow, what kind of car

would you buy?

Page 73: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Now imagine that someone else

was footing the bill.

Page 74: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Does your answer change?

Page 75: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Bridging the Gap Between Agents & Principles

Principles AgentsCoE

Page 76: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Questions your COE Should be Asking

1. How much of our workloads are “steady state”?

2. What’s keeping us from reserving capacity?

3. How are we currently handling our elasticity needs?

4. Have we had a Well Architected review with AWS?

5. How can I be more involved in our process?

Page 77: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

• Aligning Incentives (Carrots & Sticks)

• Automation

• Reporting

• Control & Governance

• Metrics / KPIs

Cloud Center of Excellence

Page 78: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Establish Clear Targets & Metrics

Page 79: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Metrics and Targets

% instances turned off daily

% of instances right-sized

% always-on resources covered by Reserved

Instances

% Reserved Instance utilization

✔ ✔

✔ ✔

Define success by establishing metrics and track progress

Cost-Based

Page 80: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Value Based Optimization Metrics

A company’s overall AWS cost should be evaluated as a unit cost ratio with

respect to another defined metric:

𝑈𝑛𝑖𝑡 𝐶𝑜𝑠𝑡 =𝑇𝑜𝑡𝑎𝑙 𝐶𝑜𝑠𝑡

𝐼𝑛𝑑𝑖𝑣𝑖𝑑𝑢𝑎𝑙 𝑜𝑟 𝐵𝑢𝑠𝑖𝑛𝑒𝑠𝑠 𝑀𝑒𝑡𝑟𝑖𝑐

Examples

• Unit cost per customer or active subscriber

• Unit cost per revenue generated

• Unit cost per product or business unit

• Unit cost per internal user

• Unit cost per experiment

• Unit cost per FTE

Align to

Value Drivers

Page 81: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Chapter III: Getting Started (We can help)

Page 82: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Where to start

Set up a Cloud

Competency Center

Bring in the right

tools

Use metrics to

reinforce behavior

Use partners to

accelerate!

Page 83: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Cycle of cost optimization

✔✘

$

$

$

$

$

Page 84: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

How to start your Cost

Optimization Program:

Learnings from Intuit’s cloud journey

Time: Thursday December 1st 1pm

Room: Titan 2202

Session: ENT 314

Page 85: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Support Programs

Well Architected Bootcamp:

Wednesday @ 1 - 5 pm

Cost Optimization Whitepaper:We’re Here to Help

http://aws.amazon.com/well-architected

Page 86: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Trusted Advisor Free Trial

Everyone attending today’s session will get

free access to Trusted Advisor for 30 days.

How it works:

• Trial begins December 6, 2016

• Runs 30 days

• Full suite of checks and best practices available for

those not already on Enterprise & Business Level

Support plans

• No action required – Just log in and start using!

https://aws.amazon.com/premiumsupport/trustedadvisor/Learn more @

Page 87: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Thank you!

Page 88: AWS re:Invent 2016: Cost Optimization at Scale (ENT209)

Remember to complete

your evaluations!