Virtual machine rightsizing

Identify AWS EC2 instances and Azure VMs that may be candidates for rightsizing to reduce costs and improve efficiency.

For VM rightsizing optimizations to be applied, your VM environment must be managed using Terraform. Each VM must have unique identifying tags.

Data sources

For AWS EC2 instances, findings are based on the following data sources::

  • AWS Trusted Advisor checks

  • CloudWatch metrics (up to 90 days where available):

    • CPU utilization

    • Network in/out

    • Memory (if CloudWatch agent is installed)

  • Instance metadata and attached volumes

For Azure VMs, findings are based on the following data sources:

  • Azure Advisor checks
  • Azure Monitor metrics:

    • CPU utilization

    • Network in/out

    • Memory (via Log Analytics workspace)

Prerequisites

Ensure the following prerequisites are in place:

  • For AWS EC2s: the optimization IAM role or IAM user for Perforce Unified Compliance has the required permissions for accessing data from Trusted Advisor and CloudWatch. An up-to-date permissions policy is provided by Perforce. See Configure an AWS account.

  • The Azure Service Principal has all required permissions. See Configure an Azure account.

If required data is unavailable or permissions are missing, no optimizations are generated for virtual machine rightsizing. Other optimizations operate as normal.

Evaluation

  • For AWS, suggestions are based on Trusted Advisor checks.

  • For Azure, suggestions are based on Azure Advisor checks.

Two Trusted Advisor checks are evaluated for AWS EC2 instances:

Low utilization Amazon EC2 instances check, which generates idle findings
Amazon EC2 cost optimization recommendations, which generate idle or rightsizing findings

If both checks identify the same instance, only one optimization is generated. The finding from the Amazon EC2 cost optimization recommendations check takes precedence.

Insights

When a virtual machine is identified as a potential candidate for rightsizing, the optimization identifies the machine and includes contextual details based on CloudWatch or Azure Monitor metrics. If you have CloudWatch Agent with memory metrics enabled, these metrics are included.

Risk levels

For AWS EC2 instances, risk levels are derived from Trusted Advisor recommendations, as follows:

  • Rightsize recommendations are designated as moderate-risk.

  • MigratetoGraviton recommendations are designated as high-risk. High-risk optimizations require manual review even when the affected resource is mapped to version control.

For Azure VMs, risk levels are derived from Azure Advisor recommendations, as follows:

  • Resize recommendations are designated as moderate-risk.

Begin optimizing your cloud VMs

Optimize your infrastructure