Skip to content

Does Windows Security scanning cause lag? What to check first

The Net Fix · Updated · 9 min read

The short answer

A Windows Security scan can make a game stutter, but it rarely raises ping by itself. Defender scans use the processor and the disk, not your connection, so the usual sign is a short hitch in frame rate while the scan runs. Check the scan schedule, watch Antimalware Service Executable in Task Manager during a lag spike, and test the router queue if the ping spikes at other times.

Does a Windows Security scan cause ping spikes?

Usually it causes a different symptom. Microsoft's guidance on Defender scans talks about CPU load, input and output speed, and memory pressure. It does not describe a scan as adding network delay. A scan reads files and checks them against its definitions, and your game's packets do not wait for that work in your router's queue. So a scan is not a likely direct cause of a higher ping number. That reading is ours, based on what the documentation covers, and it is not a Microsoft statement about ping.

What a scan can do is take processor time and disk reads at the moment the game needs them. The result is stutter: a few dropped frames, a hitch in the game's motion, or a short freeze. Players often call that lag, but it is a frame-rate problem, not a network one. The first job is to tell the two apart, which the fps drops versus lag guide explains in detail.

If the number in your game's ping display jumps, and the game itself runs smoothly, a scan is not the likely cause. If the picture stutters and the ping stays flat, a scan could be part of it. Both can happen together, so measure each one separately.

What scans run, and when do they start?

Microsoft Learn describes two kinds of scheduled scan. A daily scan is always a quick scan. A weekly scan can be a quick scan or a full scan. A quick scan looks at the places malware usually starts from, such as startup locations, running processes, memory and certain profile folders. A full scan starts with a quick scan and then reads every fixed disk and any removable or network drive it is set to include. Microsoft says a full scan can take hours or days, depending on how much data there is, and it generally does not recommend scheduling full scans.

Real-time protection is separate from both kinds of scheduled scan. It reviews files when they are opened and closed, and when a folder is accessed. That means a large download, an installer or a game patch is checked as it lands on the disk. Microsoft's scan best-practices page says that with real-time protection on, files are scanned before they are accessed and executed. Any lag from that check shows up while files are being written, which is a disk effect, not a change to the route your packets take.

Three defaults keep scheduled scans from running at the worst moment. First, the Set-MpPreference reference says the setting ScanOnlyIfIdleEnabled starts scheduled scans only when the computer is on but not in use, and that it is on when no value is given. Second, the CPU limit, set with ScanAvgCPULoadFactor, defaults to 50. The reference calls this guidance rather than a hard limit, and it applies to scheduled scans. Microsoft's best-practices page says manual scans ignore it. Third, Microsoft says a scheduled quick scan is skipped when a qualified quick scan ran within the last seven days. A qualified scan has to run after the last definition update, with real-time protection on, and after a reboot.

Microsoft also says the update check happens 15 minutes before a scheduled scan, and that scheduled scans follow the local time on the PC. A scan that runs at 2 a.m. on a laptop that is asleep may run when the machine wakes, or not at all, depending on the idle setting. Read your own values rather than guessing.

How do you check your Defender scan schedule?

Open Windows PowerShell and run Get-MpPreference, then pick the scan fields: ScanScheduleDay, ScanScheduleTime, ScanScheduleQuickScanTime, ScanOnlyIfIdleEnabled and ScanAvgCPULoadFactor. Microsoft's reference lists the values. ScanScheduleDay 0 means every day, 8 means never, and 1 to 7 are the days of the week. ScanScheduleTime is the clock time, and ScanScheduleQuickScanTime is a count of minutes after midnight.

On the PC used to check this guide, the same command returned ScanScheduleDay 0, ScanScheduleTime 02:00:00, ScanScheduleQuickScanTime 00:00:00, ScanOnlyIfIdleEnabled True and ScanAvgCPULoadFactor 50. Real-time protection was on. Reading those values, that PC was set for a scheduled scan every day at 2 a.m., with a daily quick scan at midnight. Your PC may be set differently, and a work PC may have its values set by an administrator, so check before you change anything.

How do you tell whether a scan caused the lag?

  1. Note when the stutter happens, from the game or the lag test. Use the Speed and lag test to record ping while you play, if you can. A clock time that repeats each day is a clue. A random pattern usually is not a scan.
  2. Compare those times with the schedule from the PowerShell command above. The schedule is when a scan starts. A manual scan can run at any time, and the scan can take longer than you expect.
  3. During a stutter, open Task Manager, go to the Processes tab, and look for Antimalware Service Executable. Its process name is MsMpEng.exe. High processor or disk use from it while the game hitches points to the scan as the source of the stutter.
  4. Check the ping separately. If the ping spikes at times when the scanner is quiet, the scan is not the cause of the ping, and the next step is the router queue, covered below.
  5. Change one thing at a time. If the scan clashes with your play time, move the scheduled scan to a time you are not gaming, using the Set-MpPreference schedule settings. Then repeat the test for a few evenings and compare the stutter and the ping.
