DEV Community

Michael Wahl for AWS Community Builders

Posted on

AWS Compute Optimizer provides Amazon EC2 instance recommendations

This was something I saw in my AWS console and then looked into more deeply.

Limitations
There are some limitations to be aware of before jumping into this. Compute Optimizer currently generates recommendations for M, C, R, T, and X instance types. Other instance types are not considered by Compute Optimizer. If you’re using other instance types, they will not be listed in the Compute Optimizer recommendations view.

Getting Started
To view a recommendation for an EC2 instance through the EC2 console
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
In the navigation pane, choose Instances, and then choose the instance ID.
On the instance summary page, in the AWS Compute Optimizer banner near the bottom of the page, choose View detail.
The instance opens in Compute Optimizer, where it is labeled as the Current instance. Up to three different instance type recommendations, labeled Option 1, Option 2, and Option 3 are provided. The bottom half of the window shows recent CloudWatch metric data for the current instance: CPU utilization, Memory utilization, Network in, and Network out.
Determine whether you want to use one of the recommendations. Decide whether to optimize for performance improvement, for cost reduction, or for a combination of the two.
To view recommendations for all EC2 instances across all Regions through the Compute Optimizer console
Open the Compute Optimizer console at https://console.aws.amazon.com/compute-optimizer/.
Choose View recommendations for all EC2 instances.
You can perform the following actions on the recommendations page:
To filter recommendations to one or more AWS Regions, enter the name of the Region in the Filter by one or more Regions text boxes, or choose one or more Regions in the drop-down list that appears.
To view recommendations for resources in another account, choose Account, and then select a different account ID.
To clear the selected filters, choose Clear filters.
To view details, such as additional recommendations and a comparison of utilization metrics, choose the finding (Under-provisioned, Over-provisioned, or Optimized) listed next to the desired instance.
Considerations
Before changing an instance type, consider the following:
The recommendations don’t forecast your usage. Recommendations are based on your historical usage over the most recent 14-day time period. Be sure to choose an instance type that is expected to meet your future resource needs.
Focus on the graphed metrics to determine whether actual usage is lower than instance capacity.
Compute Optimizer might supply recommendations for burstable performance instances, which are T3, T3a, and T2 instances. If you periodically burst above the baseline, make sure that you can continue to do so based on the vCPUs of the new instance type.
If you’ve purchased a Reserved Instance, your On-Demand Instance might be billed as a Reserved Instance. Before you change your current instance type, first evaluate the impact on Reserved Instance utilization and coverage.
Consider conversions to newer generation instances, where possible. It's important to note, depending on the region such as US-WEST-2 for example, you may not be able to bring up an older instance type such as T3 for example, you will need to use a T3a.
When migrating to a different instance family, make sure the current instance type and the new instance type are compatible.
Consider the performance risk rating that’s provided for each recommendation. Performance risk indicates the amount of effort you might need to spend in order to validate whether the recommended instance type meets the performance requirements of your workload. Rigorous load and performance testing before and after making any changes is also a great idea.

The tools below are great options for testing.

https://github.com/newsapps/beeswithmachineguns

https://github.com/locustio/locust

Top comments (0)