SlideShare a Scribd company logo
1 of 48
Optimizing for Cost in the Cloud
   Jinesh Varia
Multiple dimensions of optimizations

  Cost
  Performance
  Response time
  Time to market
  High-availability
  Scalability
  Security
  Manageability
…….
Optimizing for Cost
When you turn off your cloud resources,
  you actually stop paying for them
Continuous optimization in
your architecture results in recurring savings
in your next month’s bill
Elasticity is one of the fundamental
properties of the cloud that drives many of its
              economic benefits
Optimize based on demand
 Understand your usage patterns
Optimize by time of the day

                                    Daily CPU Load
        14
        12
        10
         8
 Load




         6
                                    25% Savings
         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
                                     Hour
www.MyWebSite.com
         (dynamic data)
                       Amazon Route 53
                                             media.MyWebSite.com
                       (DNS)
                                                  (static data)
  Elastic Load
  Balancer




                                                        Amazon
    Auto Scaling group : Web Tier                       CloudFront

  Amazon EC2




    Auto Scaling group : App Tier




             Amazon RDS                  Amazon   Amazon S3
Availability Zone #1                     RDS



          Availability Zone #2
Optimize by seasonal cycles

                                  Yearly CPU Load
       12

       10

        8                                   50% Savings
Load




        6

        4

        2

        0
            1   5   9   13   17   21 25 29 33         37   41   45   49
                                  Weeks of the Year
Auto scaling : Types of Scaling
 Scaling by Schedule
   Use Scheduled Actions in Auto Scaling Service
      • Date
      • Time
      • Min and Max of Auto Scaling Group Size
   You can create up to 125 actions, scheduled up to 31 days into the
    future, for each of your auto scaling groups. This gives you the ability
    to scale up to four times a day for a month.
 Scaling by Policy
   Scaling up Policy - Double the group size
   Scaling down Policy - Decrement by 1
Optimize during the month

                                     End of the Month Scaling
                   3.5

                    3
DB Instance Type




                   2.5

                    2

                   1.5                   75% Savings
                    1

                   0.5

                    0
                         1   3   5   7    9   11 13 15 17 19 21 23 25 27 29
                                               Days of the Month
End of the month processing
 Expand the cluster at the end of the month
   Expand/Shrink feature in Amazon Elastic MapReduce
 Vertically Scale up at the end of the month
   Modify-DB-Instance (in Amazon RDS) (or a New RDS DB Instance )
   CloudFormation Script (in Amazon EC2)
Choosing the right pricing model
  On-demand Instances vs. Reserved Instances
Steady State Usage
 Total Cost for 1 Year-term of 2 application servers
                      Usage Fee   One-time Fee   Total     Savings
     Option 1           $1493          -         $1493          -
     On-Demand only

     Option 2
     On-Demand +        $1008         $227       $1234     ~20%
     Reserved

     Option 3
     All reserved
                        $528          $455       $983      ~35%

 Total Cost for 3 Year-term of the same 2 application servers
                      Usage Fee   One-time Fee   Total    Savings
     Option 1           $4479          -         $4479          -
     On-Demand only

     Option 2
     On-Demand +        $3024        $350        $3374     ~30%
     Reserved

     Option 3
     All reserved
                        $1584        $700        $2284     ~50%
450,000
                          On Demand               1-year RI       3-year RI
400,000


350,000


300,000


250,000


200,000
                                              2

150,000

                                                              3
100,000


 50,000                           1


     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

                          1-year RI versus On Demand:
                  1       cost savings realized after first 6 months of usage
                          3-year RI versus On Demand:
                  2       cost savings realized after first 9 months of usage.
                          3-year RI versus 1-year RI:
                  3       Net savings of 3-year RI versus 1-year RI begin by month 13 and
                          continue throughout the RI term (additional 23 months of
                          savings)
Recommendations

 Steady State Usage : Use All Reserved
   If you plan on running for at least 6 months, invest in RI
    for 1-year term
   If you plan on running for at least 8.7 months, invest in
    RI for 3-year term
