Why doesn't Windows maximize core use?

yd

Ars Legatus Legionis
20,764
Subscriptor++
Just curious as per the title.

So sure, you use Excel, it isn't going to use much cpu./core power. However, surely the Virus checker embedded int Windows 10 64 bit itself 'should' be set up to use all cores and cpu power at its disposal right? Wrong.....my 5950x 16 core chip when running a Windows virus check maxes out at...7% aka in and around single core usage. Why doesn't even Windows 64 bit itself maximize usage of cpu/cores availabile?
 

Made in Hurry

Ars Praefectus
4,553
Subscriptor
I am not sure virus checking is much CPU bound though. I remember back in the old days with single-core machines that doing them full tilt made sure that you couldn't do anything but wait for it to finish, but did it peg the CPU hundred percent? My memory is failing me perhaps, but it kind of felt like doing big installs of software.
I thought disk I/O was/is more important no?
 

continuum

Ars Legatus Legionis
94,897
Moderator
So Windows itself isn't optimized to use cores....what really is?
Windows is pretty optimized but how it handles threads vs cores vs power efficiency (I.e. how threads are split on active CCX, since you have a dual-CCX processor) is complicated. Windows and AMD work pretty closely to optimize.

Wait I just noticed you said Windows Defender. I assume you’ve checked your Windows Defender settings for any CPU usage limitations?
 

fitten

Ars Legatus Legionis
52,249
Subscriptor++
I am not sure virus checking is much CPU bound though. I remember back in the old days with single-core machines that doing them full tilt made sure that you couldn't do anything but wait for it to finish, but did it peg the CPU hundred percent? My memory is failing me perhaps, but it kind of felt like doing big installs of software.
I thought disk I/O was/is more important no?

A combination of hammering the HDD IO plus using all the CPU resources it could... yeah. If it kicked in, you either had to wait it out or kill it. I think it was typically scheduled for late night scans because of that. It also depended on which AV software you were using. I know we absolutely hated McAfee because it seemed to decide to do a full scan right when you least wanted it to.
 

Lord Evermore

Ars Scholae Palatinae
1,490
Subscriptor++
Not everything can be done faster simply by giving it more CPU power. Even a video game that is doing something that isn't GPU-bound can't always use all the power of all the cores. Disk I/O delays, RAM latencies, and simple dependencies between threads, and not every process is able to be multi-threaded across more and more and more cores. And the higher the frequency, the faster each "block" gets done and the core is left with no work to do, making the percentage of CPU time look even lower (while the absolute amount of work done is the same). Not to mention code generally is simply not well-optimized and getting worse with every generation as it gets abstracted more and more and the developers get pushed more and more to get it out the door rather than do a good job with it.

Windows written in assembly by coders from 1980 could probably still fit on a single CD.
 

Paladin

Ars Legatus Legionis
32,552
Subscriptor
In the realm of antivirus type software, it is really not designed to use up the whole CPU and does not need to. A couple of cores of a fast CPU are generally enough to process the files and memory it needs to check, especially if the software has an option to be 'nice' about using too many resources.

Obviously if you can load a benchmark in windows like furmark or some video rendering thing and max out all the cores, Windows is able to use all the cores. It just depends on the application.
 

yd

Ars Legatus Legionis
20,764
Subscriptor++
Windows is pretty optimized but how it handles threads vs cores vs power efficiency (I.e. how threads are split on active CCX, since you have a dual-CCX processor) is complicated. Windows and AMD work pretty closely to optimize.

Wait I just noticed you said Windows Defender. I assume you’ve checked your Windows Defender settings for any CPU usage limitations?
Yea, don't really see any easily accessible option for controlling it - but as seems to be indicated above, you likely wouldn't be able to max it out nowadays.
 

Paladin

Ars Legatus Legionis
32,552
Subscriptor
Another thing to remember is that it may not just be doing a quick 'is this file a virus according to my local DB' style check. It may be doing things like heuristic analysis or uploading a file to a sandbox or downloading new patterns for checking things, etc. Basically, the CPU is not the issue. Everything else is and there is nothing you can do about it. It's best to just let it do its job and forget about it and enjoy that you can do anything else you want while it does its scans.
 

Lord Evermore

Ars Scholae Palatinae
1,490
Subscriptor++
First time I've ever heard someone suggest they'd like the antivirus software to use more CPU....
I think the thought behind it is "Why doesn't it use more CPU to get the work done faster so it can go back to idling or allowing other things to use the CPU?" Really, that question could apply to just about every application and process. Someone with no programming/development background, or little learning about the way these things work, might have difficulty understanding why everything can't just be getting processed as fast as the cores can go. But as many have explained, it's more than simply performing one calculation after another as fast as possible (which there are benchmarks to do, however they're not producing anything for the user other than those numbers). But, testing HAS shown that it's much more power-efficient to crank up the clock speed of a processor and let it finish a task quickly even if the per-unit of time power usage is higher, and getting a process to max out the cores for a shorter period of time would save power.