Monday, June 27th 2022

Windows Defender can Significantly Impact Intel CPU Performance, We have the Fix

Kevin Glynn, aka "Uncle Webb," our associate software author behind popular utilities such as ThrottleStop and RealTemp, developed a new utility named Counter Control, which lets you monitor and log the performance counters of Intel Core processors since 2008 (Core "Nehalem"). During development for ThrottleStop, Kevin discovered a fascinating bug with Windows Defender, the built-in security software of Windows, which causes significantly higher performance impact on the processor than it should normally have. Of course a security software is bound to have some (small) performance impact during real-time protection, but this is much bigger.

The first sign that something is happening is that HWiNFO will be reporting a reduced "Effective Clock" speed when the CPU is fully loaded. A much bigger problem is that when Defender is affected by the bug, performance of your machine will be significantly reduced. For example, a Core i9-10850K running at 5.00 GHz all-core loses 1000 Cinebench points (or 6%). Such a performance loss has been reported by owners of Intel Core 8th, 9th, 10th and 11th Gen, both desktop and mobile CPUs, on both Windows 10 and Windows 11. AMD processors are not affected.

The underlying issue that costs so much performance is that Windows Defender will randomly start using all seven hardware performance counters provided by Intel Core processors, which includes three fixed function counters. Each of these counters can be programmed in one of four modes, to configure at which privilege level it counts—Disabled, OS (ring-0), User (ring>0), and All-Ring levels. Since these counters are a shared resource, it is possible that multiple programs want to access these counters at the same time.

Popular system utilities like HWiNFO, OCCT, Core Temp, and ThrottleStop, all set these counters to "mode 3" or "All-Ring Levels." Since they all set the same mode, there's no issues with multiple programs using the same counter. Windows Defender on the other hand will set these counters to "mode 2", at what looks like random intervals, for random durations of time. This can happen when a computer first boots up or it can happen at any time after that. While Windows Defender is running in the background, it can start and stop or continuously try to change these counters to mode 2 at any time. Just to clarify, the performance loss will happen even without any monitoring software running—Defender will still use excessive CPU time.

The issue is not with the Intel hardware, as setting the same timers as Windows Defender manually has no negative performance impact. Also, if these counters are manually overwritten, Defender detects that, immediately stops whatever it is doing and performance returns to normal—without any negative effect on the ability to detect viruses in real-time.
Our Counter Control software monitors and logs the "IA32_FIXED_CTR_CTRL" register of Intel Core processors, located at MSR 0x38D. This register provides access to the three fixed-function performance monitoring counters mentioned before. Counter Control will inform users if any software is using the Intel fixed-function counters, and for how long they've been in use. Typical values reported by Counter Control look like this:
  • Not Used - 0x000: The three fixed function counters are stopped. None of the counters are presently being used.
  • Defender - 0x222: All three fixed function counters are programmed to mode 2. This is the value that Windows Defender sets these counters to when it is using them.
  • Normal - 0x330: Two counters are programmed to mode 3. One counter is programmed to mode 0 and is not being used. This is normal. Most monitoring programs that use these counters will program the counter control register to this value.
  • Warning - 0x332: This is shown when two counters are being used normally by monitoring software while the third counter has been set to mode 2, likely by Windows Defender. This is a warning that two different programs might be fighting over control of the shared counters. You might see the counter control register constantly changing between 0x222 and 0x332. This is what you will see when running HWiNFO if Windows Defender is trying to use the IA32_FIXED function counters at the same time.
If your system seems affected, showing the "Defender" readout, then a quick fix is to click the "Reset Counters" button in Counter Control. By pressing the button, one timer will be reprogrammed to mode 3, which will be detected by Defender, and Defender will stop doing its thing and restore performance. Please verify with benchmarks.
There are two ways to go about mitigating this performance loss permanently. You could disable Windows Defender Real-time Monitoring, which is highly not recommended due to the security implications; or you could use the latest version 9.5 of ThrottleStop, which has a feature in the "Options" window, called "Windows Defender Boost." Ticking this ensures maximum performance and accurate Core Effective Clock monitoring in all applications whether Windows Defender real-time protection is enabled or not. To achieve that goal, ThrottleStop activates one of the programmable timers immediately. When Windows Defender detects that some user software is trying to use one of the programmable counters, it stops using all the counters and leaves them alone for as long as that counter stays enabled. This returns performance back to normal. The "Reset" button in Counter Control does the same, and gives people a way to activate only this mechanism, without having to start ThrottleStop. Just to clarify, Windows Defender will continue to work fine. It can still detect and notify users of any viruses. When started once, with the "Windows Defender Boost" option, ThrottleStop will let the timer running in mode 3, even when closed. This means you can start ThrottleStop once at bootup, close it right afterward, and your system will be protected from the Defender performance issues.