Common Pattern: Reserved + On-Demand
Recommendations

 Steady State Usage : Use All Reserved
   If you plan on running for at least 6 months, invest in RI
    for 1-year term
   If you plan on running for at least 8.7 months, invest in
    RI for 3-year term
 Unpredictable Demand : Use combination of Reserved
 + On-demand
   With Reserved Instances, the costs average to an
    effective hourly rate 40% lower than the On-Demand
    rate.
Choosing the right pricing model
   On-demand Instances vs. Spot Instances
Save more money by using Spot Instances
Spot Use cases
  Use Case               Types of Applications
  Batch Processing       Generic background processing (scale out
                         computing)
  Hadoop                 Hadoop/MapReduce processing type jobs (e.g.
                         Search, Big Data, etc.)

  Scientific Computing   Scientific trials/simulations/analysis in chemistry,
                         physics, and biology
  Video and Image        Transform videos into specific formats
  Processing/Rendering
  Testing                Provide testing of software, web sites, etc

  Web/Data Crawling      Analyzing data and processing it
  Financial              Hedgefund analytics, energy trading, etc
  HPC                    Utilize HPC servers to do embarrassingly parallel
                         jobs
  Cheap Compute          Backend servers for Facebook games
Basic tactics for Spot Instances

 Try to launch Spot instances first and then on-demand
 instances if you don’t get the spot instances in under
 15 minutes
 Use Spot and On-demand in Hybrid Fashion. Master
 Node in Cluster is on-demand instance, worker nodes
 are spot instances
Video Transcoding Application Example
                     Amazon S3                                               Amazon S3



                                             Amazon
                                     Elastic Compute Cloud
                       Input                                                  Output
                      Bucket                                                  Bucket
Amazon EC2

                     Amazon SQS                                             Amazon SQS
             Job                                               Completed                      Reports
                                                                 Job                          Website

                       Input                                                  Output
  Website              Queue                                                  Queue          Amazon EC2
    (Job
  Manager)


                                       On-demand + Spot


                                                  Amazon
                   Amazon SimpleDB
                                                  CloudWatch
                                                                           Amazon SimpleDB




                                           Amazon EC2
                                              Intranet
Use of Amazon SQS in Spot Architectures




         VisibilityTimeOut
                             Amazon EC2
                             Spot Instance
Best Practices for using Spot Instances

 Save Your Work Frequently
 Add Checkpoints
 Split up Your Work
 Test Your Application
 Minimize Group Instance Launches
 Use Persistent Requests for Continuous Tasks
 Track when Spot Instances Start and Stop
 Access Large Pools of Compute Capacity
Case Study: Optimizing Video
Transcoding Workloads (On-demand + Spot + Reserved)
  Free Offering                Premium Offering
   Optimize for reducing        Optimized for Faster
    cost                          response times
   Acceptable Delay Limits      No Delays


Implementation                Implementation
   Set Persistent Requests      Invest in RIs
   Use on-demand                Use on-demand for
    Instances, if delay           Elasticity


    Maximum Bid Price           Maximum Bid Price
    < On-demand Rate            >= On-demand Rate
    Get your set reduced        Get Instant Capacity for
    price for your workload     higher price
Optimize by choosing the Right
Instance Type
M1.xlarge, c1.medium, multiple m1.small etc.
Basic recommendations on Instance Type

 Choose the EC2 instance type that best matches the
 resources required by the application
   Start with memory requirements and architecture type
    (32bit or 64-bit)
   Then choose the closest number of virtual cores required
 Scaling across AZs
   Smaller sizes give more granularity for deploying to
    multiple AZs
Tip – Instance Optimizer

             Free Memory
              Free CPU        PUT                       2 weeks
              Free HDD
               At 1-min
               intervals                                          Alarm
                                    Amazon CloudWatch

  Instance

             Custom Metrics




              “You could save a bunch of money by switching
              to a small instance, Click on CloudFormation Script to
              Save”
