If Task Manager shows Antimalware Service Executable (the process behind Microsoft Defender, also called MsMpEng) chewing up CPU while you game, it is usually Defender scanning game files as they load. That real-time scanning can cause stutter and lower FPS, especially during level loads. Here is how to reduce its impact without turning off your protection.

Why it spikes during games

Defender scans files as they are read and written. Games constantly stream large asset files from disk, so Defender inspects them on the fly, spiking CPU and adding disk contention. On fast NVMe systems this is less noticeable, but on busy or older machines it shows up as loading hitches and background CPU load that steals frames.

Fixes ranked by safety

Fix Keeps protection? Impact
Add game folders as exclusions Yes Big reduction, safe
Schedule scans off-peak Yes Stops mid-game full scans
Limit scan CPU usage Yes Caps background load
Disable real-time protection No Not recommended

Add exclusions the right way

Open Windows Security > Virus & threat protection > Manage settings > Exclusions, and add your Steam, Epic, and other game library folders. Defender then skips scanning those trusted game files, which eliminates most of the load-time stutter. Only exclude folders you trust — your legitimate game installs — never your entire system drive.

Reschedule and cap the scans

The full scan often launches at an inconvenient time. Open Task Scheduler, navigate to Microsoft > Windows > Windows Defender, and adjust the “Windows Defender Scheduled Scan” to run when you are not gaming. Advanced users can also cap Defender’s average CPU usage during scans with a PowerShell setting (Set-MpPreference -ScanAvgCPULoadFactor) so it never monopolizes cores.

Do not just disable protection

Turning off real-time protection stops the CPU spikes but leaves you exposed, and Windows re-enables it automatically anyway. Exclusions plus rescheduling achieve the same in-game smoothness while keeping you protected. If you run a third-party antivirus, Defender should already back off, so check that only one real-time scanner is active.

Balance protection and performance

The right mindset is reduction, not removal. Defender is effective and free, and the goal is to stop it from scanning trusted, frequently-read game files rather than to blind it. Narrow exclusions for your Steam, Epic, and other library folders eliminate the bulk of load-time scanning while leaving downloads, email attachments, and system folders fully protected — exactly where you want scrutiny.

Confirm it worked

After adding exclusions and rescheduling scans, open Task Manager during a game load and watch the Antimalware Service Executable line. Its CPU should stay low where it previously spiked. If you still see bursts, check that a scheduled or idle scan is not running mid-session and that you do not have a second real-time antivirus fighting Defender — running two scanners doubles the overhead and can cause more stutter than either alone.

A brief high-CPU burst right after a large game update is normal, as Defender re-scans changed files once; it should settle quickly. Persistent spikes during every play session are what the exclusions and scheduling changes are meant to solve.

FAQ

Is it safe to exclude my whole game drive?

Excluding trusted game library folders is reasonable. Avoid excluding system folders, downloads, or your whole C: drive, which would blind Defender to real threats. Keep exclusions narrow to your game installs.

Why does it spike even when idle?

Defender runs scheduled and idle-time scans. Reschedule them for off-hours, and the idle spikes will stop interrupting you. A one-time high-CPU burst after a big update is normal as it re-scans changed files.

Bottom line: Antimalware Service Executable spikes because Defender scans your game files as they load. Add your game library folders as exclusions, reschedule and CPU-cap the scans, and keep real-time protection on. You get smooth loads and steady frames without sacrificing security.

Related guides

Browse all PC Gaming Guides guides →