AWS lowers cloud pricing by launching the T2 instance type that can burst to handle occasional workload spike

awsT2 instances are Burstable Performance Instances that provide a baseline level of CPU performance with the ability to burst above the baseline. The baseline performance and ability to burst are governed by CPU Credits. Each T2 instance receives CPU Credits continuously at a set rate depending on the instance size.  T2 instances accrue CPU Credits when they are idle, and use CPU credits when they are active.  T2 instances are a good choice for workloads that don’t use the full CPU often or consistently, but occasionally need to burst (e.g. web servers, developer environments and small databases).

Click continue reading for more.

T2 instances are currently available in three instance sizes: t2.micro, t2.small, and t2.medium. Customers can launch T2 instances using the AWS management console, Amazon EC2 command line interface, and the AWS SDKs. T2 instances are available as On-Demand or Reserved Instances, but they cannot be purchased as Spot Instances.

With On-Demand Instance prices starting at $0.013 per hour ($9.62 per month), for t2.micro, $0.026 per hour ($19,24) for t2.small and $0.052 per hour ($38,48) for t2.medium. T2 instances are the lowest-cost Amazon EC2 instance option.

Features:

  • High Frequency Intel Xeon Processors operating at 2.5GHz with Turbo up to 3.3GHz
  • Burstable CPU, governed by CPU Credits, and consistent baseline performance
  • Lowest-cost general purpose instance type, and Free Tier eligible (t2.micro only)
  • Balance of compute, memory, and network resources.

Use cases: Development environments, build servers, code repositories, low-traffic web applications, early product experiments, small databases.

Model vCPU CPU Credits / hour Mem (GiB)  Storage   (GB)
t2.micro 1 6 1 EBS Only
t2.small 1 12 2 EBS Only
t2.medium 2 24 4 EBS Only

Instance type

Initial CPU credit*

CPU credits earned per hour

Base performance (CPU utilization)

Maximum CPU credit balance

t2.micro

30

6

10%

144

t2.small

30

12

20%

288

t2.medium

60

24

40%**

576

* There are limits to how many of your T2 instances will launch with the initial credit, which by default is set to 100 launches per 24-hour period by region. If you’d like to increase this limit, you can file a customer support limit increase request by using the Amazon EC2 Instance Request Form.

** t2.medium instances have two vCPUs. The base performance is an aggregate of the two vCPUs; this can be 40% utilization on one vCPU, 20% each on two vCPUs, or any combination that does not exceed 40%.

 

CPU Credits

Traditional Amazon EC2 instance types provide fixed performance, while T2 instances provide a baseline level of CPU performance with the ability to burst above baseline. The baseline performance and ability to burst are governed by CPU credits. Each T2 instance continuously receives CPU credits at a set rate, depending on the instance size. T2 instances accrue CPU credits when they are idle, and use CPU credits when they are active. A CPU credit provides the performance of a full CPU core for one minute. Each T2 instance starts with a healthy balance of CPU credits.

For example, a t2.small instance continuously receives credits at a rate of 12 CPU credits per hour. This capability provides baseline performance equivalent to 20 percent of a CPU core. If at any moment the instance does not need the credits it receives, it stores them in its CPU credit balance for up to 24 hours. If and when your t2.small instance needs to burst to more than 20 percent of a core, it draws from its CPU credit balance. Over time, if you find that your workload needs more CPU credits, or that your instance does not maintain a positive CPU credit balance, we recommend using a larger T2 size, such as the t2.medium, or using a fixed performance instance type.

CPU credits are spent bursting above baseline in different ways depending on the number of vCPUs provided in the instance. One CPU credit can be spent by one vCPU bursting to 100 percent of a CPU core for one minute. Other combinations of vCPUs, utilization, and time will also spend one CPU credit; such as one vCPU running at 50 percent for two minutes, or two vCPUs (for example, on t2.medium instances) running at 25 percent each for two minutes.

The following table lists the initial CPU credit allocation received at launch, the rate at which CPU credits are received, the baseline performance level as a percentage of a full core performance, and the maximum CPU credit balance that an instance can accrue.ec2

The t2.micro and t2.small instance types launch with an initial balance of 30 CPU credits, and the t2.medium instance type launches with 60 CPU credits. This initial credit balance is designed to provide a good startup experience.

When your T2 instance doesn’t use the credits it receives, CPU credits are added to its CPU credit balance up to a specific point. The maximum credit balance for an instance is equal to the number of CPU credits received per hour times 24 hours. For example, a t2.micro instance earns 6 CPU credits per hour and can accumulate a maximum CPU credit balance of 144 CPU credits. When your instance requires more than the base performance CPU level, it simply uses CPU credits in the credit balance to burst to the required performance level.

If your instance uses all of its CPU credit balance, performance remains at the baseline performance level. If your instance is running low on credits, your instance’s CPU credit consumption (and therefore CPU performance) is gradually lowered to the base performance level over a 15-minute interval, so you will not experience a sharp performance drop-off when your CPU credits are depleted.

The CPU credit balance for an instance does not persist between instance stops and starts; stopping an instance causes it to lose its credit balance entirely, and when it restarts it will have an empty credit balance.

Monitoring your CPU Credits

You can see the credit balance for each T2 instance presented in the Amazon EC2 per-instance metrics of the CloudWatch console. T2 instances have two metrics, CPUCreditUsage and CPUCreditBalance. The CPUCreditUsage metric indicates the number of CPU credits used during the measurement period. The CPUCreditBalance metric indicates the number of unused CPU credits a T2 instance has earned. This balance is depleted during burst time as CPU credits are spent more quickly than they are earned.

Metric Description

CPUCreditUsage

(Only valid for T2 instances) The number of CPU credits consumed during the specified period. This includes both credits earned during the period and credits withdrawn from the CPU credit balance for bursting.

This metric identifies the amount of time during which physical CPUs were used for processing instructions by virtual CPUs allocated to the instance. For more information, see CPU Credits in the Amazon Elastic Compute Cloud User Guide.

Note

CPU Credit metrics are available at a 5 minute frequency.

Units: count

CPUCreditBalance

(Only valid for T2 instances) The number of CPU credits that an instance has accumulated.

This metric is used to determine how long an instance can burst beyond its baseline performance level at a given rate. For more information, see CPU Credits in the Amazon Elastic Compute Cloud User Guide.

Note

CPU Credit metrics are available at a 5 minute frequency.

Units: count

The new AWS T2.micro has more ram than T1.micro (613 MB vs 1 GB) and it’s cheaper. If you’re using old generation EC2 T1 instances, Amazon encourage you to try T2 instances for better performance at a lower cost, but T2 instances require HVM AMIs. So, you may need to have additional work to migrate your server. What i did on my server (where this blog is hosted) was to start a new one using HVM. (the old one was a t1.micro using PV AMI).

Check more about PV, HVM here.

Sources: CLiiP / TechCrunch


Comments

comments

Comments are Disabled