If "Windows Defender Boost" is not checked, the counter will be initially cleared. This stops the Window Defender algorithm but ThrottleStop will no longer try to keep one counter running while using ThrottleStop and it will not keep that one counter running after you exit ThrottleStop. This allows a person to use ThrottleStop without having to worry that ThrottleStop might be doing something to Windows Defender that it should not be doing. After ThrottleStop starts up, if that timer is not being used, after 10 minutes or so, Windows Defender will check that timer, see that it is not being used, and will be able to start its mysterious performance-eating algorithm again.

Let us know your experience in the comments of this article. It'll be interesting to see how widespread this issue is, we have confirmed (thread at TPU, thread at OCN) it to be happening on many systems in recent months. If we make enough noise, I'm sure Microsoft will look into why they need that many timers in Defender, why there's such a big performance hit, and fix it accordingly.

As always, let us know your thoughts and questions in the comments. Also let us know if you didn't understand certain technical details, so we can improve this writeup.

Counter Control is available as free download in our downloads section.
Add your own comment

254 Comments on Windows Defender can Significantly Impact Intel CPU Performance, We have the Fix

#26
AusWolf
GreiverBladeif they have, i do not notice it ;) defender is at 0% Malware protection is at 0.2% which is MsMp (and also use half the RAM your screenshot show )
Defender is at 0% on my system as well, and look at the results. ;)
Posted on Reply
#27
GreiverBlade
AusWolfHow is it caused by Intel?
duh, because the issue is predominantly affecting Intel setup? (half joke)
AusWolfDefender is at 0% on my system as well, and look at the results. ;)
before or after using the tool in that news??? ;)
Posted on Reply
#28
AusWolf
GreiverBladebefore or after using the tool in that news??? ;)
Both, actually. ;)
Posted on Reply
#29
lexluthermiester
plastiscɧi have always known and said...!
now we have it in black and white. :cool:

I kiss your eyes.
fantastic job!
:lovetpu:


@lexluthermiester :D
Right? At least now we know and have a fix. Of course, this does nothing for the other problems inherent with Windows Defender..
ThrashZoneWell I'll stick with disabling windows/ microsoft pretender Oops defender with @W1zzard scripts
It's pure-d crapware anyway get a real antivirus
Same. I'll stick with the complete removal procedure I've been utilizing for nearly a decade.
Posted on Reply
#30
ThrashZone
lexluthermiesterRight? At least now we know and have a fix. Of course, this does nothing for the other problems inherent with Windows Defender..


Same. I'll stick with the complete removal procedure I've been utilizing for nearly a decade.
Hi,
Yeah 10 was bad but 11 is far worse than that.

I just started removing pretender early this year mainly because I started using it a bit more.
Posted on Reply
#31
lexluthermiester
OneMoarcue microsoft & intel patching this in 3 2 1 ...
First, this is purely a microsoft coding problem. Second, it's been happening for donkey's years. You really expect them to patch it anytime soon?
unclewebbWas this all just an honest mistake or was someone trying to make Intel CPUs look slower than they are? All CPU reviews during the last few years are suddenly suspect if they were not testing for this issue. Windows Defender can start and stop this part of its algorithm at any time. As soon as it starts, performance tanks.
Really makes one wonder about all the reviews and benchmarks we've seen over the years. This is one of the MANY reasons I remove defender from the systems I use.
OneMoarcan we not with the clickbait speculation
What?!?
OneMoarPSA:Windows defender Consistently ranks at the top of the protection and performance charts it should be your goto when basic protection is required
Seriously, you gotta hush your cakehole.
Posted on Reply
#32
AusWolf
lexluthermiesterReally make one wonder about all the reviews and benchmarks we've seen over the years. This is one of the MANY reasons I remove defender from the systems I use.

Seriously, you gotta hush your cakehole.
So what do you use instead?

Honestly, even with this issue, I still think Windows Defender is and should be the go-to antivirus app for 99% of home users.
Posted on Reply
#33
OneMoar
There is Always Moar
lexluthermiesterFirst, this is purely a microsoft coding problem. Second, it's been happening for donkey's years. You really expect expect them to patch it anytime soon?

Really make one wonder about all the reviews and benchmarks we've seen over the years. This is one of the MANY reasons I remove defender from the systems I use.

What?!?

Seriously, you gotta hush your cakehole.
go be wrong somewhere else lex

www.av-test.org/en/antivirus/home-windows/windows-10/april-2022/microsoft-defender-4.18-221213/