Optimize using AWS Import Export
AWS Import Export vs. Amazon S3 Standard Upload
AWS Import/Export vs. S3 upload costs

$1,200

$1,000

 $800

 $600                                                             Import/Export
                                                                  S3 upload
 $400

 $200

   $0
         100Gb   500Gb   1 Tb   2 Tb   3 Tb   5 Tb *   10 Tb **
AWS Import/Export vs. S3 upload time savings

       60

       50

       40
Days




       30                                               Import/Export
                                                        S3 upload
       20

       10

        0
            100 Gb 500 Gb   1 Tb   2 Tb   3 Tb   5 Tb
Optimize by converting ancillary
instances into services
Leverage CloudWatch, SNS, SQS, SES, ELB
Load Balancing

Software LB on EC2        Elastic Load Balancing
Pros                      Pros
• Application-tier load   • Elastic and Fault-tolerant
  balancer                • Auto scaling
                          • Monitoring included

Cons                      Cons
• SPOF                    • For Internet-facing traffic
• Elasticity has to be      only
  implemented manually
• Not as cost-effective
$0.028
 per hour
                   DNS   Elastic Load
                                                      Web Servers
                           Balancer
                                                Availability Zone




$0.095
 per hour
(small instance)
                           EC2 instance
                   DNS     + software LB              Web Servers
                                        Availability Zone
Software v/s Services

Software on EC2          SNS, SQS, SES
Pros                     Pros
• Custom features        • Pay as you go
                         • Scalability
Cons                     • Availability
• Requires an instance   • High performance
• SPOF
• Limited to one AZ
• DIY administration
Consumers
                          Producer     SQS queue

$0.01 per
10,000 Requests
($0.000001 per Request)




$0.095
     per hour
    (small instance)      Producer
                                       EC2 instance          Consumers
                                     + software queue
Optimize for performance and
cost by page caching and
edge-caching static content
Amazon EC2 vs. Amazon S3 vs. Amazon CF + S3
When am I charged?
                                    Paris

                                                                 Client



                                    Edge Location




                                                                          Client
  Amazon Simple                      Singapore
  Storage Service
       (S3)




                                        Edge Location




                    London



                    Edge Location


                                                        Client
When content is popular…
                                    Paris

                                                                 Client



                                    Edge Location




                                                                          Client
  Amazon Simple                      Singapore
  Storage Service
       (S3)




                                        Edge Location




                    London



                    Edge Location


                                                        Client
Architectural Recommendations

 We recommend using S3 + CF as it will reduce the
 cost as well as reduce latency for static data
   Depends on cache-hit ratio
 For Video Streaming, use CF as there is no need of
 separate streaming server running Adobe FMS
Optimize by using ‘Reminder scripts’
Turn off your unused EIPs, unassociated EBS
volumes
Summary: Tips on how to further save cost
 Optimizing for the Cloud
   Optimize based on demand
      • Optimize by time of the day
      • Optimize during the month
      • Optimize by seasonal yearly cycles
   Optimize by investing in Reserved Instances
   Optimize using Spot instances
   Choosing the right Instance Type
   Optimize using AWS Import Export Service
   Optimize by converting ancillary instances into services
   Optimize for performance and cost by page caching and
    edge-caching static content
   Optimize by turning off unused resources
Thank you!




jvaria@amazon.com
  Twitter: @jinman
http://aws.amazon.com
Optimize by Implementing Elasticity
Infrastructure
Cost $




             Large                            You just lost
             Capital                           customers
           Expenditure


                                                          Predicted
                                                          Demand

                         Opportunity                          Traditional
                           Cost                               Hardware
                          Wastage
                                                              Actual
                                                              Demand

                                                          Cloud
                                                          Automated
                                                          Elasticity


                                       time

More Related Content

What's hot

Overview of Amazon Web Services
Overview of Amazon Web ServicesOverview of Amazon Web Services
Overview of Amazon Web Services
Harish Ganesan
 

What's hot (20)

