Mais conteúdo relacionado Semelhante a Optimize Amazon EC2 for Fun and Profit (20) Mais de Amazon Web Services (20) Optimize Amazon EC2 for Fun and Profit 1. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Brad Bonnett, Sr Manager Product Management, EC2 Pricing & Launch Services
Bhavesh Maisheri, Technology Project Manager, Market Regulation Surveillance Technology, FINRA
Ratnakar Korem, Technology Project Manager, Market Regulation Surveillance Technology, FINRA
SRV203
Optimizing Amazon EC2
for Fun and Profit
2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Optimizing Performance and Cost
Right sizing
Purchasing options
Increase elasticity
Measure, monitor &
improve
3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Right Sizing
• Selecting the cheapest instance available while
meeting performance requirements
• Look at CPU, RAM, storage, and network
utilization to identify potential instances that can
be downsized
• Testing with On-Demand is cheap (use Spot to
test even cheaper!)
4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EC2 Instance Growth – Increased Choice
2017 launches:
• Compute optimized: C5, Z1d
• General purpose: M5, T2 Unlimited
• Accelerated computing: G3, P3
• Memory optimized: x1e
• I/O optimized: I3, H1
• Programmable/FPGAs: F1
• Bare metal: I3.metal
3
5
7
11 12 13
23
42
52
60
70
2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Increase Elasticity
Turn off non-production instances
• Look for dev/test, non-prod instances that are
always running and turn off
Automatically scale production
• Use Auto Scaling to scale in and out based on
demand and usage
• AWS CloudFormation, Amazon CloudWatch &
scheduled scaling are your friends
6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Measure, Monitor, Improve
• Auto-tag resources
• Identify always-on non-prod
• Identify instances to downsize
• Recommend Reserved Instances
• Dashboard your status
• Report on savings
7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tagging is Essential
•How do we explain the costs?
•How do we allocate the charges to the
right team?
•How do we save money?
8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tagging is Essential
Up to 50 tags (key-value pairs) per instance
• Completely custom – Environment, owner, application, cost center, etc.
• Tag on create, after launch, or both!
i-4a1c2f5d
Owner =
Admin
Env =
Test
App =
website
i-4a3d3f6e
Owner =
Admin
Env =
Prod
App =
website
9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Templatize launch requests with EC2 Launch templates
10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consistent
experience
Simplified
permissions
Governance &
best practices
Increase productivity
Launch Templates are now available in AWS CloudFormation
with Auto Scaling and Spot Fleet
Use Launch Templates to achieve…
11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EC2 Purchasing Options
12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
No upfront
investment
required
Pay as you go
Pay less when you
reserve
Pay less as AWS
grows
AWS Pricing Principles
13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EC2 Purchasing Options
On-Demand
Pay for compute capacity by the second
with no long-term commitments
Spiky workloads,
to define needs
Reserved Instances
Make a 1- or 3-year commitment and
receive a significant discount off On-
Demand prices
Committed &
steady-state usage
Spot Instances
Spare EC2 capacity at savings of up to
90% off On-Demand prices
Fault-tolerant, flexible,
stateless workloads
14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EC2 On-Demand Pricing
Short-term, spiky, or
unpredictable
Low cost & flexible Develop and test
15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EC2 Reserved Pricing
Discount up to 75% off
the On-Demand price
Steady state and
committed usage
1- and 3-year terms
16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EC2 Reserved Pricing – Flexibility & Savings
Optional capacity reservation
when used in a specific
Availability Zone
Convertible RIs
Change instance family,
OS, tenancy, & payment
Payment flexibility
with three upfront payment
options (all, partial, none)
17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Reserved Instance Recommendations
18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EC2 Spot Instances
Low Cost Faster Results Easy Access Resource
Flexibility
Spare EC2 capacity that AWS can reclaim with two minutes of notice
19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Rendered on Amazon EC2 Spot Instances
21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EC2 Spot: Spare Compute Capacity at Scale
Spot is available for all EC2
Instance Types, in all Public
Regions and in all Availability
Zones
Coming Soon – AWS GovCloud (US)!
22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consumer apps & services
B2B Enterprise Tech
Research
Sports, Media &
Entertainment Financial Services
AdTech & digital experience
23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EC2 Spot: Use Cases
Big data
Containers &
test/dev
HPC & batch Web Services
FINRA has saved up to 50%
from its on-premises solution,
increased elasticity/scalability,
and accelerated reprocessing
requests from months to days
with EC2 Spot Instances
Yelp runs millions of tests
every day with EC2 Spot
Instances. Yelp improved test
result response time from 2
days to 30 minutes and has
also delivered a large reduction
in execution costs with Spot.
TLG Aerospace saw a 75%
reduction in the cost per CFD
simulation with Amazon EC2
Spot Instances. They were able
to pass those savings along to
their customers and be more
competitive.
AdRoll have been able to
seamlessly scale their
infrastructure, better serve
customers across the globe,
and reduce our fixed costs by
75% and operational costs by
83%.with AWS solution,
including EC2 Spot Instances
24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Picking the right EC2 Purchase Option
25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
To Optimize EC2, Combine All Three Options
1. Use Reserved Instances for
known/steady-state workloads
2. Scale using Spot, On-Demand, or
both
3. AWS services make this easy and
efficient (e.g., Auto Scaling, Spot
Fleet, Amazon ECS/Amazon EKS,
Amazon EMR, Thinkbox
Deadline, AWS Batch, AWS
CloudFormation)
0
2
4
6
8
10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
On-Demand
Spot
Reserved
26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Optimization Patterns – Grid Processing
27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The Old Way – Low Utilization, High Costs
Server utilization rates are typically low due to need to deploy in advance and for peak needs
28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The Old Way – Managing with High Utilization
Higher grid utilization rates result in hidden costs: longer queue wait times and delayed results
29. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The Old Way – In the Cloud?
0
20
40
60
80
100
120
140
160
3 year Reserved Instances
?
30. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The Old Way – Conflicting Goals
-600%
-500%
-400%
-300%
-200%
-100%
0%
100%
0
200
400
600
800
1000
1200
1400
Jobs in the Queue
Grid Utilization
Higher utilization can reduce IT spending… but also constrain the business
But every job in the queue
represents business impact
Grid utilization looks great
31. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The Cloud Way: Scalability When Needed
Scale higher to reduce time to results: Less waiting, more agility, faster innovation
32. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The Cloud Way: Optimize for Cost and Results
?
0
100
200
300
400
500
600
1 2 3 4 5 6 7 8 9 10 11 12
3 year Reserved Instances On-Demand Spot
33. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
New EC2 Spot Pricing Model
Simplified access
Via existing EC2 API calls such
as RunInstances
Simplified Pricing Set it
& Forget it
Low predictable prices
without bidding
Pause & Resume
With hibernation and stop-
start
Simplified access model, predictable prices, pause & resume
EC2 Fleet: Simply tell Fleet how much capacity you need and Fleet does the rest
34. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Introducing Amazon EC2 Fleet
Benefits
Simplifies provisioning of EC2 capacity across different instance types, AZs, and purchase models with a single API
Reduces Costs
Combines Spot, On-Demand, and RIs to
run workloads at the lowest possible
cost
Increases Operational Efficiency
Provisions compute capacity across
purchase options, instance types, and
AZs with a single API
Key Features
Flexible Capacity Allocation
Select an instance allocation strategy
that works for your app in app-aware
units (vCPU, GB RAM etc.)
Simplified Provisioning
Select instances, assign weights, specify
target capacity for On-Demand and Spot
Instances, and build a fleet within
seconds
Spot Instances
On-Demand InstancesOn-Demand Instances
Spot Instances
Reserved InstancesReserved Instances
AZ1 AZ2
Massive Scale
Launch 1,000’s of instances with a single
API call, and scale to 1,000s of cores,
TBs of memory, etc.
35. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
New Spot Instance Advisor
✓ Shows your savings over
On-Demand
✓ Helps you select pools
with the least chance of
interruption
Note: The average frequency of interruption across all Regions and instance types is <5%
https://aws.amazon.com/ec2/spot/instance-advisor/
36. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
FINRA Use Case
37. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
About
38. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Investor
protection
Market
integrity
FINRA: Mission
39. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
FINRA: Volume
brokers
17
firms
3,700 630,000
stock
exchanges
40. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
FINRA: Volume Growth
37 billion
events on average
each day
in 2017
100 billion
events on a single day
in March 2018
58 billion
events on average
each day
in 2018
41. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
FINRA: Big Data
of storage
25+ pb 150+
applications
42. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Leverage the Data: Apps, Query, Machine Learning
Data Lake
Audit Trail
Market
Surveillance
Ad Hoc
Lifecycle
Viewer
Data Science
43. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Market Surveillance – Pattern
Data Lake
PatternN
Output Data
Orchestration
Data Location
Registration
Frame
-work
DevOps
44. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pattern Execution Framework
Data Lake
Pattern1 Pattern2 Pattern3 Pattern4 Pattern5 Pattern6 PatternN…
Output Data Output Data Output Data Output Data Output DataS3
Orchestration
Data Location
Registration
Frame
work
DevOps
45. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Three-Pronged Challenges
46. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Three-Pronged Objectives: “S3”
SCALABILITYSAVINGS STABILITY
47. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Savings: 30,000 EC2 Instances Used per Week
48. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Savings: Over 95% of EC2 Instances Use Spot
49. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Savings: Over 95% of EC2 Instances Use Spot
50. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Savings: Get the Best Possible Price
51. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Savings: EC2 Usage across AZs
52. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Savings: Multiple Pattern Configurations
Data Lake
PatternN
Output Data
m4.4xlarge
* 50
c4.8xlarge
* 25
53. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Three-Pronged Objectives: “S3”
SCALABILITYSAVINGS STABILITY
54. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scalability: Market Events Reach New Highs
55. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scalability: EC2 Usage per Week
56. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scalability: EC2 Usage per Week
57. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Three-Pronged Objectives: “S3”
SCALABILITYSAVINGS STABILITY
58. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Stability: (Minimal) Disruption Due to Spot
59. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Stability: Time-Sensitive Workloads Use On-Demand
60. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Three-Pronged Challenges
61. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Technology Project Manager
Market Regulation Surveillance
FINRA
http://technology.finra.org/
Ratnakar Korem
Technology Project Manager
Market Regulation Surveillance
FINRA
http://technology.finra.org/
Bhavesh Maisheri
Thank You!
62. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Optimization Best Practices
✓ Remember the pillars of optimization
✓ Right sizing
✓ Increase elasticity (turn stuff off!)
✓ Measure, monitor, and improve
✓ Use Launch Templates to streamline and simplify
the launch process
✓ Use tags to understand your services
✓ Architect your workloads with performance and
cost in mind
✓ Optimize across the three purchasing options
63. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Putting It All Together
Build free from
constraints
Optimize cost and
performance
Accelerate your
innovation
By combining the breadth of the three purchase options for Amazon EC2 with the
depth of the capabilities our platform provides, you will …
On AWS, you can be more innovative and more cost-effective than anywhere else
64. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank You!