Metrics analyzed by Amazon Compute Optimizer
After you opt in, Amazon Compute Optimizer analyzes the specifications, such as vCPUs, memory, or storage, and the CloudWatch metrics of your running resources from a period over the last 14 days. If you activate the enhanced infrastructure metrics recommendation preference, Amazon Compute Optimizer analyzes your resources for up to 93 days.
The analysis can take up to 24 hours to complete. When the analysis is complete, the findings are displayed on the dashboard page of the Compute Optimizer console. For more information, see Viewing the Amazon Compute Optimizer dashboard.
Note
-
To generate recommendations for Amazon EC2 instances, Auto Scaling groups, Amazon EBS volumes, Lambda functions, and commercial software licenses, Compute Optimizer uses the maximum utilization point within each five-minute time interval over the lookback period. For ECS services on Fargate recommendations, Compute Optimizer uses the maximum utilization point within each one-minute time interval.
-
Amazon might use your utilization data to help improve the overall quality of Compute Optimizer's recommendations. To stop Amazon using your utilization data, contact Amazon Web Services Support
.
Contents
EC2 instance metrics
Metrics analyzed for EC2 instances
Compute Optimizer analyzes the following CloudWatch metrics of your EC2 instances, including instances that are part of Auto Scaling groups.
Metric | Description |
---|---|
CPUUtilization
|
The percentage of allocated EC2 compute units that are in use on the instance. This metric identifies the processing power that's required to run an application on an instance. |
MemoryUtilization
|
The percentage of memory that's used during the sample period. This metric identifies the memory that's required to run an application on an instance. Memory utilization metrics are analyzed for EC2 instances with the CloudWatch agent that's installed on them. For more information, see Enabling memory utilization with the CloudWatch agent. |
NetworkIn
|
The number of bytes that's received on all network interfaces by the instance. This metric identifies the volume of incoming network traffic to an instance. |
NetworkOut
|
The number of bytes that are sent out on all network interfaces by the instance. This metric identifies the volume of outgoing network traffic from an instance. |
NetworkPacketsIn
|
The number of packets that are received by the instance. |
NetworkPacketsOut
|
The number of packets that are sent out by the instance. |
DiskReadOps
|
The read operations per second of the instance store volume of the instance. |
DiskWriteOps
|
The write operations per second of the instance store volume of the instance. |
DiskReadBytes
|
The read bytes per second of the instance store volume of the instance. |
DiskWriteBytes
|
The write bytes per second of the instance store volume of the instance. |
VolumeReadBytes
|
The read bytes per second of EBS volumes attached to the instance. Displayed as KiBs in the console. |
VolumeWriteBytes
|
The write bytes per second of EBS volumes attached to the instance. Displayed as KiBs in the console. |
VolumeReadOps
|
The read operations per second of EBS volumes attached to the instance. |
VolumeWriteOps
|
The write operations per second of EBS volumes attached to the instance. |
For more information about instance metrics, see List the available CloudWatch metrics for your instances in the Amazon Elastic Compute Cloud User Guide. For more information about EBS volume metrics, see Amazon CloudWatch metrics for Amazon EBS in the Amazon Elastic Compute Cloud User Guide.
Enabling memory utilization with the CloudWatch agent
To have Compute Optimizer analyze the memory utilization metric of your instances, install the CloudWatch agent on your instances. Enabling Compute Optimizer to analyze memory utilization data for your instances provides an additional measurement of data that further improves Compute Optimizer's recommendations. 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
Available MBytes
metric in the CWAgent
namespace. If both
the Available MBytes
and Memory % Committed Bytes In Use
metrics
are configured in the CWAgent
namespace, Compute Optimizer chooses Available MBytes
as the primary memory metric to generate recommendations.
Note
-
We recommend that you configure the
CWAgent
namespace to useAvailable MBytes
as your memory metric for Windows instances. -
Compute Optimizer also supports the
Available KBytes
andAvailable Bytes
metrics, and prioritizes both over theMemory % Committed Bytes In Use
metric when generating recommendations for Windows instances.
Additionally, the namespace must contain the InstanceId
dimension. If the
InstanceId
dimension is missing or you overwrite it with a custom dimension
name, Compute Optimizer can't collect memory utilization data for your instance. 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.
Example: CloudWatch agent configuration for memory collection
{ "agent": { "metrics_collection_interval": 60, "run_as_user": "root" }, "metrics": { "namespace": "CWAgent", "append_dimensions": { "InstanceId": "${aws:InstanceId}" }, "metrics_collected": { "mem": { "measurement": [ "mem_used_percent" ], "metrics_collection_interval": 60 } } } }
EBS volume metrics
Compute Optimizer analyzes the following CloudWatch metrics of your EBS volumes.
Metric | Description |
---|---|
VolumeReadBytes
|
The read bytes per second of the EBS volume. |
VolumeWriteBytes
|
The write bytes per second of the EBS volume. |
VolumeReadOps
|
The read operations per second of the EBS volume. |
VolumeWriteOps
|
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 Amazon Lambda function metrics in the Amazon 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 Using Lambda Insights in CloudWatch in the Amazon Lambda Developer Guide.
Metrics for Amazon ECS services on Fargate
Compute Optimizer analyzes the following CloudWatch and Amazon ECS utilization metrics of your Amazon ECS services on Fargate.
Metric | Description |
---|---|
CPUUtilization
|
The percentage of CPU capacity that's used in the service. |
MemoryUtilization
|
The percentage of memory that's used in the service. |
For more information about these metrics, see Amazon ECS CloudWatch metrics in the Amazon ECS User Guide for Amazon Fargate.
Metrics for commercial software licenses
Compute Optimizer analyzes the following metric to generate recommendations for commercial software licenses.
mssql_enterprise_features_used
— the number of Microsoft
SQL Server Enterprise edition features in use. The features are as follows:
-
More than 128GB of memory for the buffer pool extension
-
More than 48 vCPUs
-
Always On availability groups with more than 1 database
-
Asynchronous commit replicas
-
Read-only replicas
-
Asynchronous database mirroring
-
tempdb
memory-optimized metadata is enabled -
R or Python extensions
-
Peer-to-peer replication
-
Resource Governor