Journey Through the AWS Cloud; Cost Optimisation
Upcoming SlideShare
Loading in...5
×
 

Journey Through the AWS Cloud; Cost Optimisation

on

  • 1,437 views

Listen to the webinar recording: http://youtu.be/XLrDxRiLg70 ...

Listen to the webinar recording: http://youtu.be/XLrDxRiLg70

This is the final in our series of webinars, 'Journey Through the AWS Cloud'. This webinar discusses strategies to help you save money in the AWS Cloud.

From turning systems off at night, to implementing bidding strategies on the spot market, there are many ways in which you can manage costs in AWS. This webinar will dive into the differences between instance types, explain the intricacies of Reserved Instances, the spot market and architecting to reduce costs. It discusses how to combine on-demand pricing with spot pricing to perform cost effective big data analysis, and introduce customer examples to illustrate how AWS customers gain the most from AWS whilst at the same time managing their spend.

Statistics

Views

Total Views
1,437
Views on SlideShare
1,437
Embed Views
0

Actions

Likes
5
Downloads
79
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Journey Through the AWS Cloud; Cost Optimisation Journey Through the AWS Cloud; Cost Optimisation Presentation Transcript

  • Journey through the Cloud: Cost optimization Ryan Shuttleworth – Technical Evangelist @ryanAWS
  • Journey through the cloudCommon use cases & stepping stones into the AWS cloud Learning from customer journeys Best practices to bootstrap your projects
  • Cost Optimization A key step in the cloud journey Realize cost aware architecturesUse elasticity to real and measurable benefit Do more, use less
  • AgendaFundamentals of AWS cost optimizationCost optimization in 5 stepsWhere to go next
  • Fundamentals of cost optimization
  • Why optimize?
  • Why optimize? UtilityCompute and Storageare a utility so ‘turningoff’ should be natural
  • Why optimize? Utility EfficiencyCompute and Storage Efficiency allowsare a utility so ‘turning more to be doneoff’ should be natural within a given budget
  • Why optimize? Utility Efficiency ArchitectureCompute and Storage Efficiency allows Cost awareness drivesare a utility so ‘turning more to be done adoption of 21st centuryoff’ should be natural within a given budget architectures
  • Turn off the lightsWhen you stop EC2 resources you stop paying for them
  • Be elastic Support workloads with the rightamount of horsepower to get the job done
  • Continually optimizeDrive recurring and improving savings through cost aware architectures
  • 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  • 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  • Server Load 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Hour of day
  • Server Load Capacity of 1 Server 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Hour of day
  • Traditional capacity requiredServer Load Capacity of 1 Server 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Hour of day
  • Traditional capacity requiredServer Load Capacity of 1 Server 1 Server for 8 hours 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Hour of day
  • Traditional capacity requiredServer Load Capacity of 1 Server 1 Server for 8 hours 1 Server for 8 hours 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Hour of day
  • Traditional capacity required 1 Server for 8 hoursServer Load Capacity of 1 Server 1 Server for 8 hours 1 Server for 8 hours 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Hour of day
  • Traditional capacity required 1 Server for 8 hoursServer Load Capacity of 1 Server 1 Server for 8 hours 1 Server for 8 hours 1 Server for 8 hours 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Hour of day
  • Traditional capacity requiredServer Load Capacity of 1 Server 1/3rd Saving 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Hour of day
  • Elastic Capacity2 am
  • Elastic Capacity8 am
  • Elastic Capacity12 am
  • Elastic Capacity4 pm
  • Elastic Capacity10 pm
  • Time: +00h <10 coresElastic Capacity
  • Time: +24h >1500 coresElastic Capacity
  • Time: +72h <10 coresElastic Capacity
  • Time: +120h >600 coresElastic Capacity
  • Auto-scaling policies Manually By Schedule Send an API call or use CLI to Scale up/down based on date launch/terminate instances – and time Only need to specify capacity change (+/-) By Policy Auto-Rebalance Scale in response to changing Instances are automatically conditions, based on user launched/terminated to configured real-time ensure the application is monitoring and alerts balanced across multiple Azs
  • Auto-scaling policies Scaling base on Policy Scaling by ScheduleScale up and down base on metrics Scheduled Actions to meet known demandScaling Up policy - Double the group size if avg cpu > 80% Scheduled up to 31 days into the futureScaling Down policy - Decrement by Recurring scheduled scaling activities 10% if avg cpu < 30%
  • 6 5Instance Count 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930 Day of Month
  • 6 5 MonthlyInstance Count 4 predictable 3 peak processing 2 1 0 0 1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930 Day of Month
  • Traditional capacity required 6 5Instance Count 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930 Day of Month
  • Traditional capacity required 6 5Instance Count 4 3 2 1 Elastic Capacity 0 0 1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930 Day of Month
  • Traditional capacity required 6 5Instance Count 4 75 % Savings 3 2 1 Elastic Capacity 0 0 1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930 Day of Month
  • 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  • 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  • Instance types
  • Instance types Start Choose instance that meets your basic requirements bestMatch memory & virtual cores
  • Instance types Start Tune Choose instance that Change instance size up meets your basic or down based upon requirements best monitoringMatch memory & virtual Use trusted advisor to cores assess
  • Instance types Start Tune Spread Choose instance that Change instance size up Run instances across meets your basic or down based upon multiple availability requirements best monitoring zonesMatch memory & virtual Use trusted advisor to Smaller sizes equals cores assess greater granularity
  • Know your usage Free Memory Free CPU Free HDD PUT 2 weeks … Custom Metrics … Amazon Instance At 1-min intervals Alarm CloudWatch
  • Choose your metric optimize for the metric
  • Choose your metric optimize for the metric Cost per unit of work per instance(size) Workload A Workload B Workload COptimal on 4x Optimal on 10x Optimal on 2x m1.xlarge m1.medium m3.xxlarge
  • Choose your metric optimize for the metric Cost per unit of work per instance(size)100 concurrent jobs on 10 x m1.large @ $0.26 / hr = $ 0.026 / job vs300 concurrent jobs on 10 x m3.xlarge @ $0.58 / hr = $ 0.019 / job
  • Choose your metric optimize for the metric Think workload densityDon’t focus on instance hourly rate per se
  • Master Accountaws.invoices@mycompany.com
  • Master Account aws.invoices@mycompany.comconsolidated billing information Division B admin@divisionB.com IAM User2 Dev2 Admin2
  • Master Account aws.invoices@mycompany.comconsolidated billing information Tags: (key- value) Division B e.g Own=Div Proj=R admin@divisionB.com IAM User2 Dev2 Admin2 Tags: Tags: Tags: Own=Div Own=Div Own=Div Proj=P Proj=Q Proj=R
  • Master Account aws.invoices@mycompany.com consolidated billing information Operating Co. A Division B Business Unit C admin@opcoa.com admin@divisionB.com admin@busUnitC.com User1 User2 User3 IAM IAM IAM Dev1 Dev2 Dev3 Admin1 Admin2 Admin3Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags:Own=OpCo Own=OpCo Own=OpCo Own=Div Own=Div Own=Div Own=BusC Own=BusC Own=BusCProj=A Proj=B Proj=C Proj=P Proj=Q Proj=R Proj=X Proj=Y Proj=Z
  • Master Account aws.invoices@mycompany.com consolidated billing information Operating Co. A Division B Business Unit C admin@opcoa.com admin@divisionB.com admin@busUnitC.com User1 User2 User3 IAM IAM IAM Dev1 Dev2 Dev3 Admin1 Admin2 Admin3Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags:Own=OpCo Own=OpCo Own=OpCo Own=Div Own=Div Own=Div Own=BusC Own=BusC Own=BusCProj=A Proj=B Proj=C Proj=P Proj=Q Proj=R Proj=X Proj=Y Proj=Z
  • Programmatic billing access Master Account aws.invoices@mycompany.com S3 CSV consolidated billing information Operating Co. A Division B Business Unit C admin@opcoa.com admin@divisionB.com admin@busUnitC.com User1 User2 User3 IAM IAM IAM Dev1 Dev2 Dev3 Admin1 Admin2 Admin3Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags:Own=OpCo Own=OpCo Own=OpCo Own=Div Own=Div Own=Div Own=BusC Own=BusC Own=BusCProj=A Proj=B Proj=C Proj=P Proj=Q Proj=R Proj=X Proj=Y Proj=Z
  • Programmatic billing access Master Account aws.invoices@mycompany.com S3 CSV consolidated billing information Operating Co. A Division B Business Unit C admin@opcoa.com admin@divisionB.com admin@busUnitC.com User1 User2 User3 IAM IAM IAM Dev1 Dev2 Dev3 Admin1 Admin2 Admin3Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags:Own=OpCo Own=OpCo Own=OpCo Own=Div Own=Div Own=Div Own=BusC Own=BusC Own=BusCProj=A Proj=B Proj=C Proj=P Proj=Q Proj=R Proj=X Proj=Y Proj=Z
  • Basic Offering 24x7x365 ✓Developer Forum Access ✓ Documentation ✓Business Access to support Phone, Chat, EmailEnterprise Named Contacts 5 Fastest Response Time 1 Hour Architecture Support Use Case Guidance Best Practice ✓ Diagnostics Tools ✓ Direct Routing ✓ 3rd Party Software ✓ Trusted Advisor ✓
  • 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  • 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  • Reserved instances On-demand instances Unix/Linux instances start at $0.02/hour Pay as you go for compute power Low cost and flexibility Pay only for what you use, no up-front commitments or long-term contracts Use Cases: Applications with short term, spiky, or unpredictable workloads; Application development or testing
  • Reserved instances On-demand instances Reserved instances Unix/Linux instances start at 1- or 3-year terms $0.02/hour Pay low up-front fee, receive significant hourly Pay as you go for compute power discount Low cost and flexibility Low Cost / Predictability Pay only for what you use, no up-front Helps ensure compute capacity is available commitments or long-term contracts when needed Use Cases: Use Cases: Applications with short term, spiky, or unpredictable workloads; Applications with steady state or predictable usage Application development or testing Applications that require reserved capacity, including disaster recovery
  • Reserved instances Heavy utilization RI > 80% utilization Lower costs up to 58% On-demand instances Reserved instances Use Cases: Databases, Large Scale HPC, Always-on infrastructure, Baseline Unix/Linux instances start at 1- or 3-year terms $0.02/hour Pay low up-front fee, receive significant hourly Pay as you go for compute power discount Low cost and flexibility Low Cost / Predictability Pay only for what you use, no up-front Helps ensure compute capacity is available commitments or long-term contracts when needed Use Cases: Use Cases: Applications with short term, spiky, or unpredictable workloads; Applications with steady state or predictable usage Application development or testing Applications that require reserved capacity, including disaster recovery
  • Reserved instances Heavy utilization RI > 80% utilization Lower costs up to 58% On-demand instances Reserved instances Use Cases: Databases, Large Scale HPC, Always-on infrastructure, Baseline Unix/Linux instances start at 1- or 3-year terms $0.02/hour Pay low up-front fee, receive significant hourly Medium utilization RI Pay as you go for compute power discount Low cost and flexibility Low Cost / Predictability 41-79% utilization Lower costs up to 49% Pay only for what you use, no up-front Helps ensure compute capacity is available Use Cases: Web applications, many heavy commitments or long-term contracts when needed processing tasks, running much of the time Use Cases: Use Cases: Applications with short term, spiky, or unpredictable workloads; Applications with steady state or predictable usage Application development or testing Applications that require reserved capacity, including disaster recovery
  • Reserved instances Heavy utilization RI > 80% utilization Lower costs up to 58% On-demand instances Reserved instances Use Cases: Databases, Large Scale HPC, Always-on infrastructure, Baseline Unix/Linux instances start at 1- or 3-year terms $0.02/hour Pay low up-front fee, receive significant hourly Medium utilization RI Pay as you go for compute power discount Low cost and flexibility Low Cost / Predictability 41-79% utilization Lower costs up to 49% Pay only for what you use, no up-front Helps ensure compute capacity is available Use Cases: Web applications, many heavy commitments or long-term contracts when needed processing tasks, running much of the time Use Cases: Use Cases: Applications with short term, spiky, or Light utilization RI unpredictable workloads; Applications with steady state or predictable usage Application development or testing 15-40% utilization Applications that require reserved capacity, Lower costs up to 34% including disaster recovery Use Cases: Disaster Recovery, Weekly / Monthly reporting, Elastic Map Reduce
  • Best RI for Utilisation $18,000 $16,000 $14,000 $12,000 $10,000 Heavy Medium $8,000 Light $6,000 O-Demand $4,000 $2,000 $-
  • Best RI for Utilisation $18,000 $16,000 $14,000 $12,000 $10,000 Heavy Medium $8,000 Light $6,000 O-Demand $4,000 $2,000 $-
  • Optimizing costs with RIs 14 12 10 On Demand 8 Light Utilization RI 6 Medium Utilization RI Heavy utilization RI 4 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
  • 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  • 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  • Spot instances On-demand instances Reserved instances Unix/Linux instances start at 1- or 3-year terms $0.02/hour Pay low up-front fee, receive significant hourly Pay as you go for compute power discount Low cost and flexibility Low Cost / Predictability Pay only for what you use, no up-front Helps ensure compute capacity is available commitments or long-term contracts when needed Use Cases: Use Cases: Applications with short term, spiky, or unpredictable workloads; Applications with steady state or predictable usage Application development or testing Applications that require reserved capacity, including disaster recovery
  • Spot instances On-demand instances Reserved instances Spot instances Unix/Linux instances start at 1- or 3-year terms Bid on unused EC2 capacity $0.02/hour Pay low up-front fee, receive significant hourly Spot Price based on supply/demand, Pay as you go for compute power discount determined automatically Low cost and flexibility Low Cost / Predictability Cost / Large Scale, dynamic workload handling Pay only for what you use, no up-front Helps ensure compute capacity is available commitments or long-term contracts when needed Use Cases: Use Cases: Use Cases: Applications with flexible start and end times Applications with short term, spiky, or unpredictable workloads; Applications with steady state or predictable Applications only feasible at very low compute usage prices Application development or testing Applications that require reserved capacity, including disaster recovery
  • Achieving economies of scale 100% Time
  • Achieving economies of scale 100% Reserved capacity Time
  • Achieving economies of scale 100% On On-demand Reserved capacity Time
  • Achieving economies of scale 100% Spot On On-demand Reserved capacity Time
  • If your bid > spot price You get an instance
  • If your bid < spot price Your instance is terminated
  • Architecting for spot instances Decouple components Design for interruption Separate interactive & backend Use SQS, SWF processing Place data in a durable store such as S3, Use frameworks such as Elastic SimpleDB or DynamoDB MapReduce Save progress regularly
  • EMR with spot instances Scenario #1 Job Flow Duration: 14 Hours #1: Cost without Spot4 instances *14 hrs * $0.50 = $28
  • EMR with spot instances Scenario #1 Scenario #2 Job Flow Job Flow Duration: Duration: 14 Hours 7 Hours #1: Cost without Spot4 instances *14 hrs * $0.50 = $28
  • EMR with spot instances Scenario #1 Scenario #2 Job Flow Job Flow Duration: Duration: 14 Hours 7 Hours #1: Cost without Spot #2: Cost with Spot4 instances *14 hrs * $0.50 = $28 4 instances *7 hrs * $0.50 = $14 + 5 instances * 7 hrs * $0.25 = $8.75 Total = $22.75
  • EMR with spot instances Scenario #1 Scenario #2 Job Flow Job Flow Time Savings: 50% Duration: Cost Savings: ~22% Duration: 14 Hours 7 Hours #1: Cost without Spot #2: Cost with Spot4 instances *14 hrs * $0.50 = $28 4 instances *7 hrs * $0.50 = $14 + 5 instances * 7 hrs * $0.25 = $8.75 Total = $22.75
  • Spot marketBidding strategies
  • Spot bidding strategies Bid Distribution (for 3 months period) 20%Percentage of the Distribution 18% 16% 14% 12% 10% 8% 6% 4% 2% 0% Bid Price as Percentage of the On-Demand Price
  • Spot bidding strategies Bid Distribution (for 3 months period) 20%Percentage of the Distribution 18% 16% 14% 12% Bid near the RI 10% 8% hourly price 6% 4% 2% 0% Bid Price as Percentage of the On-Demand Price
  • Spot bidding strategies Bid Distribution (for 3 months period) 20%Percentage of the Distribution 18% 16% 14% 12% Bid above the spot price 10% 8% history 6% 4% 2% 0% Bid Price as Percentage of the On-Demand Price
  • Spot bidding strategies Bid Distribution (for 3 months period) 20%Percentage of the Distribution 18% 16% 14% 12% Bid near the 10% on-demand 8% price 6% 4% 2% 0% Bid Price as Percentage of the On-Demand Price
  • Spot bidding strategies Bid Distribution (for 3 months period) 20%Percentage of the Distribution 18% 16% 14% 12% 10% Bid above the on-demand price 8% 6% 4% 2% 0% Bid Price as Percentage of the On-Demand Price
  • Bid near the reserved hourly price You only pay for a full hour
  • Bid near the reserved hourly price You only pay for a full hour (if you are interrupted the hour is free)
  • Bid above the on-demand price Expect fewer interruptions
  • Bid above the on-demand price Expect fewer interruptions (only pay the spot price)
  • Implement cost aware architectureFlip from spot to on-demand as price dictates
  • Spot customers
  • 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  • 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  • $0.028 per hour DNS Elastic Load Web Servers Balancer Availability Zone
  • $0.028 per hour DNS Elastic Load Web Servers Balancer Availability Zone VS$0.085 per hour EC2 instance(small instance) DNS Web Servers + software LB Availability Zone
  • Consumers Producer SQS queue$0.01 per10,000 Requests($0.000001 per Request)
  • Consumers Producer SQS queue$0.01 per10,000 Requests($0.000001 per Request) VS$0.085 per hour Producer (small instance) EC2 instance Consumers + software queue
  • Software vs services Software on EC2 AWS Services Pros: ELB, SNS, SQS, SES, SWF, DynamoDB etc Use custom features Pros: Pay as you go Cons: Scalability Requires an instance Availability SPOF High performance Limited to one AZ DIY administration
  • Summary
  • 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  • Where to go next
  • Useful linksaws.amazon.com/economicsaws.amazon.com/calculator
  • Useful links http://aws.amazon.com/whitepapers
  • aws.amazon.com