MsMpEng.exe intermittently uses a lot of CPU on Windows servers, then settles down after a few hours. Defender looks healthy and there doesn't appear to be an active scan. What should I check first?
How do I figure out what's causing Defender CPU spikes on servers?
Answers
Start with Defender's performance analyzer while the spike is happening. New-MpPerformanceRecording captures scan activity, and Get-MpPerformanceReport can help identify files, paths, processes, and extensions associated with expensive scans.
Look for a pattern before changing policy. A busy application writing temporary files or logs might be triggering real-time scans even when no scheduled scan is running. If the workload is predictable, a recording during the busy period should be more useful than one taken after CPU has settled.
Reply to this answer
Process Monitor is another useful angle. Filter for MsMpEng.exe during a spike and see which paths keep coming up. Then check what application owns or writes to those paths. File activity attributed to Defender may have been triggered by another process, so the scan is not necessarily the whole story.
Reply to this answer
Check the existing Defender policies and exclusions, especially for the server roles and applications involved. Compare them with current Microsoft and application vendor guidance rather than excluding folders just because they're busy.
Exclusions reduce protection, so keep any changes as narrow as possible and verify whether they actually improve the problem. Disabling Defender altogether would be a pretty drastic first step.
Reply to this answer
Also check whether a CPU limit is configured through your endpoint security policy. That may help with resource pressure, but check which scan types the setting applies to. A scheduled scan limit won't necessarily resolve a real-time scanning spike.
Reply to this answer
If the affected machines include older Windows Server versions, check the OS version and any monitoring or security agents running alongside Defender. An agent interaction is worth investigating, particularly if the spikes started around onboarding or another configuration change. It's a possibility to test, not a diagnosis by itself.
Reply to this answer
Add your answer
Answers are reviewed before publication.
_b48+fennelspool.3:
It can generate a lot of events on a busy server, so keep the capture focused and stop it once you have a representative sample.