Lab complete!
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool
In order to complete this step, you need to have AWS Compute Optimizer enabled.
AWS Compute Optimizer uses machine learning to analyze the configuration and utilization data of your AWS resources. It reports whether your resources are optimal and generates recommendations (findings) to reduce the cost and improve the performance of your workloads.
When it comes to EC2 instances there are three types of findings:
You can enable AWS Compute Optimizer across your AWS Organization and filter the recommendations by AWS Accounts, AWS resource (EC2 instances, EBS volumes, Auto Scaling groups or Lambda functions), and AWS regions.
If you have just installed the CloudWatch agent on your instances it may take a couple of days for AWS Compute Optimizer to start providing updated recommendations. You may not see the memory data during the first checks.
During the steps below we will review some AWS Computer Optimizer examples and how the recommendations are affected by having an additional data point from the EC2 instance memory utilization.
Memory utilization is consistent at 90% and downsizing to a cheaper t3.large will keep our memory at the same size (8 GiB). In other words, we can get the same memory performance while reducing overall cost.
A case could be made that this instance is under-provisioned and upsizing to an instance with more memory is a better solution. For this scenario, AWS Compute Optimizer views scaling down CPU and keeping the same memory the best decision for cost and performance. Having memory utilization enabled provides an additional data point for customers before making a final decision.
Notice there can be multiple options for rightsizing (t3.xlarge, c5.xlarge, m5.xlarge). All options are recommending we move from 2 vCPUs to 4 vCPU’s. The first option will typically be the cheapest. There are multiple columns that allow you to compare and contrast the right choice for upsizing your instance, including price, performance risk, CPU, memory, storage, and network.
On the example above you might have noticed that memory utilization is not currently enabled on this instance, therefore AWS Compute Optimizer will not report memory utilization. This could be an important datapoint when making a decision to which instance to upsize. For example, if memory is not an issue option 2 may be a better choice than option 3 from a cost perspective. AWS Compute Optimizer will not recommend instances with lower memory if memory monitoring is not available.
AWS Compute Optimizer will now take memory utilization into account. We can see that memory utilization is low and 8 GiB is sufficient. Choosing option 2 (c5.xlarge) will give us additional CPU power and keep our performance risk low by not having to switch to a burstable instance (t3.xlarge). Depending on your goals option 1 may be ideal for cost savings while option 2 would be ideal for overall performance and stability.
Using AWS Compute Optimizer to get recommendations for rightsizing EC2 instances is a free and recommended routine. In this lab we explored recommendations for both an under-provisioned and over-provisioned EC2 instance and why having memory utilization enabled makes the recommendations more precise and gives a more holistic view of the EC2 instance performance. The knowledge gained from this lab should help you make rightsizing decisions to decrease cost and improve performance.
Visit the Level 300 Optimization Data Collection Lab for opportunities to automate the collection of Compute Optimizer to identify resources that are underutilized for multiple lookback periods
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool