AWS CPU credits are unique to T-series instances – and they can be a bit tricky to figure out. Whether you’re using the AWS free tier or just trying to use the smallest EC2 compute instance you can, you’ll need to keep track of these credits. These credits are both generated and used by the T2 and T3 instance families to decide how much CPU power you can actually use on those EC2 instances. This can be confusing if you aren’t expecting your virtual machine to have it’s CPU power throttled, or are wondering why the cost is much higher than you thought it would be.
AWS first released a “burstable” instance type in the form of the t1.micro instance size in 2010, which was four years after the first EC2 instance size was released (m1.small in 2006, for you historians). Up until 2010, new instance sizes had always been bigger than the m1.small size, but there was demand for a VM size that could accommodate low-throughput or inconsistent workloads.
The t1.micro was the only burstable instance size for another four years, until the t2.medium was released in 2014. Soon, there was a whole range of t2 instances to cover the use case of servers that were low-powered while idle, but could have lots of potential compute resources available for the couple minutes each hour they were needed. In 2018, AWS introduced the t3 family that uses more modern CPUs and the AWS Nitro system for virtualization.
AWS CPU Credits 101
The key reason why T-series instances have a lower list price than corresponding M-series instances (in standard mode, more on that later) is the CPU credits that are tracked and used on each resource. The basic premise is that an idle instance earns credits, while a busy instance spends those credits. A “credit” corresponds to 1 minute’s worth of full 100% CPU usage, but this can be broken down in different ways if the usage is less than 100%. For instance, 10% of CPU usage for 10 minutes also uses 1 credit. Each T-series machine size not only has a number of CPUs available, but also earns credits at different rates.
Here’s where the math starts getting a little tricky. A t2.micro instance earns 6 credits per hour with 1 available CPU. If you run that instance at 10% utilization for a full hour, it’ll spend 6 credits per hour (or 1 credit every 10 minutes). This means that any time spent under 10% utilization is a net increase in CPU credits, while any time spent above 10% utilization is a net decrease in CPU credits. A t3.large instance has 2 CPUs and earns 36 credits per hour, which means the balancing point where the net credit use is zero will be at 30% utilization per CPU.
So what happens when you run out of credits or never use your credits?
Standard Mode vs. Unlimited Mode
One of the differences between the t2 family and the t3 family is the default way each handles running out of credits. The t2 family defaults to Standard Mode, which means that once the instance has run out of credits to use, the CPU is throttled to the baseline value we calculated above (so 10% for t2.micro) and will continue maxing out at that value until credits have built back up. In practice, this means that your process or application that has burst up to use a lot more CPU than normal will soon be slow and unusable if the load remains high.
In 2017, AWS introduced Unlimited Mode as an option for t2 instances – and later, in 2018, as the default for t3 instances when they were introduced. Unlimited mode means that instead of throttling down to the baseline CPU when your instance runs out of credits, you can continue to run at a high CPU load and just pay for the overages. This price is 5¢ per CPU hour for Linux and 9.6¢ per CPU hour for Windows. In practice, this means that a t2.micro that has run out of credits and is running at 35% CPU utilization for a full 24 hours would cost an additional 30¢ that day on top of the normal 27.84¢ for 24hr usage, meaning the price is more than doubled.
Using T-series Instead of M-series
These overage charges for Unlimited Mode of t2 and t3 instances means that while the list price of the instance is much cheaper than corresponding m4 and m5 instances, you need to figure out if the utilization pattern of your workload makes sense for a burstable instance family. For example, an m5.large in us-east-1 costs 9.6¢/hr and a t3.large with similar specs costs 8.32¢/hr with a 30% CPU baseline. If your t3.large server is going to be running higher than 55.6% CPU for the hour on a consistent basis, then the price of the m5.large is actually lower.
When to Stop T-series and When to Let Them Run
One perk of using the t2 instances in Standard mode is that each time you start the server, you receive 30 launch credits that allow a high level of CPU usage when you first start the instance from a stopped state. These launch credits are tracked separately from accrued credits and are used first, so servers that only need to run short-lived processes when first starting can take advantage of this fact. The downside of stopping t2 servers is that accrued credits are lost when you stop the instance.
On the other hand, t3 servers persist earned credits for 7 days after stopping the instance, but don’t earn launch credits when they are first started. This is useful to know for longer-running processes that don’t have huge spikes, as they can build up credits but you don’t need to worry about losing the credits if you stop the server.
At ParkMyCloud, we specialize in scheduling servers and databases to turn off on a schedule, which is perfect for non-production servers. We find that lots of users have t2 and t3 instances for these dev and test workloads, but want to know what happens to credits if you park those servers overnight. As we discussed, AWS CPU credits go away in T2 standard mode (but with additional launch credits) but persist in T3 Unlimited mode. Knowing this, you can pick the right instance size for the workload you’re running and confidently save money using ParkMyCloud.
- Best for non-production instances that have a quick burst of usage when starting = T2 instance with ParkMyCloud parking schedule
- Best for non-production instances with unpredictable, but sporadic spikes = T3 instance with ParkMyCloud parking schedule
Try it for free to see how we can make the cost of your t2 and t3 servers even lower.
Further reading on saving money on AWS:
When it comes to AWS training resources, there’s no shortage of information out there. Considering the wide range of videos, tutorials, blogs, and more, it’s hard knowing where to look or how to begin. Finding the best resource depends on your learning style, your needs for AWS, and getting the most updated information available. Whether you’re just getting started in AWS or consider yourself an expert, there’s an abundance of resources for every learning level. With this in mind, we came up with our 7 favorite AWS training resources, sure to give you the tools you need to learn AWS:
1. AWS Self-Paced Labs
What better way to learn that at your own pace? AWS self-paced labs give you hands-on learning in a live AWS environment, with AWS cloud services, and actual scenarios you would encounter in the cloud. There are two different ways to learn with these labs. You can either take an individual lab or follow a learning quest. Individual labs are intended to help users get familiar with an AWS service as quickly as 15 minutes. Learning quests guide you through a series of labs so you can master any AWS scenario at your own pace. Once completed, you will earn a badge that you can boast on your resume, LinkedIn, website, etc.
Whatever your experience level may be, there are plenty of different options offered. Among the recommended labs you’ll find an Introduction to Amazon Elastic Compute Cloud (EC2), and for more advanced users, a lab on Maintaining High Availability with Auto Scaling (for Linux).
2. AWS Free Tier
Sometimes the best way to learn something is by jumping right in. With the AWS Free Tier, you can try AWS services for free. This is a great way to test out AWS for your business, or for the developers out there, to try services like AWS CodePipeLine, AWS Data Pipeline, and more. While you are still getting a hands-on opportunity to learn a number of AWS services, the only downside is that there are certain usage limits. You can track your usage with a billing alarm to avoid unwanted charges, or you can try ParkMyCloud and park your instances when they’re not in use so you get the most out of your free tier experience. In fact, ParkMyCloud started its journey by using AWS’s free tier!
3. AWS Documentation and Whitepapers
AWS Documentation is like a virtual encyclopedia of tools, terms, training, and everything AWS. You’ll find case studies, tutorials, cloud computing basics, and so much more. This resource is a one-stop-shop for all of your AWS documentation needs, whether you’re a beginner or advanced user. No matter where you are in your AWS training journey, AWS documentation is always a useful reference and certainly deserves a spot in your bookmarks.
Additionally, you’ll find whitepapers that give users access to technical AWS content that is written by AWS and individuals from the AWS community, to help further your knowledge of their cloud. These whitepapers include things from technical guides, reference material, and architecture diagrams.
So far, we’ve gone straight to the source for 3 out of 7 of our favorite AWS training resources. Amazon really does a great job of providing hands-on training, tutorials, and documentation for users with a range of experience. However, YouTube opens up a whole new world of video training that includes contributions from not only Amazon, but other great resources as well. Besides the obvious Amazon Web Services channel, there are also popular and highly rated videos by Edureka, Simplilearn, Eli the Computer Guy, and more.
As cloud technology usage continues to expand and evolve, blogs are a great way to stay up to speed with AWS and the world of cloud computing. Of course, in addition to aws labs, a free-trial, extensive documentation, and their own YouTube channel, AWS also has their own blog. Since AWS actually has a number of blogs that vary by region and technology, we recommend that you start by following Jeff Barr – Chief Evangelist at Amazon Web Services, and primary contributor. Edureka was mentioned in our recommended YouTube channels, they also have a blog that covers plenty of AWS topics. The CloudThat blog is an excellent resource for AWS and all things cloud, and was co-founded by Bhaves Goswami – a former member of the AWS product development team. Additionally, AWS Insider is a great source for all things AWS. Here you’ll find blogs, webcasts, how-to, tips, tricks, news articles and even more hands-on guidance for working with AWS. If you prefer newsletters straight to your inbox, check out Last Week in AWS and Inside Cloud.
6. Online Learning Platforms
As public cloud computing continues to grow – and AWS continues to dominate the market – people have become increasingly interested in this CSP and what it has to offer. In the last 8-10 years, two massive learning platforms were developed, Coursera and Udemy. These platforms offer online AWS courses, specializations, training, and degrees. The abundance of courses that these platforms provide can help you learn all things AWS and give you a wide array of resources to help you train for different AWS certifications and degrees.
GitHub is a developer platform where users work together to review and host code, build software and manage projects. This platform has access to a number of materials that can help further your AWS training. In fact, here’s a great list of AWS training resources that can help you prepare for an Amazon Cloud certification. The great thing about this site is the collaboration among the users. The large number of people in this community brings together people from all different backgrounds so they are able to provide knowledge about their own specialties and experiences. With access to everything from ebooks, video courses, free lectures, and sample tests, posts like these can help you get on the right certification track.
There’s plenty of information out there when it comes to AWS training resources. We picked our 7 favorite resources for their reliability, quality, and range of information. Whether you’re new to AWS or consider yourself an expert, these resources are sure to help you find what you’re looking for.
In December, AWS announced a new service called AWS Compute Optimizer that provides recommendations with the goal of properly sizing EC2 virtual machines. Rightsizing is one of AWS’s listed five pillars of cost optimization, and it’s good to see AWS following the trend of cloud providers making it easier for customers to optimize for cost and performance. Actually, this is not the first “rightsizing tool” they’ve promoted. Early last year they pushed what was essentially a collection of Python scripts in the AWS Solutions Portal called “AWS Right Sizing”.
As cloud cost optimizers here at ParkMyCloud, rightsizing is high on the list of optimization strategies we focus on. The ParkMyCloud platform offers rightsizing recommendations and actions, along with two other cost optimization pillars: “Increase Elasticity” through scheduled shutdown of idle resources, and “Measure, monitor, and improve” through cost and savings reports and an RBAC-enabled user portal. Let’s take a look at what the AWS Compute Optimizer offers, and how it compares to ParkMyCloud’s rightsizing.
AWS Compute Optimizer Overview
The AWS Compute Optimizer service generates size change recommendations based on your existing EC2 servers, including those that are in Auto Scaling groups. Each EC2 virtual machine can get up to 3 recommendations for different families and sizes that you could choose, along with the performance risk and costs associated with each option. While you are browsing the options, the interface will show you what the performance would have looked like over the past 2 weeks if you were running on the selected instance size instead of the current instance size, which is nice for analyzing the options against your organization’s risk profile. However, there is no direct way to take the Rightsizing action, so you must go and adjust the instance settings manually.
AWS Compute Optimizer is free of charge and available on all AWS accounts regardless of support level. You do have to choose to opt-in to use the service before recommendations will be made. A major limiting factor is the region availability: as of February 4, 2020, AWS Compute Optimizer is available in 16 regions, and supports the M, C, R, T and X instance families. It uses only the past 2 weeks’ worth of Cloudwatch data to generate recommendations, which is a small window that may result in odd recommendations if those two weeks include any anomalies.
If your EC2 instances line up with this subset of instance types and regions, then the AWS Compute Optimizer can provide some suggestions for cost savings. However, if your needs are a little more diverse or robust, read on.
ParkMyCloud Rightsizing Overview
ParkMyCloud has offered scheduling of idle cloud resources since 2015. Last year we announced a major advancement in the platform’s cost optimization capabilities with the release of Rightsizing.
Similarly to the AWS Compute Optimizer, ParkMyCloud’s Rightsizing capabilities offer up to 3 recommendations for different sizes that your instances could be based on Cloudwatch data. Additionally, ParkMyCloud’s Rightsizing can:
- ParkMyCloud is multi-cloud, multi-account, and multi-region in a single pane of glass, so you can view recommendations across all of your cloud accounts in one place (including all AWS regions, not just the ones listed above and Azure and Google Clouds)
- ParkMyCloud can take the Rightsizing action for you once you accept a recommendation, including scheduling that resize action for a future time (such as during a maintenance window).
- ParkMyCloud’s recommendations are based on data from a period of up to 24 weeks, providing a much more robust recommendation compared to the 2-week data set imposed by Cloudwatch.
- ParkMyCloud makes recommendations for and resizes RDS databases, including Aurora instances. RDS databases have an average cost of 75% higher than EC2 instances, which means this is a significant opportunity for cost savings.
- All AWS instance sizes are supported, not just M/C/R/T/X
- Users can reject a recommendation and give an explanation, so administrators know why actions weren’t taken.
- Savings from Rightsizing (and parking) are tracked and reported in ParkMyCloud, so you can show management or the CFO just how much money you’re saving the company.
Optimize Your Rightsizing
The AWS Compute Optimizer is a great feature that AWS is offering for free to its cloud users, but the limitations and inability to take direct action from the recommendations makes it less useful for serious cost optimization. ParkMyCloud’s features make it the right choice for saving money on your cloud bill while optimizing performance, and the free trial makes it easy to get started today. Feel free to contact us if you have any questions.
AWS Trusted Advisor is a service that helps you understand if you are using your AWS services well. It does this by looking at 72 different best practices across 5 total categories, which include Cost Optimization, Performance, Security, Fault Tolerance, and Service Limits. All AWS users have access to 7 of those best practices, while Business Support and Enterprise Support customers have access to all items in all categories. Let’s dive in to each category to see what is there and what is missing.
A category that is near and dear to our hearts here at ParkMyCloud, the Cost Optimization category includes items related to the following services:
- EC2 – Reserved Instance purchase recommendations, underutilized VMs, Reserved Instance lease expirations
- Load Balancers – idle LBs
- EBS – Underutilized volumes
- Elastic IP – unassociated addresses
- RDS – Idle databases
- Route 53 – Inefficient latency record sets
- Redshift – Underutilized clusters
This list includes many of the services that are often the most expensive line items in an AWS account, but doesn’t take into account a large percentage of the AWS services available. Also, these recommendations only provide links to other AWS documentation that might help you solve the problem, as opposed to a service like ParkMyCloud that provides both the recommendations and ability to take the action of shutting down idle instances or resizing those instances for you.
This category caters more towards production instances, as it aims to make sure the performance of your applications is not hindered due to overutilization (as opposed to the Cost Savings category above, which is focused more on underutilization). This includes:
- EC2 – highly-utilized VMs, large number of security group rules (per instance or per security group)
- EBS – SSD volume configuration, overutilized magnetic volumes, EC2 to EBS throughput
- Route 53 – alias record sets
- Cloudfront – CDN optimization, header forwarding, cache hit ratio, alternate domain names
This category is one of the weakest in terms of services supported, so you may want to factor that in if you’re trying to make sure your production applications are performing well on alternative AWS services.
The security checks of AWS Trusted Advisor will look at the following items:
- Security Groups – Unrestricted ports, unrestricted access, RDS access risk
- IAM – Use of Roles/Users, key rotation, root account MFA, password policy
- S3 – Bucket permissions
- CloudTrail – logging use
- Route 53 – MX and SPF record sets
- ELB – Listener security, Security groups
- Cloudfront – Custom SSL certificates, certificates on the origin server
- Access keys – Exposed keys
- Snapshots – EBS public snapshots, RDS public snapshots
Security is a tough category to get right, as almost every one of these needs to be reviewed for your business needs. While this isn’t an exhaustive list of security considerations, it certainly helps your organization cover the basics and prevent some “I can’t believe we did that” moments.
One of the main benefits of the cloud that often gets overlooked is the use of distributed resources to increase fault tolerance for your services. These items in the fault tolerance category are focused on increasing the redundancy and availability of your applications. They include:
- EBS – Snapshots
- EC2 – Availability Zone balance
- Load Balancer – optimization
- VPN Tunnel – redundancy
- Auto Scaling Groups – general ASG usage, health check
- RDS – backups, multi-AZ configuration
- S3 – bucket logging, bucket versioning
- Route 53 – Name server delegations, record sets with high TTL or failover resources, deleted health checks
- ELB – connection draining, cross-zone load balancing
- Direct Connect – Connection / location / virtual interface redundancy
- Aurora DB – instance accessibility
- EC2 Windows – EC2Config agent age, PV driver versions, ENA driver versions, NVMe driver versions
Overall, this turns out to be a great list of AWS services that can really make sure your production applications have minimal downtime and minimal latency. Additionally, some services like snapshots and versioning, help with recovering from problems in a timely fashion.
One of the hidden limitations that AWS puts on each account is a limit of how many resources you can spin up at any given time. This makes sense for AWS, so they don’t have new users unintentionally (or intentionally!) perform a DOS for other users. These service limits can be increased if you ask nicely, but this is one of the few places where you can actually see if you’re coming close. The services covered are:
- Route 53
Verdict: Helpful, But Not Game-Changing
While these checks and advice from AWS Trusted Advisor certainly help AWS users see ways to improve their usage of AWS, the lack of one-click-action makes these recommendations just that – recommendations. Someone still has to go verify the recommendations and take the actions, which means that in practice, a lot of this gets left as-is. That said, while I wouldn’t suggest upgrading your support just for Trusted Advisor, it certainly can provide value if you’re already on Business Support or Enterprise Support.
Longtime readers of the ParkMyCloud blog know about some of the pillars of cost savings – Reserved Instances for production workloads, schedule your non-production servers to turn off on nights and weekends, and resize your VMs to a smaller size if it’s underutilized – our data shows that 95% of instances in the public cloud are operating at less than 50% average CPU – but one of the more underrated methods of saving money on your cloud bill is by making sure your VMs and databases are running on the latest instance family. Let’s take a look at what this means, what your options are, and how much you can expect to save.
Instance Family 101
When you spin up a virtual machine in a public cloud like AWS, Microsoft Azure, or Google Cloud, you get to decide the specifications of the machine. In addition to disk options and network options, you’ll often choose CPU and memory in a “bundle” of pre-built sizes. These sizes have an instance family they are a part of, which usually helps you choose based on whether the application you plan to run is CPU-intensive, memory-intensive, or requires a GPU.
For example, if you are setting up an EC2 virtual machine in AWS, you’ll get to pick from a couple different instance sizes and types as one of the first screens you see in the console. If you pick the instance type of “m5.large”, then “m5” is the instance family and “large” is the size. M5 in AWS is a balanced instance family, while C5 is meant for CPU-intensive applications. Microsoft Azure has a similar idea, with their D-series being a balanced instance and the F-series being optimized for CPU.
Google Cloud does VM sizing a bit differently, but still has the concept of an instance family. A general purpose VM in GCP is often of the type “n2-standard”. Specializing in CPU offers a few different options, where you have the choice between “n2-highcpu” instances for more vCPUs or “c2-standard” for higher performance of those vCPUs. Additionally, GCP offers custom VM sizes, so you can individually pick your vCPU count and the amount of memory you need.
Cloud providers incentivize instance modernization by pricing the newest generations the lowest. Most new instance families come out due to better-performing hardware. This usually comes in the form of newer CPU types, but can also refer to networking or memory improvements as well. This means that not only are you getting a server that performs better (even with the same specs), but it’s also cheaper as well. The same size but in a more modern family gets you 10%-20% discounts in price. This combination of better performance and better price means that unless your application doesn’t interact well with the latest hardware, then it’s a no-brainer to switch.
ParkMyCloud Can Help Modernize
One of the recommendations that ParkMyCloud makes, in addition to schedules for non-production resources and size recommendations based on usage data, is to modernize a VM to a newer instance family so that you can optimize performance with the lowest cost. If you choose to accept this recommendation to move to the latest family, then you can choose to resize right away, or to pick a time in the future (like during a maintenance window) — ParkMyCloud takes the action for you. Note that this involves restarting the machine, so you may want to make sure it’s not in use at the time of resizing.
Remember, VM sizing and type selection has a drastic effect on cost –– one size down within the same VM family can reduce the cost by 50%, and with changes between families or across more than one size, savings can be even greater. ParkMyCloud’s user interface helps you see how much you can save by making this modernization update, so you know that you’re getting the most out of your cloud spend. Try out ParkMyCloud today to get recommendations for parking, rightsizing, and modernizing your instances!