Why is my EC2 Windows instance performance slow?

4 minute read
0

I want to determine what’s affecting my Amazon Elastic Compute Cloud (Amazon EC2) Window instance’s performance.

Short description

The following are factors that affect the overall performance of EC2 instances:

  • High CPU
  • Increased memory utilization
  • Amazon Elastic Block Store (Amazon EBS) volume I/O
  • Outdated AWS drivers
  • Unexpected network in and out
  • Depleted burst credits

Resolution

Determine the EC2 instance type

Identify your EC2 instance type to determine if your instance performance is being throttled because of an underperforming instance type.

If your T2 or T3 instance shows high CPU utilization, then set the burstable performance to unlimited. After setting the burstable performance to unlimited, the instance sustains high CPU utilization for any required period of time.

Monitor CPU and memory utilization

You can monitor CPU and memory utilization using Windows Task Manager or Resource Monitor. Use this information to determine what processes are using higher than expected CPU or memory. For more information, see How do I diagnose high CPU utilization on my EC2 Windows instance when my CPU is not being throttled. You can also use Windows Performance Monitor to capture this data.

Review EBS metrics

You can review EBS metrics using Amazon CloudWatch. Find the Burst Balance metric or IOPS CloudWatch metrics to verify that you have I/O bust credits available on the volume. Also, confirm that the volume isn't going above baseline performance.

When you have multiple applications on an EC2 instance, those applications compete for the root EBS volume's IOPS. As your workload grows, the IOPS demand increases. To improve performance on your instance, consider using additional non-root EBS volumes for your applications. Also, consider using the root volume for the operating system only.

Update AWS drivers

Older AWS drivers might cause performance problems on your EC2 instance. Run the following command in an administrator PowerShell to determine the currently installed AWS drivers on your instance:

dism /online /get-drivers /format:table | findstr Amazon

Identify if you have ena.inf, awsnvme.inf, or xenvbd.inf drivers installed on your EC2 instance. Update the AWS drivers to the latest version and monitor EC2 performance.

Determine if your EC2 instance requires AWS NVMe and ENA drivers based on instance type. If AWS NVMe or ENA drivers are required, download the latest drivers and install them on your EC2 instance.

It's a best practice to upgrade AWS PV drivers on your Windows Server EC2 instance for all supported instance types, including T2 instances. 

If you notice high CPU, memory, or network usage, or if you have intermittent connectivity problems, update the AWS drivers on your instance.

Use the following Windows built-in tools or sysinternals tools to identify performance bottlenecks:

  • Task Manager
  • Resource Monitor
  • Performance Monitor
  • RAMMAP

Monitor network in and network out metrics

Use CloudWatch metrics to calculate network in and network out for your EC2 instance. Network in is the number of bytes received by the instance on all network interfaces. This metric identifies the volume of incoming network traffic to a single instance. The Network out metric is the number of bytes sent out by the instance on all network interfaces. This metric identifies the volume of outgoing network traffic from a single instance. These metrics help diagnose network bottlenecks on your EC2 instance.

Activate enhanced networking to achieve higher bandwidth, higher packet-per-second performance, and consistently lower latency. To activate enhanced networking, do the following:

  1. For supported instance types, determine the enhanced networking mechanism that's available for your instance type.
  2. Use the ENA or the Intel 82599 VF interface to activate enhanced networking on your EC2 instance.

Related information

How can I resolve high CPU utilization on my T2 or T3 EC2 Windows instance if my CPU is being throttled?

AWS OFFICIAL
AWS OFFICIALUpdated 10 months ago