I have waning tolerance for idiots as I age please do your homework first defender has for years consistently been as good if not better then most solutions on the market the only recommendation I give other then defender is Avria or MBAM if the situation calls for a second option &
the amount of times I have run a scan with MBAM or AVRIA and they have found something that defender missed is ...... honestly can't tell you because I haven't seen it happen in person yet
Posted on Reply
#34
ThrashZone
Hi,
I'm sure it's by design
Just like intel now using all these crap thermal defective cores for ms back ground services also by design.
Posted on Reply
#35
AusWolf
Fun fact: after applying the fix, my CPU's idle power consumption drops from 12-15 W to 8.5 W. Now somebody tell me about Rocket Lake being inefficient! :D
Posted on Reply
#36
plastiscɧ
OneMoar6% is hardly significant in the grand scheme
would you say the same if your car is drinking 6% more. or 6% inflation is okay...?!

i have been insulted of course that in the past:


okay i am still here and this thread here is very insightful. everything must be put on the table. then things can also get better.
Posted on Reply
#37
OneMoar
There is Always Moar
its interesting because programmatically speaking there is little reason to use that register to begin with its a `old` way of doing it something that has existed since at least nethalm
and its even more interesting because seemly older chips are not affected in the same way
its like somebody took a page out of the initial intel documentation for it and never bothered to check if it worked properly on newer platforms

somebody should run a test with VT-D on vs Off and see if the behavior changes
intel's performance counters have been the subject of many an issue for awhile
there was a rash of bad actors abusing them to ddos linux machines back in like 2011ish
Posted on Reply
#38
unclewebb
ThrottleStop & RealTemp Author
OneMoarclickbait speculation
I agree. Sorry for my enthusiasm.
OneMoar6% is hardly significant in the grand scheme
I think you under estimate how many computer buying decisions are based on far less than a 1000 point difference in Cinebench scores. If two computers were sitting at more or less the same price point and one was performing that much better, no one would be buying the lower performing computer.
OneMoarremember that your average user doesn't care and if it doesn't impact the average user neither does intel/microsoft
I totally agree. That is why I do not think Microsoft will ever make any changes to Windows Defender to reduce its impact on performance.
OneMoarWindows defender Consistently ranks at the top of the protection and performance charts
I did not say that Windows Defender is a bad antivirus program. I think a lot of user negativity towards Defender is because of this flaw that was discovered. I think Windows Defender can still be a top ranked antivirus program without needing to use so many CPU cycles. If Windows Defender can randomly stop this part of its algorithm, does it really need to be running for hours at a time? Probably not. Protection still seems to work fine whether this part of Windows Defender is running or not.
OneMoarnever bothered to check if it worked properly on newer platforms
All Intel CPUs use performance monitoring counters. These counters were used in Core 2 Duo CPUs and probably quite a few Intel CPUs before that. There is no problem with these counters at the hardware level. The number of available counters for each CPU has changed over time. Newer CPU generations include more programmable counters.

Monitoring these counters is just an easy way to detect when Windows Defender has started to run some special procedure that may last for 5 minutes after first booting up or it can start at any time after that and go on for hours.

On my computer, when booting up after a blue screen, this part of the Windows Defender algorithm will not start for the first 5+ minutes. If this is important, it should start up immediately upon every boot.
Posted on Reply
#39
OneMoar
There is Always Moar
unclewebbI agree. Sorry for my enthusiasm.


I think you under estimate how many computer buying decisions are based on far less than a 1000 point difference in Cinebench scores. If two computers were sitting at more or less the same price point and one was performing that much better, no one would be buying the lower performing computer.


I totally agree. That is why I do not think Microsoft will ever make any changes to Windows Defender to reduce its impact on performance.


I did not say that Windows Defender is a bad antivirus program. I think a lot of user negativity towards Defender is because of this flaw that was discovered. I think Windows Defender can still be a top ranked antivirus program without needing to use so many CPU cycles. If Windows Defender can randomly stop this part of its algorithm, does it really need to be running for hours at a time? Probably not. Protection still seems to work fine whether this part of Windows Defender is running or not.


All Intel CPUs use performance monitoring counters. These counters were used in Core 2 Duo CPUs and probably quite a few Intel CPUs before that. There is no problem with these counters at the hardware level. The number of available counters for each CPU has changed over time. Newer CPU generations include more programmable counters.

Monitoring these counters is just an easy way to detect when Windows Defender has started to run some special procedure that may last for 5 minutes after first booting up or it can start at any time after that and go on for hours.
it should clear the registers thats on defender for not handling it correctly, but the issues with the perf MSR 0X38D go back to 2009 its always been a bit janky
but this is like a hour fix stops if somebody on the defender team notices have you filed a feedback hub report yet?

