I want to learn how to troubleshoot and resolve slow performance issues on my Amazon EC2 Windows instances by monitoring CPU, memory, EBS volume I/O, and network metrics.
Short description
The following reasons can affect the performance of Amazon Elastic Compute Cloud (Amazon EC2) Window's instances:
- High CPU
- High memory
- Amazon Elastic Block Store (Amazon EBS) volume I/O
- Outdated AWS drivers
- Network bandwidth issues
- Depleted burst credits
Resolution
Use an Automation runbook to troubleshoot performance issues
To determine a high CPU or memory performance issue with a Windows instance, use the AWSSupport-TroubleshootWindowsPerformance AWS Systems Manager Automation runbook. It's a best practice to run the runbook when you're experiencing the performance issue.
Before you start the runbook, make sure that your AWS Identity and Access Management (IAM) user or role has the required permissions. To upload captured logs to Amazon Simple Storage Service (Amazon S3), make sure that your instance profile has the required permissions. For more information, see the Required IAM permissions section in AWSSupport-TroubleshootWindowsPerformance.
To configure the runbook, see the Instructions section in AWSSupport-TroubleshootWindowsPerformance.
Note: The runbook doesn't analyze the process dump and logs that EC2Rescure captures. If you must review the logs, then you can manually review them.
The output of the runbook provides a summary of performance metrics. Based on the performance metrics, you can identify the processes that use the most resources. For additional troubleshooting, complete the actions in the following sections.
Determine whether your instance type is underperforming
To determine whether your instance performance is throttled because of an underperforming instance type, identify your EC2 instance type.
If your T2 or T3 instance shows high CPU utilization, then set the burstable performance to unlimited to sustain high CPU utilization for any required period of time.
Monitor CPU and memory utilization
To monitor what processes are using high CPU and memory utilization, use Windows Task Manager, Resource Manager, or Performance Monitor. For more information, see How do I diagnose high CPU utilization on my EC2 Windows instance when my CPU is not being throttled?
Review EBS metrics
You can use Amazon CloudWatch to review EBS metrics. Review the Burst Balance metric or IOPS CloudWatch metrics to verify that I/O bust credits are available on the volume. Also, confirm that the volume isn't exceeding baseline performance.
When you have multiple applications on an instance, the IOPS demand increases. To improve performance on your instance, use additional non-root EBS volumes for your applications. Also, use the root volume for only the operating system (OS).
Update AWS drivers
Outdated AWS drivers might cause performance issues on your instance. If you experience high CPU, memory, or network utilization, or if you have intermittent connectivity issues, then update the AWS drivers on your instance.
To determine the AWS drivers that are installed on your instance, run the following command in Windows PowerShell as an administrator:
dism /online /get-drivers /format:table | findstr Amazon
If ena.inf, awsnvme.inf, or xenvbd.inf drivers are installed on your instance, then update the drivers to the latest version.
Based on your instance type, determine whether your instance requires AWS NVMe and Elastic Network Adapter (ENA) drivers. If the instance requires AWS NVMe or ENA drivers, then download the latest drivers and install them on your instance.
It's a best practice to upgrade AWS PV drivers on your Windows instances for all supported instance types, including T2 instances.
Monitor NetworkIn and NetworkOut metrics
Calculate the NetworkIn and NetworkOut CloudWatch metrics for your instance to help diagnose instance network bandwidth issues.
To increase your network bandwidth, packet-per-second performance, and consistently lower the latency, turn on enhanced networking. First, Determine the enhanced networking mechanism that's available for your supported instance type. Then, use the ENA or Intel 82599 VF interface to turn on enhanced networking.
Related information
How can I resolve high CPU utilization on my T2 or T3 EC2 Windows instance if my CPU is being throttled?
AWS Support Automation Workflows (SAW)
Setting up Automation
Running automations