Live data from Hacker News

Firefox engineers discover a Windows Defender bug that causes high CPU usage

bugzilla.mozilla.org

101–110 of 223 posts

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#101

Is Windows Defender even worth enabling? It eats up a lot of CPU. It doesn’t seem like much help in a default update enabled system where you are using a regular user account instead of an administrator account. In addition, anti-virus and real time scanning is itself potential surface area for an exploit (for example a few years back there was an exploit based on Norton antivirus email scanner).

I don't think you can disable it anymore in recent versions of Windows unless you install another AV software.

You can disable it. First you have to disable the tamper protection and real time protection in the GUI. Now the real time protection will come back automatically in some time, unless you do the following.

If you have a Pro version of Windows there is a group policy setting for it. [1]

If you have Home, you can achieve the same effect by manually tweaking the registry. [2]

--

[1] Computer Configuration > Administrative Templates > Windows Components > Windows Defender Antivirus > Real-time Protection

[2] HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection\"DisableRealtimeMonitoring"=dword:00000001

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#102
post #53

> a ~75% CPU usage reduction was noted when browsing YouTube in Firefox I wonder how many of the people who say "Firefox is significantly slower than chrome" are using windows... On my computer, Firefox IS slower than chrome but (with ad blockers enabled) by an insignificant amount. By still being "the last remaining mostly independent, maintained and reasonably popular browser" I'd prefer it to use over chrome even…

I just ran a test at https://browserbench.org/Speedometer2.1/ Firefox scored 89.5 ±1.7 Chromium scored 87.3 ±2.9 I guess that means Firefox did faster for those tests. I don't use Chrome or Chromium based browsers in general so I don't know how they compare in "feel". I am on Linux.

Hmmm, that seems like it's going to be super situational. It hit 160 ± 1.9 in Firefox, 236 ± 5.2 in Chrome. So results are all over the map.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#103
post #35
post #4

TL;DR: Windows Defender had a bug that made certain system calls expensive on CPU cycles when Defender's Real-time Protection feature is enabled. After discovery, Mozilla reported this issue to Microsoft. Microsoft is releasing a patch that should result in lower CPU usage when using Firefox on sites like YouTube (a ~75% CPU usage reduction was noted when browsing YouTube in Firefox with the fixed version of Defender…

Well, also Firefox is making an excessive number of calls to that slow system call compared to other browsers (Chrome, Edge).

Well, it was fast system call until MS added AV hook to it.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#104

Is Windows Defender even worth enabling? It eats up a lot of CPU. It doesn’t seem like much help in a default update enabled system where you are using a regular user account instead of an administrator account. In addition, anti-virus and real time scanning is itself potential surface area for an exploit (for example a few years back there was an exploit based on Norton antivirus email scanner).

How many threats has it detected for you? I ran it for a decade or so and it caught exactly zero, so then I decided to disable it, because it makes file system access about 5-10x slower than it can be on my NVMe drive. Not bandwidth, but I/O syscalls. So things like node_modules become a real pain.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#105

Windows Defender is a long standing bug in the Windows operating system. ;) My impression is that its invention was for the sole purpose of eradicating the idea that Windows is insecure and prone to viruses, which explains why it can be overzealous and CPU hungry. I would only enable it for family members who don't know what they are doing. For some reason, I haven't needed any form of active virus scanning in someth…

> I would only enable it for family members who don't know what they are doing.

The problem is that this also includes most people who think they know what they’re doing. We’re in the middle of a big change in how general purpose computers work and it’s basically driven by accepting that people make mistakes, trusted sites or things like their URL shorteners or social media are compromised periodically, etc. Maybe you’re really good at never visiting dodgy websites, always use an ad blocker, etc. … but have you never installed the wrong Python, NPM, etc. package by mistake?

Short term, something like Defender makes sense for most devices used for web or email. Longer term, I think we need more focus on sandboxing, hardware MFA, etc. so we aren’t using systems so brittle that everything just falls apart if you make a mistake. I don’t want the entire world to be iOS but the status quo sucked more.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#107

Earlier quoted context omitted.

Funny how that sort of thing can work out. I was involved in an industrial optimization company years ago. Microsoft came out with power-save features in their new release. The staff at a metal-recycling company we were installing at, started complaining that the furnace would stop optimizing overnight. We investigated. The controller computer would go into power-save mode, which suspended our control app. So the fur…

Isn't this more a failing of the operator: using a consumer grade OS for an industrial case?

I cringe whenever I see a BSOD or other usage of Windows on appliances in public. There are such better options available.

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#108

Earlier quoted context omitted.

> It would literally have been better if they'd never invented power save mode. Only if you considered the purpose of power-saving mode to reduce total energy usage, vs to reduce amount of power (and consequent wear & tear) an individual machine uses. However that MS would release a feature like that which automatically kicks in on upgrade without any sort of consideration of what the machine was used for - it could…

>it could be running life-support systems! i shudder at the thought that a critical piece of life-support anything would be running a windows based OS.

https://www.youtube.com/watch?v=Uh64nPT7JWk

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#109

This just reminds me of constant "things worked so fast on my Windows 95 machine back in the day with 16MB RAM". Meanwhile any piece of software could crash your PC and it did so regularly (I still keep spamming save in software because of those days) and internet was a pandoras box. I wonder how much overhead in modern OS/PC user experience comes from security/stability abstractions and tools.

I think it mostly comes from the fact that computers are so fast now people write apps without worrying too much about performance - apps have always grown to use whatever resources are available. But when you app had to run on a pentium with 16MB of memory - you actually had to work hard on performance because you had such limited resources.

And computers are so vastly different. We have these layers upon layers to deal with these differences. Back in the day it was just DOS and 386/486 then optimize the crap out of it. Even doom had their sound stuff done through a compatibility layer. Now a days you need to deal with multiple video cards and os and processors. Just easier to make a one and done solution and leverage it

Re: Firefox engineers discover a Windows Defender bug that causes high CPU usage

#110

> a ~75% CPU usage reduction was noted when browsing YouTube in Firefox I wonder how many of the people who say "Firefox is significantly slower than chrome" are using windows... On my computer, Firefox IS slower than chrome but (with ad blockers enabled) by an insignificant amount. By still being "the last remaining mostly independent, maintained and reasonably popular browser" I'd prefer it to use over chrome even…

I have definitely noticed my laptop fans spinning up whenever I do Youtube on Firefox on Windows. I just figured the GPU acceleration was broken, but this makes sense. Certainly not the first time Windows Defender has consumed extraordinary amounts of system resources for simple tasks.

On Linux I fixed issues by setting media.ffmpeg.vaapi.enabled true in about:config.

From fan noise to none on youtube/twitch - chrome never made the fans spin.

Post reply on HN