Troubleshoot Microsoft Defender Antivirus performance issues with Process Monitor
Tip
First, review common reasons for performance issues, such as high CPU usage. See Troubleshoot performance issues related to Microsoft Defender Antivirus real-time protection (rtp) or scans (scheduled or on-demand. Then, run the **Microsoft Defender Antivirus Performance Analyzer**This tool will help identify the cause of high CPU usage in Microsoft Defender Antivirus, whether it's the Antimalware Service Executable, the Microsoft Defender Antivirus service, or MsMpEng.exe. If the Microsoft Defender Antivirus Performance Analyzer doesn't identify the root cause of the high CPU utilization, proceed with running Processor Monitor. The final tool in your toolkit to run is Windows Performance Recorder UI (WPRUI) or Windows Performance Recorded (WPR command-line).
Capture process logs using Process Monitor
Process Monitor (ProcMon) is an advanced monitoring tool that provides real-time data on processes. It can be used to capture performance issues, such as high CPU usage, and to monitor application compatibility scenarios as they occur.
There are two ways to capture a Process Monitor (ProcMon) trace:
Using the MDE Client Analyzer
Manually
Using the MDE Client Analyzer
Download the MDE Client Analyzer.
Run the MDE Client Analyzer using Live Response or locally.
Tip
Before starting the trace, please make sure that the issue is reproducible. Additionally, close any applications that do not contribute to the reproduction of the issue.
Run the MDE Client Analyzer with the -c and -v switches
C:\Work\tools\MDEClientAnalyzer\MDEClientAnalyzer.cmd -c -v
Manually
Download Process Monitor v3.89 to a folder like
C:\temp
.To remove the file's mark of the web:
Right-click ProcessMonitor.zip and select Properties.
Under the General tab, look for Security.
Check the box beside Unblock.
Select Apply.
Unzip the file in
C:\temp
so that the folder path isC:\temp\ProcessMonitor
.Copy ProcMon.exe to the Windows client or Windows server you're troubleshooting.
Tip
Before running ProcMon, make sure all other applications not related to the high CPU usage issue are closed. Taking this step helps to minimize the number of processes to check.
You can launch ProcMon in two ways.
- Right-click ProcMon.exe and select Run as administrator.
Since logging starts automatically, stop the capture by selecting the magnifying glass icon or pressing Ctrl+E.
To confirm the capture has stopped, look for a red X on the magnifying glass icon.
Run the command line as admin, then from the Process Monitor path, run:
Tip
Make the ProcMon window as small as possible when capturing data so you can easily start and stop the trace.
After completing step 6, set filters by selecting OK. You can filter the results after the capture is complete.
To start the capture, select the magnifying glass icon again.
Reproduce the problem.
Tip
Wait for the problem to be reproduced, then note the timestamp when the trace begins.
After capturing two to four minutes of process activity during high CPU usage, stop the capture by clicking the magnifying glass icon.
To save the capture with a unique name in the
.pml
format, go to File then click Save.... Ensure you select the radio buttons All events and Native Process Monitor Format (PML).For better tracking, change the default path from
C:\temp\ProcessMonitor\LogFile.PML
toC:\temp\ProcessMonitor\%ComputerName%_LogFile_MMDDYEAR_Repro_of_issue.PML
where:
%ComputerName%
is the device nameMMDDYEAR
is the month, day, and yearRepro_of_issue
is the name of the issue you're trying to reproduce
Tip
If you have a working system, you might want to get a sample log to compare.
- Zip the
.pml
file and submit it to Microsoft Support.