스크립트로 Aws 서비스 자동화 하기 20161121 slideshare
스크립트로 Aws 서비스 자동화 하기 20161121 slideshare스크립트로 Aws 서비스 자동화 하기 20161121 slideshare
스크립트로 Aws 서비스 자동화 하기 20161121 slideshare
 
AWS Storage Services - AWS Presentation - AWS Cloud Storage for the Enterpris...
AWS Storage Services - AWS Presentation - AWS Cloud Storage for the Enterpris...AWS Storage Services - AWS Presentation - AWS Cloud Storage for the Enterpris...
AWS Storage Services - AWS Presentation - AWS Cloud Storage for the Enterpris...
 
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
 
Cost Optimisation on AWS
Cost Optimisation on AWSCost Optimisation on AWS
Cost Optimisation on AWS
 
Optimizing Costs and Efficiency of AWS Services
Optimizing Costs and Efficiency of AWS Services Optimizing Costs and Efficiency of AWS Services
Optimizing Costs and Efficiency of AWS Services
 
Optimising TCO with AWS at Websummit Dublin
Optimising TCO with AWS at Websummit DublinOptimising TCO with AWS at Websummit Dublin
Optimising TCO with AWS at Websummit Dublin
 
Optimizing Application Performance and Costs with Auto Scaling - AWS Online T...
Optimizing Application Performance and Costs with Auto Scaling - AWS Online T...Optimizing Application Performance and Costs with Auto Scaling - AWS Online T...
Optimizing Application Performance and Costs with Auto Scaling - AWS Online T...
 
Overview of Amazon Web Services
Overview of Amazon Web ServicesOverview of Amazon Web Services
Overview of Amazon Web Services
 
Introduction to AWS Batch
Introduction to AWS BatchIntroduction to AWS Batch
Introduction to AWS Batch
 
Agile in the Coud
Agile in the CoudAgile in the Coud
Agile in the Coud
 
NHGRI Cloud Computing talk
NHGRI Cloud Computing talkNHGRI Cloud Computing talk
NHGRI Cloud Computing talk
 
AWS vs Azure vs Google Cloud Storage Deep Dive
AWS vs Azure vs Google Cloud Storage Deep DiveAWS vs Azure vs Google Cloud Storage Deep Dive
AWS vs Azure vs Google Cloud Storage Deep Dive
 
AWS Road Trip 2013 - Presentation
AWS Road Trip 2013 - PresentationAWS Road Trip 2013 - Presentation
AWS Road Trip 2013 - Presentation
 
AWS Summit London 2014 | Optimising TCO for the AWS Cloud (100)
AWS Summit London 2014 | Optimising TCO for the AWS Cloud (100)AWS Summit London 2014 | Optimising TCO for the AWS Cloud (100)
AWS Summit London 2014 | Optimising TCO for the AWS Cloud (100)
 
AWS Webcast - Total Cost of (Non) Ownership
AWS Webcast - Total Cost of (Non) Ownership  AWS Webcast - Total Cost of (Non) Ownership
AWS Webcast - Total Cost of (Non) Ownership
 
Auto scaling using Amazon Web Services ( AWS )
Auto scaling using Amazon Web Services ( AWS )Auto scaling using Amazon Web Services ( AWS )
Auto scaling using Amazon Web Services ( AWS )
 
2017 AWS DB Day | Amazon DynamoDB 서비스, 개요 및 신규 기능 소개
2017 AWS DB Day | Amazon DynamoDB 서비스, 개요 및 신규 기능 소개2017 AWS DB Day | Amazon DynamoDB 서비스, 개요 및 신규 기능 소개
2017 AWS DB Day | Amazon DynamoDB 서비스, 개요 및 신규 기능 소개
 
Introduction to Amazon EC2 Spot Instances
Introduction to Amazon EC2 Spot InstancesIntroduction to Amazon EC2 Spot Instances
Introduction to Amazon EC2 Spot Instances
 
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
 
