Forum Discussion
Limit Windows Defender CPU Usage
Hey,
based on the docs article for Set-MpPreference, its not a hard limit, see text below.
https://docs.microsoft.com/en-us/powershell/module/defender/set-mppreference?view=windowsserver2019-ps&viewFallbackFrom=win10-ps
Specifies the maximum percentage CPU usage for a scan. The acceptable values for this parameter are: integers from 5 through 100, and the value 0, which disables CPU throttling. Windows Defender does not exceed the percentage of CPU usage that you specify. The default value is 50.
Note: This is not a hard limit but rather a guidance for the scanning engine to not exceed this maximum on average.
Salbert89 It really should be a hard limit though...
I have a bunch of HP computers that completely ignores it and becomes useless everytime they run a fullscan. It's not model specific, OS specific or anything else from what we can tell, its like 1 in 50 machines just does not give a ****. We can tell they have all the settings, but it just goes to 99% CPU and stays there... leaving the users to get angry and restarts the computers to be able to continue working.
I have looked all over the internet for a solution to this, and tried them all, Nothing works.
- MAlv68May 05, 2021Copper ContributorI also have the same issue. I understand that the value set in -ScanAvgCPULoadFactor is not a "hard value" but is used as an average for the duration of the scan. (-ScanAvgCPULoadFactor Specifies the maximum percentage CPU usage for a scan. The acceptable values for this parameter are: integers from 5 through 100, and the value 0, which disables CPU throttling. Windows Defender does not exceed the percentage of CPU usage that you specify. The default value is 50.
Note: This is not a hard limit but rather a guidance for the scanning engine to not exceed this maximum on average.)
However, when the process utilizes 90% and above for several minutes, I find it hard to believe that the average will fall below my customized threshold of 30%. Is there a performance log that can be checked after a scan completes?
Thanks!- AJP_UKMay 05, 2021Brass Contributor
MAlv68 I had a ticket open with Microsoft support for months about this but didn't get anywhere. The one useful comment was that a manually run scan will ignore any CPU limits like ScanAvgCPULoadFactor.
- Diego_AmorimOct 14, 2024Copper Contributor
I found a way to bypass this and finally fix the issue of high CPU utilisation on Defender for both manual and scheduled scans. I'll go through it step by step below for those who need it:
1. Open command prompt (search CMD in the search bar) and run as admin.
2. Type:
gpedit
and hit enter to open the local group policy editor. (If you have Windows Home Edition which does not have local group policy editor, follow this guide first to install it:
https://www.howtogeek.com/cannot-find-gpedit-msc-on-windows-11/
3. Go to: Computer Configuration/Administrative Templates/Windows Components/Microsoft Defender Antivirus/Scan.
4. On the right, double-click on the "Specify the maximum percentage of CPU utilization during a scan" policy.
5. Enable this policy and under Options, enter the desired CPU percentage limit.
6. Below, double-click on the "Configure local setting override for maximum percentage of CPU utilization" policy, and enable it (Not 100% sure how necessary this step is but it works for me).
7. Below that, double-click on the "Configure low CPU priority for scheduled scans" policy, and enable it.
8. Below that, double-click on the "CPU throttling type" policy and disable it (very important if you also want your manual scans throttled).
And that's that, let me know if it works for you guys, for me it worked mid scan and saw CPU usage drop from 70% to under my specified 30% value after initiating a manual full scan.