AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
-
Upload
amazon-web-services -
Category
Technology
-
view
728 -
download
2
Transcript of 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
You’re using AWS
and you like it!
But maybe you are spending more
than you planned…
Or you’d just like to spend less
With the AWS
cloud, you only
pay for what you
use.
How do you ensure that you
only pay for what you need?
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.
Chapter I: Build With Cost In Mind (Well Architected)
Analysts have shown AWS reduces cost over the long term
Source: IDC, Quantifying the Business Value of Amazon Web Services (May, 2015)
And we’ve heard it from our customers…
“We’ve seen a 52% total cost of
ownership reduction.”
Ben Wilson
CTO GE Oil & Gas
But it doesn’t just happen.
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.
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
Where do you start?
The Five Pillars of Cost Optimization
Right-sizing your
instances
Pick the right
pricing model
Increase elasticity
Measuring &
monitoring
Match usage to
storage class
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.)
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/
Pillar 3:
Leveraging the Right
Pricing ModelReserved Instances
Spot Instances
On-Demand
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
What’s New?
Introducing New Benefits to
Reserved Instances
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
How to take advantage of
Reserved Instances while
maximizing flexibility?
Introducing Convertible Reserved Instances
With a Convertible Reserved Instance, you can modify
your existing reservation across:
Instance families
Instance sizes
Operating systems
Tenancy
Using Convertible Reserved
Instances to Unlock Savings
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])
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
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
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
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
Strike a Balance
Finding balance between pricing options
Reserved
InstancesOn-Demand Spot
Pillar 4:
Leveraging the Right
Storage ClassBlock Storage
Object Storage
Object Storage is Foundational
And it’s even easier to get data
into S3
But are you optimizing your
object storage?
Object Storage Classes on Amazon S3
Active data Archive dataInfrequently accessed data
Standard
Hot
Standard - Infrequent Access
Warm
Amazon Glacier
Cold
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
Case Study: Putting it Together
A Technology Company
In three months…
A Technology Company
Doubled CPU and
traffic used by its
Web servers
A Technology Company
While reducing
EC2 spend by
33%
$72k saving per month!
How did they do it?
Solving the growth challenge
Step 1: Right-size and update instances
m1 on demand
$0.07 per ECU
c4 on demand
$0.02 per ECU
The impact of right-sizing
70% reduction
in unit cost
Step 2: Reserve
The impact of reservations
30% reduction
In unit cost
Putting it together
85% reduction
in unit cost!
Sounds pretty easy, right?
Not really.
In reality, it is very complex.
• Scale
• Behavioral change
• Visibility
• Ownership
Chapter II: Implement & Maintain(Well Operated)
How do you implement those
best practices at scale? (Spoiler Alert: Remember the 5th Pillar of Cost Optimization?)
Pillar 5: Measure & Monitor
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.
Enabling Cost Transparency
Enabling Cost Transparency
Must have tagging:
• Cost center
• Application or workload
• User
• Expiration date
• Automation support
http://ape.gs/AWSAutoTag
Tools for Measuring &
Monitoring
Option 1: DIYBuild your own custom dashboard
We’ve helped customers set up their own
dashboards and tools.
Metric tracking
savings
Spend & metrics
by account
EC2 usage by
purchase option
Option 2: Use a Partner
And partners have been successful helping
customers monitor & manage cost
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
Option 3: AWS ToolsTrusted Advisor
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)
“We estimate an average
33% monthly savings on our
total AWS spend.”
Amit Vora, CTO for Hungama
Idle Test Instances Running in us-west-1
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
Creating a Culture of Cost
AccountabilityPeople & Process
Solving the
“Principle-Agent Problem”
If you were going to buy a car
tomorrow, what kind of car
would you buy?
Now imagine that someone else
was footing the bill.
Does your answer change?
Bridging the Gap Between Agents & Principles
Principles AgentsCoE
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?
• Aligning Incentives (Carrots & Sticks)
• Automation
• Reporting
• Control & Governance
• Metrics / KPIs
Cloud Center of Excellence
Establish Clear Targets & Metrics
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
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
Chapter III: Getting Started (We can help)
Where to start
Set up a Cloud
Competency Center
Bring in the right
tools
Use metrics to
reinforce behavior
Use partners to
accelerate!
Cycle of cost optimization
✔
✔
✔
✔✘
✘
✘
✘
$
$
$
$
$
How to start your Cost
Optimization Program:
Learnings from Intuit’s cloud journey
Time: Thursday December 1st 1pm
Room: Titan 2202
Session: ENT 314
Support Programs
Well Architected Bootcamp:
Wednesday @ 1 - 5 pm
Cost Optimization Whitepaper:We’re Here to Help
http://aws.amazon.com/well-architected
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 @
Thank you!
Remember to complete
your evaluations!