Revisiting T2s

Wondering if Amazon's EC2 T2 Unlimited Instance will work for your cloud workload? 

Read what BlueChipTek Cloud Services Architect, Joe Keegan, has to say about Amazon EC2 T2 Unlimited instance.

With the recent announcement of T2 Unlimited and the release of new instance types I wanted to revisit this the T2. For the right workloads the T2 instance type can make sense, but it’s important to understand how they work.

For smaller workloads T2s are the only name in the game, being the only instance type providing a single vCPU and less than ~4GBs of memory. But, do they make sense for larger workloads?

In this two part series, I’m talk about how T2s work, what has changed and when it makes sense to use a T2.

First, let’s recap how a T2 works.

Each T2 instance has a baseline performance expressed in percent of the maximum CPU performance. The t2.small has a baseline of 20% of the CPU utilization while a t2.large, which has 2 vCPUs, has a baseline of 60% out of 200% max. Or to put it another way the t2.large’s baseline is 30% per vCPU or 20% on one vCPU and 40% on the other or any combination that adds up to 60% CPU utilization between both vCPUs.  A T2 instance will be able to provide its baseline performance all day every day, which may be just fine for your application, but sometimes you’ll need to go over the baseline performance. This is where CPU credits come into play.

A CPU credit allows a T2 instance to use the CPU at 100% for one minute. But, CPU credits are not atomic, meaning partial CPU credits can be spent, and they are spent on a millisecond-level basis. Additionally, you only spend CPU credits for the percent utilization over your baseline. Say for example you have a t2.small instance that burst to 70% CPU utilization for 5.5 seconds (5500ms). The baseline of a t2.small is 20%, meaning that you are using 50% over the base line. If this was for a whole minute the instance would use .5 credits. But, since it was only for 5.5 seconds, or about 9.2% of a whole minute, the actual credits used would be only 9.2% of .5 or 0.046 CPU credits.

Each T2 instance has a max amount of CPU credits it can earn with CPU credit accrual rate depending on the instance type. You can see the details here. Each T2 instance launched starts with 30 CPU credits per vCPU allowing for the instance to burst past it’s baseline right when it’s launched.

My next blog post will talk about recent changes to T2, including T2 Unlimited and when it makes sense to use a T2. 

BlueChipTek offers an array of cloud consulting options to help you have an Optimized Cloud experience. For more information, read more on our OptimizedCloud Services