Clash of Technologies Google Cloud vs Microsoft Azure
Clash of Technologies Google Cloud vs Microsoft AzureClash of Technologies Google Cloud vs Microsoft Azure
Clash of Technologies Google Cloud vs Microsoft Azure
 

Similar to AWS Summit 2011: Optimizing for Cost in the AWS Cloud

14h00 aws costoptimization_jvaria
14h00 aws costoptimization_jvaria14h00 aws costoptimization_jvaria
14h00 aws costoptimization_jvaria
infolive
 
Optimizing Your Infrastructure Costs on AWS
Optimizing Your Infrastructure Costs on AWSOptimizing Your Infrastructure Costs on AWS
Optimizing Your Infrastructure Costs on AWS
Amazon Web Services
 
AWS Cost Optimization
AWS Cost OptimizationAWS Cost Optimization
AWS Cost Optimization
Miles Ward
 
Cost Optimisation with Amazon Web Services
 Cost Optimisation with Amazon Web Services Cost Optimisation with Amazon Web Services
Cost Optimisation with Amazon Web Services
Amazon Web Services
 
AWS Cloud Kata | Bangkok - Getting to Profitability
AWS Cloud Kata | Bangkok - Getting to ProfitabilityAWS Cloud Kata | Bangkok - Getting to Profitability
AWS Cloud Kata | Bangkok - Getting to Profitability
Amazon Web Services
 

Similar to AWS Summit 2011: Optimizing for Cost in the AWS Cloud (20)

14h00 aws costoptimization_jvaria
14h00 aws costoptimization_jvaria14h00 aws costoptimization_jvaria
14h00 aws costoptimization_jvaria
 
Optimizing for Costs in the Cloud
Optimizing for Costs in the CloudOptimizing for Costs in the Cloud
Optimizing for Costs in the Cloud
 
Optimizing for Cost in the AWS Cloud - 5 Ways to Further Save - AWS Summit 20...
Optimizing for Cost in the AWS Cloud - 5 Ways to Further Save - AWS Summit 20...Optimizing for Cost in the AWS Cloud - 5 Ways to Further Save - AWS Summit 20...
Optimizing for Cost in the AWS Cloud - 5 Ways to Further Save - AWS Summit 20...
 
Optimizing Your Infrastructure Costs on AWS
Optimizing Your Infrastructure Costs on AWSOptimizing Your Infrastructure Costs on AWS
Optimizing Your Infrastructure Costs on AWS
 
Increasing your predictability and decreasing your cost with AWS - Simone Br...
Increasing your predictability and decreasing your cost with AWS  - Simone Br...Increasing your predictability and decreasing your cost with AWS  - Simone Br...
Increasing your predictability and decreasing your cost with AWS - Simone Br...
 
AWS Cost Optimization
AWS Cost OptimizationAWS Cost Optimization
AWS Cost Optimization
 
Cost Optimisation with Amazon Web Services
 Cost Optimisation with Amazon Web Services Cost Optimisation with Amazon Web Services
Cost Optimisation with Amazon Web Services
 
Optimize Cost Efficiency on AWS
Optimize Cost Efficiency on AWSOptimize Cost Efficiency on AWS
Optimize Cost Efficiency on AWS
 
Predicting Costs on AWS
Predicting Costs on AWSPredicting Costs on AWS
Predicting Costs on AWS
 
AWS re:Invent 2016: Disrupting Big Data with Cost-effective Compute (CMP302)
AWS re:Invent 2016: Disrupting Big Data with Cost-effective Compute (CMP302)AWS re:Invent 2016: Disrupting Big Data with Cost-effective Compute (CMP302)
AWS re:Invent 2016: Disrupting Big Data with Cost-effective Compute (CMP302)
 
Cost Optimization at Scale
Cost Optimization at ScaleCost Optimization at Scale
Cost Optimization at Scale
 
Born in the Cloud; Build it Like a Startup
Born in the Cloud; Build it Like a StartupBorn in the Cloud; Build it Like a Startup
Born in the Cloud; Build it Like a Startup
 
