AWS Compute Optimizer: Fine-Tune Your AWS Environment

September 2, 2024
8
min read

Introduction

Efficient resource management is a critical aspect of maintaining cost-effective and high-performing cloud infrastructure. AWS Compute Optimizer is a service that helps achieve this by providing actionable recommendations to optimize your AWS resources. In this blog, we will explore what AWS Compute Optimizer is, how it works, the metrics it uses, the recommendations it provides, and its limitations.

What Is AWS Compute Optimizer?

AWS Compute Optimizer is a service that helps you optimize your AWS resources by analyzing their configuration and usage. It provides recommendations on how to right-size your resources, aiming to reduce costs and improve performance. AWS Compute Optimizer also offers graphs that show recent usage history and projected utilization, helping you choose the best option for balancing cost and performance. This analysis helps you decide when to move or resize resources to meet your needs.

How AWS Compute Optimizer Works?

AWS Compute Optimizer utilizes a comprehensive set of metrics to generate its recommendations, these metrics include:

  • CPU Utilization: Measures the percentage of allocated CPU that is in use, helping determine whether an instance is over or under-utilized.
  • Memory Utilization: Tracks the amount of memory being used relative to what is available. For EC2 instances, accurate memory metrics require the CloudWatch Agent, making this data crucial for precise recommendations.
  • Disk I/O Operations: Analyzes the input/output operations per second (IOPS) to assess whether EBS volumes are appropriately provisioned, helping to optimize storage performance and cost.
  • Network I/O: Examines the network traffic to and from the instance, which is essential for applications with significant network demands, ensuring that instances are neither under nor over-provisioned in terms of networking capabilities.
  • Lambda Metrics (Request Count, Invocations, Duration, Errors, Throttles): Monitors various aspects of Lambda functions, including the number of requests handled, execution duration, error rates, and throttles. These metrics inform recommendations for optimal memory allocation and other configurations.
  • RDS Metrics (Database Connections, DB Load, OS Swap): Tracks key performance indicators for Amazon RDS, such as the number of database connections, database load, and OS-level swap activity, enabling Compute Optimizer to suggest appropriate scaling or configuration changes for RDS instances.

Full list of metrics can be found here.

Getting Started with AWS Compute Optimizer

To start using AWS Compute Optimizer, you first need to enable it. This can be done easily through the AWS Compute Optimizer console, which is accessible directly from the AWS Compute Optimizer homepage.

Once you opt in, you'll be redirected to the Compute Optimizer dashboard. From that point, the service begins analyzing the configuration and utilization metrics of your AWS resources immediately.

  • It can take up to 24 hours for AWS Compute Optimizer to generate findings and recommendations. Sufficient CloudWatch metric data is required for accurate optimization recommendations.
  • Some features, like enhanced infrastructure metrics, are paid. This feature extends the analysis look-back period for EC2 instances and Auto Scaling groups from 14 days to up to three months.

Once you're on the Compute Optimizer dashboard and have correctly set your AWS region, you'll see three types of recommendations displayed:

Source: AWS Compute Optimizer – Your Customized Resource Optimization Service
  • Over-provisioned – Compute Optimizer generates this status when it is possible to reduce one or more of its specifications without negatively affecting workload performance.
  • Optimized – This status shows your system configuration meets all of your workload’s performance requirements.
  • Under-provisioned – Here, the tool considers one or more aspects of your system configuration insufficient to support your workload’s demands.

To proceed, you need to click on one of these 'statuses'. To review an optimization status, click the radio button on the left. Then go to the View Details tab on the extreme right of the dashboard to view the details — like this: Below, let's take an example of an over-provisioned status:

Source: AWS Compute Optimizer – Your Customized Resource Optimization Service

By clicking on one of the eight links we can get the actionable findings:

AWS Compute Optimizer offers multiple options. By scrolling down the bottom of that page we can verify what is the impact if we decided to apply this recommendation:

What Recommendations Does AWS Compute Optimizer Provide?

Source: Viewing the AWS Compute Optimizer dashboard

AWS Compute Optimizer generates recommendations for a variety of AWS resources, including:

  • Amazon EC2 Instances: Suggestions may include resizing the instance to a smaller or larger type, switching to a different instance family, or migrating to a more cost-effective pricing plan, such as Spot Instances or Savings Plans.
  • Amazon EC2 Auto Scaling Groups: Recommendations might involve adjusting the minimum and maximum capacity settings or changing the instance types within the group to better match your workload demands.
  • Amazon Elastic Block Store (EBS) Volumes: Compute Optimizer may suggest downsizing or modifying the volume type (e.g., from Provisioned IOPS to General Purpose SSD) to reduce costs while maintaining required performance levels.
  • AWS Lambda Functions: Recommendations may involve adjusting the allocated memory size to optimize performance without incurring unnecessary costs.
  • Amazon Elastic Container Service (ECS) Services on AWS Fargate: Suggestions for optimizing the compute resources allocated to ECS services running on AWS Fargate.
  • Commercial Software Licenses: Recommendations to optimize the allocation of licenses to ensure cost-effectiveness.
  • Amazon Relational Database Service (RDS) DB Instances and Storage: Suggestions to optimize the size and performance of RDS instances and associated storage.

CloudWatch metric requirements