and I didn't say that you were implying defender was bad it was directed at the yahoos jumping on the 'defender sucks' bandwagon without knowing wtf they are talking about
jesus people do you not notice that every other av provider uses more cpu then defender I have seen idle cpu usage in the 30-40% range with other solutions (looking at you trendmicro,norton)

If i saw a AV product using 4% cpu at idle I would jump for joy because thats pretty dam fine compared to everybody else
Posted on Reply
#40
ThrashZone
Hi,
You're not helping your case mentioning those two shit companies :laugh:
Posted on Reply
#41
unclewebb
ThrottleStop & RealTemp Author
OneMoarhave you filed a feedback hub report yet?
Not yet. If this is an important issue I think they will find out about it soon enough.

I have used Windows Defender for years because of its low CPU usage. After this fix is applied, CPU usage is even lower.

Some of Windows Defender's competition have become extremely bloated. I have not used Trend Micro or Norton in years. I do not know how the recent versions compare to Windows Defender when it comes to CPU usage.
Posted on Reply
#42
OneMoar
There is Always Moar
unclewebbNot yet. If this is an important issue I think they will find out about it soon enough.

I have used Windows Defender for years because of its low CPU usage. After this fix is applied, CPU usage is even lower.

Some of Windows Defender's competition have become extremely bloated. I have not used Trend Micro or Norton in years. I do not know how the recent versions compare to Windows Defender when it comes to CPU usage.
trendmicro is a good 10% on a i7 9700 I just checked a client pc
Posted on Reply
#43
chrcoluk
Mine just says not used. So I guess i am ok.
Posted on Reply
#44
lexluthermiester
OneMoargo be wrong somewhere else lex
Look in a mirror. Happy sand-brushing to you.
OneMoarI have waning tolerance for idiots
Aww, that was adorable. You must not like yourself very much then. Any other treasures of wisdom you want to share, hmmmm?
AusWolfSo what do you use instead?
There are plenty of good ones that are on par with or better than defender in the detection arena without being so invasive, intrusive and annoying. Many of them use lower/fewer system resources to get the job done. Comodo is my current fav.
AusWolfI still think Windows Defender is and should be the go-to antivirus app for 99% of home users.
We could not disagree more on that.
unclewebbI did not say that Windows Defender is a bad antivirus program.
I have and will continue to do so. Windows Defender is crapware compared to much of the competition.
unclewebbI think a lot of user negativity towards Defender is because of this flaw that was discovered.
Not at all. The annoying habit of defender deleting files without user prompting/verification is a big reason. By default defender takes that action on files which contain known or suspected viral-like routines, even for files that don't actually contain a virus. This can be a serious effing headache for many forms of legitimate work. The next problem is that defender reports back to microsoft every single file it scans, regardless of whether you want it to or not. This is a serious problem for data that needs complete confidentiality/secrecy.
unclewebbNot yet. If this is an important issue I think they will find out about it soon enough.
Don't hold your breath on that one..
Posted on Reply
#45
DBH
Ohh updated my old Throttlestop and can confirm it's fixed the issue! Thanks
Posted on Reply
#46
AusWolf
lexluthermiesterThere are plenty of good ones that are on par with or better than defender in the detection arena without being so invasive, intrusive and annoying. Many of them use lower/fewer system resources to get the job done. Comodo is my current fav.
Is it free?

I'll have a look at it. I have my reservations, though, as I haven't used any other antivirus app since Defender started to come integrated in Windows.

Edit: How do you find Defender annoying? It's only a module in your system settings / Windows security centre. It couldn't be any lower profile than this.
Posted on Reply
#47
Unregistered
VulkanBrosI have a fix too...AMD CPU :roll: (couldn't resist :))
The issue is not with the Intel hardware so your comment is :sleep:

12700k, no issue here, apart from the crappy ADL CPU i guess.
Posted on Edit | Reply
#48
Jism
This article reminded me to switch off quick scan in it's completeness.

also the upping of random "samples" to MS ... I really dont need it.
Posted on Reply
#49
bug
VulkanBrosI have a fix too...AMD CPU :roll: (couldn't resist :))
Since you couldn't resist: use Linux :rockout:
Posted on Reply
#50
Veseleil

Disable the damn spyware.

Edit:
Been reading trough posts, and the fact that people still believe in AV made me kinda sad. It's 2022. damn, learn how to protect your (windows) PC already...
Sorry for million edits, Eng. is not my native.
Posted on Reply
Add your own comment
Apr 29th, 2024 12:01 EDT change timezone

New Forum Posts

Popular Reviews

Controversial News Posts