What each symptom points to, and the first thing to check
What you seeLikely causeFirst check
Stutter at the same clock time each dayScheduled scanGet-MpPreference schedule, then Task Manager at that time
Stutter during a manual scanManual scan, which ignores the CPU limitTask Manager, then wait for the scan to finish
Ping spikes that repeat every few secondsRouter queue or Wi-Fi, not the scannerThe spikes guide and the bufferbloat test
Ping jumps during a large downloadDownload filling the router queueThe Windows Update lag article and the queue fix
Ping flat, frame rate dropsProcessor or disk load, possibly a scanTask Manager during the drop

What did we measure for this guide?

We planned a before-and-during ping test on one Windows PC: a 30-ping baseline to 1.1.1.1 with no scan, then pings while a manual quick scan ran. We could not confirm from the PC that the scan was still running for the whole ping window, so that test does not give a result we can quote. This guide therefore quotes no ping figure for a scan. The steps in this article are the way to get a clean result on your own PC.

The figures in this guide come from Microsoft's documentation and from the settings listed above, not from a measured effect of a scan on ping. Do not treat any scan as the cause of your lag until your own times line up.

When the lag is not the scan

If the ping spikes do not line up with the scanner, the likely cause is the router queue. A download or upload fills the queue, and every device on the network waits, including the game. Windows Update is the most common example, and the Windows Update lag article explains how its download can do this and how to limit it. Spikes that repeat every few seconds are a different pattern, covered by the lag spikes guide.

If the lag is in one device only, look at that device before the whole network. The internet slow on one device guide covers Wi-Fi power saving, background apps and the steps to find the one device that is causing trouble. The queue itself is set on the router, and the bufferbloat fix guide shows the settings to check and the Smart Queue steps for each router type.

Should you turn off Defender or add exclusions to play?

Not to test a game. Real-time protection is the part that checks files when they are opened and run, and Microsoft describes it as always-on protection. Turning it off to see whether a game runs better leaves the PC without that check, and a short test does not prove the scan caused anything. Test the schedule and the router queue first.

Exclusions are a separate option. Microsoft's best-practices page says exclusions should be developed carefully, to reduce scan time while keeping the risk low. It advises against excluding the user and system temp folders, because malware commonly uses them. Keep any exclusion narrow and written down. On a work PC, ask whoever manages it before you change anything.

When this advice does not apply

This guide covers Microsoft Defender on Windows. If you use another antivirus product, its scan settings and schedule are separate, and the PowerShell commands here will not read them. On a PC managed with Intune or Group Policy, the settings may be locked, and the schedule belongs to the IT team. Microsoft's scheduled-scan page also says the scheduled quick-scan skip does not apply when Defender is managed by Intune or Group Policy.

The guide also does not cover game anti-cheat tools, full-disk encryption or the sync software on a PC, which can each add their own disk load. A VPN app can add its own delay, which is covered in the VPN ping article.

Next steps for lower lag

Questions

Does Windows Security scanning cause lag in games?

It can cause stutter, because a scan uses processor time and disk reads while the game runs. Microsoft's documentation does not describe a scan as a cause of network delay, so a scan is an unlikely direct cause of a higher ping. Check whether the stutter lines up with the scan in Task Manager before you change anything.

Does Windows Defender cause ping spikes?

Not directly, as far as the documentation shows. Ping is the round trip over your network, and a scan does not sit in that path. Spikes that repeat every few seconds, or that follow a large download, point to the router queue or the Wi-Fi, so test those next.

How do I see whether a scan is running?

Open Task Manager during the stutter and look for Antimalware Service Executable (MsMpEng.exe) on the Processes tab. High processor or disk use from it at the same time as the hitch is a clue. Check the scheduled times with Get-MpPreference in Windows PowerShell.

Should I turn off real-time protection to play better?

No. Real-time protection checks files when they are opened and run, and Microsoft describes it as always-on. Turning it off to test a game leaves the PC without that check. Test the schedule and the router queue first.

When do Windows Security scheduled scans run?

They run on the schedule set in Defender, using the local time on the PC. A daily scan is a quick scan, and a weekly scan can be quick or full. A scheduled quick scan is skipped when a qualified quick scan ran in the last seven days. Read your own values with Get-MpPreference.

Is a full scan worse for lag than a quick scan?

It takes longer. Microsoft says a full scan can run for hours or days, depending on the content, so it is more likely to overlap with play. Microsoft generally does not recommend scheduling full scans. A quick scan checks the startup locations, running processes, memory and certain folders, and it is the recommended scheduled option.

Can a scan slow a download and make my ping worse?

A scan can slow how fast files are written to disk, because real-time protection checks them as they arrive. That slows the download itself. It does not change the ping directly, but a download that fills the router queue does. The Windows Update lag article covers the queue case.

References