To generate recommendations, Compute Optimizer has different CloudWatch metric data requirements for each resource type. The CloudWatch metric data requirements for each resource type are the following:

  • Amazon EC2 instances require at least 30 hours of metric data in the past 14 days. If you enabled the enhanced infrastructure metrics feature, EC2 instances require at least 30 hours of metric data over the past 93 days. For more information, see Enhanced infrastructure metrics.
  • Auto Scaling groups require at least 30 consecutive hours of metric data.
  • Amazon EBS volumes require at least 30 consecutive hours of metric data.
  • Amazon ECS services on Fargate require at least 24 hours of metric data.
  • Lambda functions don't require CloudWatch metric data.
  • Commercial software licenses require at least 30 consecutive hours of metric data.
  • Amazon RDS DB instances and storage require at least 30 hours of metric data in the past 14 days. If you enabled the enhanced infrastructure metrics feature, RDS DB instances require at least 30 hours of metric data over the past 93 days. For more information, see Enhanced infrastructure metrics.

If your resources don’t meet these data requirements, recommendations may take longer to appear in the Compute Optimizer console. Even if enough data is available, it may take up to 24 hours for the analysis to complete and for recommendations to be visible.

What Are AWS Compute Optimizer’s Limitations?

While AWS Compute Optimizer is a powerful tool, it does have certain limitations:

  • Dependency on CloudWatch Metrics: The accuracy of recommendations, especially for memory utilization, depends on the availability and accuracy of CloudWatch metrics. If the required metrics are not enabled, the recommendations may be less accurate.
  • Time to Generate Recommendations: For new resources, it may take longer for Compute Optimizer to generate initial recommendations, depending on the availability of sufficient metric data. This delay can impact time-sensitive optimization efforts.
  • Conservative Approach: The service tends to offer conservative recommendations to avoid disruptions, which may not fully capitalize on aggressive cost-saving opportunities.

Compute Optimizer Cost

With the standard version of Compute Optimizer, you incur no additional charges beyond the costs for the AWS services you use, such as Amazon EC2 instances, Amazon ECS services on AWS Fargate, Amazon EBS volumes, AWS Lambda functions, and Amazon RDS DB instances. Additionally, you pay for Amazon CloudWatch monitoring fees. By default, Compute Optimizer analyzes 14 days of your Amazon CloudWatch metrics to generate recommendations.

For more comprehensive insights, you can enable Compute Optimizer Enhanced Infrastructure Metrics, a paid feature. This option allows Compute Optimizer to analyze up to three months of Amazon CloudWatch metrics—six times more data than the default version. This enhanced analysis captures monthly or quarterly utilization patterns for resources such as Amazon EC2 instances, Auto Scaling groups, and Amazon RDS DB instances.

The cost for Enhanced Infrastructure Metrics is $0.0003360215 per resource per hour, calculated based on the number of hours a resource runs per month. For example, a resource running 24/7 for a full 31-day month would cost approximately $0.25.

Pricing Example

To illustrate how the pricing works, let's consider the following scenario:

Example 1: Suppose you activate Enhanced Infrastructure Metrics for five EC2 instances on July 15. These instances run continuously throughout the entire month, which totals 744 hours.

Compute Optimizer would charge you for each resource based on the number of hours it ran during that period. Assuming each of the five resources ran for 31 days (744 hours), the bill for Compute Optimizer at the end of the month would be calculated as follows:

In summary, there’s no additional charge for using AWS Compute Optimizer itself. You only pay for the AWS resources necessary to run your applications and for Amazon CloudWatch monitoring fees.

AWS Compute Optimizer vs Trusted Advisor

It's easy to confuse AWS Compute Optimizer with Trusted Advisor, as both services aim to help optimize your AWS environment. However, they serve different purposes and offer distinct functionalities. Let’s explore the key differences between them.

AWS Trusted Advisor

Trusted Advisor is AWS service providing you with real-time guidance to help you follow AWS best practices. It focuses on cost optimization, security, performance, and fault tolerance. It provides you with automated checks for service limits, security settings, and recommendations on cost-saving. AWS Trusted Advisor is a broad tool. It focuses on overall account health and optimization across multiple areas, including security, performance, cost optimization, fault tolerance, and service quotas. Whereas AWS Compute Optimizer is more specific. It only manages compute resource optimization.

AWS Compute Optimizer

AWS Compute Optimizer is a tool that’s designed to automatically analyze the configuration and usage patterns of AWS services to recommend optimal compute resources. It gives you recommendations for EC2 instances, EBS volumes, Lambda functions and more based on usage. With those recommendations, you can see potential cost savings and performance improvements by resizing or changing resource types. AWS Compute Optimizer is best for technical teams focused on efficient resource utilization and performance tuning. It provides you with niche recommendations. But Trusted Advisor benefits administrators and finance teams looking for a holistic view of their AWS environments, as it looks at your account as a whole.

Cloudchipr as an Alternative to Compute Optimizer

Cloudchipr offers a seamless and powerful alternative to AWS Compute Optimizer. By simply connecting Cloudchipr to your cloud account, you can easily monitor your resources and receive actionable recommendations to optimize your cloud environment, all within one platform.

In the example images below, you can see recommendations for optimizing your EC2 instances with Rightsizing and Off-Hours scheduling. They show how much you could save by stopping instances at certain times, which is especially useful for non-critical environments. You’ll also see the potential savings through rightsizing:

You can sign up for Cloudchipr and enjoy a 14-day free trial to explore all our features.

Conclusion

AWS Compute Optimizer is a valuable tool for optimizing your AWS resources, offering detailed recommendations based on usage patterns. While it is effective in its niche, it has some limitations, including reliance on CloudWatch metrics and a focus on compute resources alone. For those looking for a broader approach to cloud optimization, Cloudchipr offers additional flexibility and comprehensive monitoring capabilities, making it easier to manage and optimize your cloud environment efficiently.

Share this article:
Subscribe to our newsletter to get our latest updates!
Thank you!
Your submission has been received!
Oops! Something went wrong while submitting the form.