2011 State of the Cloud: A Year's Worth of Innovation in 30 Minutes - Jinesh...
2011 State of the Cloud:  A Year's Worth of Innovation in 30 Minutes - Jinesh...2011 State of the Cloud:  A Year's Worth of Innovation in 30 Minutes - Jinesh...
2011 State of the Cloud: A Year's Worth of Innovation in 30 Minutes - Jinesh...
 
Introduction to Amazon Web Services
Introduction to Amazon Web ServicesIntroduction to Amazon Web Services
Introduction to Amazon Web Services
 
Penny Pinching at Scale
Penny Pinching at ScalePenny Pinching at Scale
Penny Pinching at Scale
 
AWS APAC Webinar Series: How to Reduce Your Spend on AWS
AWS APAC Webinar Series: How to Reduce Your Spend on AWSAWS APAC Webinar Series: How to Reduce Your Spend on AWS
AWS APAC Webinar Series: How to Reduce Your Spend on AWS
 
How to Reduce your Spend on AWS
How to Reduce your Spend on AWSHow to Reduce your Spend on AWS
How to Reduce your Spend on AWS
 
AWS Cloud Kata | Bangkok - Getting to Profitability
AWS Cloud Kata | Bangkok - Getting to ProfitabilityAWS Cloud Kata | Bangkok - Getting to Profitability
AWS Cloud Kata | Bangkok - Getting to Profitability
 
Start Up Austin 2017: Don't Overspend! Cost Optimization Best Practices to Re...
Start Up Austin 2017: Don't Overspend! Cost Optimization Best Practices to Re...Start Up Austin 2017: Don't Overspend! Cost Optimization Best Practices to Re...
Start Up Austin 2017: Don't Overspend! Cost Optimization Best Practices to Re...
 
AWS Cloud cost optimization
AWS Cloud cost optimizationAWS Cloud cost optimization
AWS Cloud cost optimization
 

More from Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

