In this session, customers learn more about the T2 instance type and the performance and cost savings it can bring to startups, SMBs, and enterprises. Customers will share best practices and tips for how they use T2 instances across workloads including development and test, production web servers, continuous integration and more.
2. What to Expect from the Session
• Review of EC2 instance families and the role of T2
• Deep dive on the T2 credit model
• Hear from Pearson about how they use T2
• Survey of great T2 workloads
• Tips for using T2 instances
3. T2: Background and History
• One of the fastest growing EC2 instance families
• t2.micro is free to try (aws.amazon.com/free)
2010 2014 2015 2016
t1.micro
t2.micro
t2.small
t2.medium
t2.nano
t2.large
t2.xlarge
t2.2xlarge
6. Amazon EC2 T2 Instances
Great performance at a low price…
...for workloads which do not need to use
the CPU all the time.
Tip: The majority of EC2 instances don’t use their CPU
heavily. T2 instances provide a lower cost option.
8. Great Fit for T2: Occasional Bursts, Low Average
Example workload:
Continuous Integration
Average 24hr CPU:
~5%
Good fits:
t2.nano – t2.2xlarge
9. Great Fit for T2: Longer Bursts, Less Often
Example workload:
VDI, Line of Business
Average 24hr CPU:
~10%
Good fits:
LOB: t2.micro
VDI: t2.medium –
t2.2xlarge
10. Not a Fit for T2: Sustained High CPU Usage
Example workload:
Video Transcoding
Average 24hr CPU:
~80%
Good fits:
Not a good fit for T2
12. T2 Credit Model
• A CPU credit provide the
performance of a full CPU core
for one minute
• An instance earns CPU credits
at a steady rate
• An instance consumes credits
when active
• Credits expire (leak) over time
14. T2: Amazon CloudWatch Metrics
• Keep track of CPU
utilization and
credits in
CloudWatch
• Create alarms to
track when you run
out of credits
• Use for scaling
automatically
16. Pearson Higher Eduction
• Started building into Amazon EC2 in 2012
• 120 - Development teams
• Mostly in US and Sri Lanka
• 470 - Application
• Mostly new development for cloud
• Some legacy force fit to cloud
17. Pearson Higher Education — AWS footprint
• 6280 EC2 instances
• 600 Elastic Load Balancers
• 350 Tb of EBS volume storage
• 10000 Route 53 records
• 4 peered VPCs per region (dev, stg, prd, admin)
• 90% in Virginia
• Rest in Ireland, California, Oregon
• Adding Australia
19. Pearson Higher Education — Migration
May - July 2015 pushed all teams to migrate off cheaper M1
instances.
Two factors that could affect ability to migrate off M1:
• Use of ephemeral storage could affect any instance type.
• CPU utilization could affect ability to migrate to T2
22. Pearson Higher Education — Migration Results
• Estimated saving of $9K - $15K/month
• Good cleanup exercise (teams evaluated actual needs)
• T2.micro, T2.small, and T2.medium have increased
steadily after migration
23. Pearson Higher Education — T2 scenarios
Haproxy load balancers
• development - 140
• staging - 265
• production - 95
Why T2 works well as a load balancer:
• Low CPU requirement
• Good networking/$
24. Pearson Higher Education — size guidance for
network constrained instances (haproxy)
Cores Network Mb/s $/hour
t2.micro 1* 63 0.013
t2.small 1* 126 0.026
t2.medium 2* 253 0.052
m3.medium 1 296 0.067
t2.large 2* 501 0.104
c4.large 2 618 0.11
c4.xlarge 4 1260 0.22
*As long as the instance has low average CPU utilization.
25. Pearson Higher Education — iperf graph
Guess which ones
are T2
Note: Past performance is
not an indicator of future
results
26. Pearson Higher Education — T2 scenarios
Application instances
• development - 200
• staging - 225
• production - 125
Why T2 works well for the application layer:
• In development/staging with low CPU load, credits
accumulate for the surges during testing
• Good memory/$ (Java heap)
27. Pearson Higher Education — size guidance for
memory constrained instances (application)
Cores Memory $/hour
t2.micro 1* 1 0.013
t2.small 1* 2 0.026
t2.medium 2* 4 0.052
t2.large 2* 8 0.104
r3.large 2 15 0.166
r3.xlarge 4 30 0.333
*As long as the instance has low average CPU utilization.
28. Pearson Higher Education - Summary
T2 instances grew from 0% to 19% of total EC2 instances
in last 18 months.
Estimated savings of $11k-$20k per month.
Right-sizing guidance for T2 instances supporting key
workloads – including load balancers (HAProxy) and app
servers (Java).
30. Tip #1: Use T2 for the following top workloads
• Websites and web apps
• Development and test
• Proxies and load balancers
• Virtual desktops
• Continuous integration
• Enterprise line-of-business
Not a Great Fit: Batch compute, In-memory databases, etc.
31. Tip #2: Popular Migrations to T2
From To Benefits
M4.large T2.large 13% lower price, higher burst performance
C4.large T2.medium 50% lower price, more memory
M3.medium T2.medium 22% lower price, more vCPUs
C1.medium T2.medium 60% lower price, more memory
T1.micro T2.micro 35% lower price, more memory
M4.xlarge T2.xlarge 13% lower price, higher burst performance
Check your instances to see if their CPU utilization is a
good fit for T2.
32. Tip #3: T2 Launch Credits
T2 instances launch with 30 minutes of burst credits.
But - by default, only 100 instances per 24 hours per
account get launch credits.
Tips:
1. Monitor CloudWatch metrics to ensure instances do not
start with zero credits.
2. Request limit increase if launching more than 100
instances per 24 hours. (CI/CD, test environments, etc.)
33. Summary
T2 instances offer great performance at a low cost, for
workloads which do not need to use the CPU all the time.
You can use CloudWatch to understand the CPU utilization
of your workloads, including your T2 CPU credits.
From individuals and startups to large enterprises, T2 fits
into a wide variety of use cases.