Metrics analyzed by AWS Compute Optimizer - AWS Compute Optimizer

Metrics analyzed by AWS Compute Optimizer

After you opt in, AWS Compute Optimizer begins analyzing the specifications (vCPUs, memory, storage, and so on) and the CloudWatch metrics of your running resources from a period of the last 14 days. Compute Optimizer requires at least 30 consecutive hours of metrics data from your resource to generate recommendations. After the analysis is completed, which could take up to 12 hours, Compute Optimizer presents its findings on the dashboard page. For more information, see Viewing the AWS Compute Optimizer dashboard.

EC2 instance metrics

Compute Optimizer analyzes the following CloudWatch metrics of your EC2 instances, including instances that are part of Auto Scaling groups.

Metric Description

CPU utilization

The percentage of allocated EC2 compute units that are in use on the instance. This metric identifies the processing power required to run an application on an instance.

Memory utilization

The amount of memory that has been used in some way during the sample period. This metric identifies the memory required to run an application on an instance.

Memory utilization is analyzed only for resources that have the unified CloudWatch agent installed on them. For more information, see Enabling memory utilization with the CloudWatch Agent.

Network in

The number of bytes received on all network interfaces by the instance. This metric identifies the volume of incoming network traffic to an instance.

Network out

The number of bytes sent out on all network interfaces by the instance. This metric identifies the volume of outgoing network traffic from an instance.

EBS volume read bandwidth

The read bytes per second (displayed as KiB/seconds in the console) of all EBS volumes attached to the instance.

EBS volume write bandwidth

The write bytes per second (displayed as KiB/seconds in the console) of all EBS volumes attached to the instance.

EBS volume read throughput

The read operations per second of all EBS volumes attached to the instance.

EBS volume write throughput

The write operations per second of all EBS volumes attached to the instance.

For more information about these metrics, see List the Available CloudWatch Metrics for Your Instances in the Amazon Elastic Compute Cloud User Guide.

Enabling memory utilization with the CloudWatch Agent

Install the CloudWatch agent on your instances to have Compute Optimizer analyze the memory utilization of your instances. Enabling Compute Optimizer to analyze memory utilization data for your instances provides an additional measurement of data that further improves the recommendations provided by the service. For more information about installing the CloudWatch agent, see Collecting Metrics and Logs from Amazon EC2 Instances and On-Premises Servers with the CloudWatch Agent in the Amazon CloudWatch User Guide.

On Linux instances, Compute Optimizer analyses the mem_used_percent metric in the CWAgent namespace, or the legacy MemoryUtilization metric in the System/Linux namespace. On Windows instances, Compute Optimizer analyses the Memory % Committed Bytes In Use metric in the CWAgent namespace. Additionally, the namespace must contain the InstanceId dimension. Compute Optimizer will not be able to collect memory utilization data for your instance if the InstanceId dimension is missing, or if you overwrite it with your own custom dimension name. Namespaces and dimensions are defined in the CloudWatch Agent configuration file. For more information, see Create the CloudWatch Agent Configuration File in the Amazon CloudWatch User Guide.

EBS volume metrics

Compute Optimizer analyzes the following CloudWatch metrics of your EBS volumes.

Metric Description

EBS volume read bandwidth

The read bytes per second (displayed as KiB/seconds in the console) of the EBS volume.

EBS volume write bandwidth

The write bytes per second (displayed as KiB/seconds in the console) of the EBS volume.

EBS volume read throughput

The read operations per second of the EBS volume.

EBS volume write throughput

The write operations per second of the EBS volume.

For more information about these metrics, see Amazon CloudWatch metrics for Amazon EBS in the Amazon Elastic Compute Cloud User Guide.

Lambda function metrics

Compute Optimizer analyzes the following CloudWatch metrics of your Lambda functions.

Metric Description

Invocations

The number of times your function code is executed, including successful executions and executions that result in a function error.

Duration

The amount of time that your function code spends processing an event.

Errors

The number of invocations that result in a function error. Function errors include exceptions thrown by your code and exceptions thrown by the Lambda runtime. The runtime returns errors for issues such as timeouts and configuration errors.

Throttles

The number of invocation requests that are throttled.

For more information about these metrics, see Working with AWS Lambda function metrics in the AWS Lambda Developer Guide.

In addition to these metrics, Compute Optimizer analyzes the memory utilization of your function during the look-back period. For more information about memory utilization for Lambda functions, see Understanding AWS Lambda behavior using Amazon CloudWatch Logs Insights in the AWS Management & Governance Blog and Using Lambda Insights in CloudWatch in the AWS Lambda Developer Guide.

Enabling detailed monitoring for your resources in CloudWatch

Enable detailed monitoring for your resources to allow your resources to be monitored at 1-minute increments, rather than the default 5-minute increments. Detailed monitoring provides a higher level of definition for the utilization metric data that is available to Compute Optimizer. For more information, see Enable or Disable Detailed Monitoring for Your Instances in the Amazon Elastic Compute Cloud User Guide and Configure Monitoring for Auto Scaling Instances in the Amazon EC2 Auto Scaling User Guide.

For Amazon EBS volumes, Provisioned IOPS SSD (io1 and io2) volumes automatically send 1-minute increment metrics to CloudWatch. Detailed monitoring is not available for other Amazon EBS volume types, and instead 5-minute increment metrics are sent to CloudWatch.

Additional charges might apply to enable detailed monitoring. For more information, see the Amazon CloudWatch pricing page.