Question: How do I diagnose high CPU utilization on my EC2 Windows instance when my CPU is not being throttled?

My Amazon Elastic Compute Cloud (Amazon EC2) Windows instance is experiencing high CPU utilization, but my instance's CPU is not being throttled. How can I diagnose the high CPU utilization?Short descriptionYou can use Task Manager from your instance to see the processes that are using the most CPU. If necessary, you can use Performance Monitor or Process Explorer to discover the processes that are causing high CPU utilization.After you determine the specific process causing high CPU utilization, you can troubleshoot that application.

ResolutionUse Task Manager to identify the source of high CPU utilizationConnect to your instance using Remote Desktop Protocol (RDP).Open Task Manager, and then select the CPU column to sort by CPU.Research any processes with high CPU utilization to determine whether they are using the expected amount of CPU.Troubleshoot any applications that are using more CPU than expected.If all applications are using the expected amount of CPU, consider changing instance types. For more information, see How do I get more CPU and memory for my EC2 Windows instance?Use Process Explorer to identify the source of high CPU utilizationProcess Explorer is a SysInternals utility provided by Microsoft. To use Process Explorer, follow these steps:Download Process Explorer to your instance.Launch the application as an administrator.Select the CPU column to sort processes by usage.Choose View, Show Process Tree to view the parent-child relationship between processes.Use Performance Monitor to identify the source of high CPU utilizationIf you still can't determine the cause of the high CPU utilization, use Performance Monitor and the Performance Analysis of Logs (PAL) tool (optional). Performance Monitor is a built-in Windows tool.To use Performance Monitor, follow these steps:Connect to your instance using RDP.Open Performance Monitor, and then expand Data Collector Sets.Open the context (right-click) menu for User Defined, and then choose New, Data Collector Set.For Name, enter a name for the new data collector set.Choose Create manually (Advanced).Choose Next.For Create data logs, select Performance Counter, and then choose Next.Choose Add.For Available counters, choose Process, % Processor Time.For Instances of selected object, choose All instances.Choose Add.Repeat this step for any other performance counters that you want to add.Choose Ok.(Optional) Set Sample interval and Units to your preferred values.Choose Next.Choose a location with at least 1 GiB of free space to store the data, and then choose Next.Choose Save and close, and then choose Finish.Note: If the CPU is spiking, choose Start this data collector set now, and then choose Finish.After the performance monitor tool completes the data collection, you can open and review the report to determine which processes are using the instance CPU. Then, use that information to troubleshoot the specific application that's using the CPU.(Optional) Use Performance Analysis of Logs (PAL) to generate a report for analysisNote: These optional steps include the use of open source software hosted on GitHub.PAL is a third-party tool that you can use to generate a report from your Performance Monitor file for a more in-depth analysis. To use PAL, follow these steps:Install PAL, launch the PAL Wizard, and then choose Next.For Performance Counter Log, enter the path to your Performance Monitor file, and then choose Next.For Title, choose System Overview, and then choose Next.Note: System Overview provides a general operating system performance analysis.Review and answer the questions for each entry in the Questions section. For OS, choose the latest Operating System version available from the list with a bit version that matches your instance. Choose Next.Select Process all of the counters in the counter log, and then choose Next.Note: Processing all counter instances can be resource intensive.For Output Folder, select an output directory for your PAL Report.For HTML Report, select HTML Report, and then choose Next.Choose Next, and then choose Finish.Review the Process and Processor sections of the PAL Report to determine which processes are using the instance's CPU.

Related informationHow can I find out if the CPU on my T2 or T3 EC2 Windows instance is being throttled?