How to Find & Resize Amazon EC2 Instances with Low CPU Usage
Save costs by resizing EC2 instances with low CPU utilization. Learn how to find and resize instances with low CPU usage.
Save costs by resizing EC2 instances with low CPU utilization. Learn how to find and resize instances with low CPU usage.
In a cloud-based environment, it’s important to optimize your costs by ensuring that your computing demands closely match your allocated resources.
If your team is using AWS, one way to lower your costs is by finding EC2 instances that are using a low amount of computing power relative to their capacity.
By monitoring your low CPU usage and identifying which EC2 instances run low and high, you're better positioned to redeploy your computing resources more effectively and efficiently using Amazon's well-architected framework.
This framework helps structure your opportunities to reduce costs by aligning computing resources according to type, task, and size with your workload requirements.
In a nutshell, CPU usage represents what percentage of the amount of time a CPU spends processing non-idle tasks. That means low CPU usage represents a low percentage of the amount of time to process a given set of tasks at a given period (i.e. low utilization rate). As such, low CPU utilization is an indication of inadequate computing resource management.
AWS recommends looking for EC2 instances that have a maximum CPU usage and memory usage of less than 40% over a four-week period.
Performance data offers great insights to identify which computing resources are over- or underutilized. To analyze performance data, certain metrics are useful to inform your analysis about whether actual usage is lower compared to instance capacity, including:
To find these metrics, you can start in the Amazon EC2 console and choose Instances in the navigation menu. You can then select a specific instance and view metrics like CPU utilization on the Monitoring tab.
After you’ve reviewed metrics for your EC2 instances, you can make decisions on resizing based on how the instance is being used.
For example:
In migrating within the same instance family, you only need to consider vCPU, memory, network throughput, and ephemeral storage. If you are migrating across instance families, you also need to consider compatibility in virtualization type, network, and platform.
If you identify idle EC2 instances which haven’t been used in two weeks or more, you should consider turning it off to lower your costs.
You can make this decision depending on the organizational impact of terminating the instance, who owns it, and whether you will incur costs if you re-provision the instance in the future. If you decide to terminate the instance, you might want to store a snapshot of the attached EBS volume so you can restore it later, and delete the EBS volume in the meanwhile.
If you don’t delete the EBS volume when you terminate the EC2 instance, it will continue to be charged against your account.
We recently wrote a guide on how you can find and delete unattached EBS volumes.
As we mentioned earlier, if you are seeing low usage (less than 40% maximum CPU and memory usage over the last four-weeks) and you believe you are using the right type of instance, you can select a smaller instance size.
For example, if you are using a c4.8large EC2, you could save roughly $600/month by resizing to a c4.4xlarge EC2.
As your business and engineering requirements evolve against internal operational needs and external market developments, your resizing efforts should be just as agile.
Whether you want to aggregate reports on your CPU usage or navigate instance migrations, having an easy way to navigate the steps is critical.
With Blink, you can simply run this automation to manage and customize your EC2 resizing process.
When this automation runs, it executes the following actions:
You can import this automation from the Blink library and customize it however you like. For example, you could add conditional logic depending on the usage percentage.
Get started with Blink today to see how easy automation can be.
Blink is secure, decentralized, and cloud-native. Get modern cloud and security operations today.