AWS Summit 2011: Optimizing for Cost in the AWS Cloud

  • 1. Optimizing for Cost in the Cloud Jinesh Varia
  • 2. Multiple dimensions of optimizations Cost Performance Response time Time to market High-availability Scalability Security Manageability …….
  • 4. When you turn off your cloud resources, you actually stop paying for them
  • 5. Continuous optimization in your architecture results in recurring savings in your next month’s bill
  • 6. Elasticity is one of the fundamental properties of the cloud that drives many of its economic benefits
  • 7. Optimize based on demand Understand your usage patterns
  • 8. Optimize by time of the day Daily CPU Load 14 12 10 8 Load 6 25% Savings 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 Hour
  • 9. www.MyWebSite.com (dynamic data) Amazon Route 53 media.MyWebSite.com (DNS) (static data) Elastic Load Balancer Amazon Auto Scaling group : Web Tier CloudFront Amazon EC2 Auto Scaling group : App Tier Amazon RDS Amazon Amazon S3 Availability Zone #1 RDS Availability Zone #2
  • 10. Optimize by seasonal cycles Yearly CPU Load 12 10 8 50% Savings Load 6 4 2 0 1 5 9 13 17 21 25 29 33 37 41 45 49 Weeks of the Year
  • 11. Auto scaling : Types of Scaling Scaling by Schedule  Use Scheduled Actions in Auto Scaling Service • Date • Time • Min and Max of Auto Scaling Group Size  You can create up to 125 actions, scheduled up to 31 days into the future, for each of your auto scaling groups. This gives you the ability to scale up to four times a day for a month. Scaling by Policy  Scaling up Policy - Double the group size  Scaling down Policy - Decrement by 1
  • 12. Optimize during the month End of the Month Scaling 3.5 3 DB Instance Type 2.5 2 1.5 75% Savings 1 0.5 0 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 Days of the Month
  • 13. End of the month processing Expand the cluster at the end of the month  Expand/Shrink feature in Amazon Elastic MapReduce Vertically Scale up at the end of the month  Modify-DB-Instance (in Amazon RDS) (or a New RDS DB Instance )  CloudFormation Script (in Amazon EC2)
  • 14. Choosing the right pricing model On-demand Instances vs. Reserved Instances
  • 15. Steady State Usage Total Cost for 1 Year-term of 2 application servers Usage Fee One-time Fee Total Savings Option 1 $1493 - $1493 - On-Demand only Option 2 On-Demand + $1008 $227 $1234 ~20% Reserved Option 3 All reserved $528 $455 $983 ~35% Total Cost for 3 Year-term of the same 2 application servers Usage Fee One-time Fee Total Savings Option 1 $4479 - $4479 - On-Demand only Option 2 On-Demand + $3024 $350 $3374 ~30% Reserved Option 3 All reserved $1584 $700 $2284 ~50%
  • 16. 450,000 On Demand 1-year RI 3-year RI 400,000 350,000 300,000 250,000 200,000 2 150,000 3 100,000 50,000 1 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 1-year RI versus On Demand: 1 cost savings realized after first 6 months of usage 3-year RI versus On Demand: 2 cost savings realized after first 9 months of usage. 3-year RI versus 1-year RI: 3 Net savings of 3-year RI versus 1-year RI begin by month 13 and continue throughout the RI term (additional 23 months of savings)
  • 17. Recommendations Steady State Usage : Use All Reserved  If you plan on running for at least 6 months, invest in RI for 1-year term  If you plan on running for at least 8.7 months, invest in RI for 3-year term
  • 19. Recommendations Steady State Usage : Use All Reserved  If you plan on running for at least 6 months, invest in RI for 1-year term  If you plan on running for at least 8.7 months, invest in RI for 3-year term Unpredictable Demand : Use combination of Reserved + On-demand  With Reserved Instances, the costs average to an effective hourly rate 40% lower than the On-Demand rate.
  • 20. Choosing the right pricing model On-demand Instances vs. Spot Instances
  • 21. Save more money by using Spot Instances
  • 22. Spot Use cases Use Case Types of Applications Batch Processing Generic background processing (scale out computing) Hadoop Hadoop/MapReduce processing type jobs (e.g. Search, Big Data, etc.) Scientific Computing Scientific trials/simulations/analysis in chemistry, physics, and biology Video and Image Transform videos into specific formats Processing/Rendering Testing Provide testing of software, web sites, etc Web/Data Crawling Analyzing data and processing it Financial Hedgefund analytics, energy trading, etc HPC Utilize HPC servers to do embarrassingly parallel jobs Cheap Compute Backend servers for Facebook games
  • 23. Basic tactics for Spot Instances Try to launch Spot instances first and then on-demand instances if you don’t get the spot instances in under 15 minutes Use Spot and On-demand in Hybrid Fashion. Master Node in Cluster is on-demand instance, worker nodes are spot instances
  • 24. Video Transcoding Application Example Amazon S3 Amazon S3 Amazon Elastic Compute Cloud Input Output Bucket Bucket Amazon EC2 Amazon SQS Amazon SQS Job Completed Reports Job Website Input Output Website Queue Queue Amazon EC2 (Job Manager) On-demand + Spot Amazon Amazon SimpleDB CloudWatch Amazon SimpleDB Amazon EC2 Intranet
  • 25. Use of Amazon SQS in Spot Architectures VisibilityTimeOut Amazon EC2 Spot Instance
  • 26.
  • 27. Best Practices for using Spot Instances Save Your Work Frequently Add Checkpoints Split up Your Work Test Your Application Minimize Group Instance Launches Use Persistent Requests for Continuous Tasks Track when Spot Instances Start and Stop Access Large Pools of Compute Capacity
  • 28. Case Study: Optimizing Video Transcoding Workloads (On-demand + Spot + Reserved) Free Offering Premium Offering  Optimize for reducing  Optimized for Faster cost response times  Acceptable Delay Limits  No Delays Implementation Implementation  Set Persistent Requests  Invest in RIs  Use on-demand  Use on-demand for Instances, if delay Elasticity Maximum Bid Price Maximum Bid Price < On-demand Rate >= On-demand Rate Get your set reduced Get Instant Capacity for price for your workload higher price
  • 29. Optimize by choosing the Right Instance Type M1.xlarge, c1.medium, multiple m1.small etc.
  • 30. Basic recommendations on Instance Type Choose the EC2 instance type that best matches the resources required by the application  Start with memory requirements and architecture type (32bit or 64-bit)  Then choose the closest number of virtual cores required Scaling across AZs  Smaller sizes give more granularity for deploying to multiple AZs
  • 31. Tip – Instance Optimizer Free Memory Free CPU PUT 2 weeks Free HDD At 1-min intervals Alarm Amazon CloudWatch Instance Custom Metrics “You could save a bunch of money by switching to a small instance, Click on CloudFormation Script to Save”
  • 32. Optimize using AWS Import Export AWS Import Export vs. Amazon S3 Standard Upload
  • 33. AWS Import/Export vs. S3 upload costs $1,200 $1,000 $800 $600 Import/Export S3 upload $400 $200 $0 100Gb 500Gb 1 Tb 2 Tb 3 Tb 5 Tb * 10 Tb **
  • 34. AWS Import/Export vs. S3 upload time savings 60 50 40 Days 30 Import/Export S3 upload 20 10 0 100 Gb 500 Gb 1 Tb 2 Tb 3 Tb 5 Tb
  • 35. Optimize by converting ancillary instances into services Leverage CloudWatch, SNS, SQS, SES, ELB
  • 36. Load Balancing Software LB on EC2 Elastic Load Balancing Pros Pros • Application-tier load • Elastic and Fault-tolerant balancer • Auto scaling • Monitoring included Cons Cons • SPOF • For Internet-facing traffic • Elasticity has to be only implemented manually • Not as cost-effective
  • 37. $0.028 per hour DNS Elastic Load Web Servers Balancer Availability Zone $0.095 per hour (small instance) EC2 instance DNS + software LB Web Servers Availability Zone
  • 38. Software v/s Services Software on EC2 SNS, SQS, SES Pros Pros • Custom features • Pay as you go • Scalability Cons • Availability • Requires an instance • High performance • SPOF • Limited to one AZ • DIY administration
  • 39. Consumers Producer SQS queue $0.01 per 10,000 Requests ($0.000001 per Request) $0.095 per hour (small instance) Producer EC2 instance Consumers + software queue
  • 40. Optimize for performance and cost by page caching and edge-caching static content Amazon EC2 vs. Amazon S3 vs. Amazon CF + S3
  • 41. When am I charged? Paris Client Edge Location Client Amazon Simple Singapore Storage Service (S3) Edge Location London Edge Location Client
  • 42. When content is popular… Paris Client Edge Location Client Amazon Simple Singapore Storage Service (S3) Edge Location London Edge Location Client
  • 43. Architectural Recommendations We recommend using S3 + CF as it will reduce the cost as well as reduce latency for static data  Depends on cache-hit ratio For Video Streaming, use CF as there is no need of separate streaming server running Adobe FMS
  • 44. Optimize by using ‘Reminder scripts’ Turn off your unused EIPs, unassociated EBS volumes
  • 45. Summary: Tips on how to further save cost Optimizing for the Cloud  Optimize based on demand • Optimize by time of the day • Optimize during the month • Optimize by seasonal yearly cycles  Optimize by investing in Reserved Instances  Optimize using Spot instances  Choosing the right Instance Type  Optimize using AWS Import Export Service  Optimize by converting ancillary instances into services  Optimize for performance and cost by page caching and edge-caching static content  Optimize by turning off unused resources
  • 46. Thank you! jvaria@amazon.com Twitter: @jinman
  • 48. Optimize by Implementing Elasticity Infrastructure Cost $ Large You just lost Capital customers Expenditure Predicted Demand Opportunity Traditional Cost Hardware Wastage Actual Demand Cloud Automated Elasticity time