Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How do I raise the multi-core CPU limit?

31 Mar 2013   #11
cluberti

Windows 10 Pro x64
 
 

Quote   Quote: Originally Posted by sprewell View Post
But regarding the issue of single-threaded apps like that digits of pi benchmark, is Windows 7 really spreading the work across the four virtual cores and setting a software cap of 25%? Because that behavior still has me confused.
A CPU can only run one thread at a time, and each thread gets a quantum on the CPU (an amount of time it's allowed to run before the scheduler checks to see if it needs to be pre-empted by another thread waiting, or whether it can continue running). Logicearth is correct, there's no single-CPU cap on percentage, and you need to be very careful when looking at *total* CPU usage (like that reported by resource monitor or task manager), which shows you a percentage of total CPU time across all CPUs, versus actual CPU usage per CPU as you would see in something like perfmon.

What you saw was accurate (and yet inaccurate) in that you were using 25-30% of total CPU time, but across 4 CPUs - 100% across 4 CPUs means that when you see a 25% number, you're very likely looking at 100% on one core (100% of 1 core "averaged" out as total CPU when there are 4 CPUs shows up as, you guessed it, 25% approximately).

Windows 7 does not spread a single thread out amongst multiple CPUs - when the thread runs, it can run on one CPU only. What you saw was accurate - a single CPU thread will consume a single CPU (up to 100%) during it's quantum, but task manager and resource monitor (by default) show you the averaged CPU usage number across all the available CPU cores - 100% used on one CPU will show up as (approximately) 25% CPU usage. If you want detailed information, you need to change the options in task manager or resource monitor to show detailed CPU usage across all CPUs, or use performance monitor to view CPU usage.


My System SpecsSystem Spec
.
01 Apr 2013   #12
sprewell

Windows 7 Home Premium x64
 
 

barton, yes, I read about core parking before I started this thread and Resource Monitor helpfully tells you when a core is parked. When I run the digits of pi benchmark, it will occasionally park the fourth, barely-used virtual core.

cluberti, if you read my previous posts carefully, I was aware of most of what you wrote. If you look at the Performance tab in Task Manager or the CPU tab in Resource Monitor, both will show you not only total CPU usage, but usage by each virtual core (scroll the "Views" tab on the right in Resource Monitor down to the bottom to see all your cores). When I run the single-threaded digits of pi benchmark, it shows all the virtual cores being used but total CPU capped at 25%. If it were a hardware cap, only one core should have been used, hence my question of why Windows is capping the total CPU, while still spreading the workload across all the cores. Windows 7 could be using the time-slicing you mentioned and shuttling the single thread across the four cores, maybe to avoid over-heating?

I encourage you to try it yourself with a single-threaded CPU benchmark and look at the CPU graphs in Resource Monitor to confirm for yourself.

In my case, I downloaded the D compiler, available in a zip file here, extracted it to the desktop, and then ran this command in that folder in Powershell:

.\windows\bin\dmd.exe .\samples\d\pi.d

I ran the resulting pi.exe program with the following command:

.\pi.exe 15000

which should calculate pi out to 15,000 digits. It takes 39 seconds on my Core i5 3317U and Resource Monitor shows all four cores being used when I just ran it.

It seems to me that Microsoft is mimicking a hardware cap in the operating system, by setting an equivalent software cap in Windows 7. The alternative is that Resource Monitor is lying to me, which I doubt. If there is a software limit, I would like to set it to be higher.
My System SpecsSystem Spec
01 Apr 2013   #13
logicearth

Windows 10 Pro (x64)
 
 

Shows us a screen shot of what you are seeing.

And again. There is no CPU cap in Windows! How many times I have to tell you that.
My System SpecsSystem Spec
.

02 Apr 2013   #14
sprewell

Windows 7 Home Premium x64
 
 

Ahh, finally found the magic google keywords to get more info on this. According to this superuser.com thread,

"Q: I notice that long-running single-threaded processes are bounced around cores quite a bit, at least according to task manager. Does this mean that assigning a process to a single core will improve performance by a little bit (by avoiding context switches and cache invalidations, etc.)? If so, can I know I am not assigning to 'just a virtual core'?

A: That is normal behaviour, and no, assigning it to a single core will not improve performance. That being said, if for some reason you want to ensure a single process is only executed on a single, physical core, assign it to any single logical processor.

The reason the process "bounces around" is due to the process scheduler. This is normal behaviour, and you will most likely experience reduced performance by limiting what cores the process can execute on (regardless of how many threads it has), since the process scheduler now has to work harder to make everything work with your imposed restrictions. Yes, this penalty may be negligible in most cases, but the bottom line is unless you have a reason to do this, don't! -Breakthrough"

Another answer gives the reason for this, which I guessed above, heat:

"There's a very good reason for core hopping: Spreading the thermal workload around. Given that in many cases higher level caches (L2, L3) are shared across all cores anyway, the core hopping will not have a significant performance impact, but the thermal impact will be significant because you won't have a "hot spot" on the one core that's constantly running while the others sit idle. Now, crossing sockets in a multi socket system (particularly a NUMA system) can have a significant performance impact. Most schedulers are aware of this and take it into consideration though. - afrazier"

So it looks like I was right, Microsoft has implemented a core-balancing algorithm in Windows 7 but decided to cap single-threaded apps at 100%/(number of virtual cores), ie 100%/4 = 25% in my case, to mimic the hardware cap that would have been there in the past, presumably to disallow a single app from pegging the CPU and stopping other apps from running.

Now I just have to find out if this CPU cap in Windows 7 is a setting that the user can adjust, as I asked at the beginning.

logicearth, if Windows 7 is doing core balancing and total CPU is still being capped, the only possible explanation is that there's a software cap in Windows 7.
My System SpecsSystem Spec
02 Apr 2013   #15
logicearth

Windows 10 Pro (x64)
 
 

If you are so assured that there is a software cap in Windows then find it. Go ahead, we'll await for you to find your phantom setting.

It is impossible to help one who believes they already found their answer and will only accept a solution to that answer. In fact it is pointless.

But since you are so eager to get CPU usage to 100% do this: type "msconfig" into start menu search. Open msconfig. Go to "Boot", then to "Advance options...". Click on "Number of processors:", in the box below select 1. Hit Ok, and again. restart. Your CPU will no longer show 25% when a single core is now used fully. Have fun.
My System SpecsSystem Spec
03 Apr 2013   #16
sprewell

Windows 7 Home Premium x64
 
 

Hmm, no, I was wrong. After thinking about it some more, I now realize that core balancing still means a single-threaded app will be limited to 25%, as Windows can never run it on more than one core at any given instant. So even though each virtual core never maxes out in a single data collection time period, the fact that the single-threaded process can only ever run on a single core at a time means that total CPU available to it at all times is 25%, when you have four virtual cores, so the 25% cap is still a hardware cap, even with core balancing.

So it appears that the real problem here is Intel's hyper-threading, without which Windows 7 would see two real cores and let each process run at up to 50% of total CPU, but my stupid BIOS doesn't let me turn off hyper-threading. Guess I'll have to find a new BIOS to flash if I want to fix this.
My System SpecsSystem Spec
03 Apr 2013   #17
drpepper

Windows 7 Home Premium SP1 64bit
 
 

logicearth,

Forgive me. I just couldn't resist adding my two cents worth.

To validate your statement,
Quote:
There is no CPU cap in Windows!
Here is what I observe on my machine with the specs and configuration.

Intel i3 2330M -- hyperthreading and virtualization enabled
4 cores set in msconfig
no other changes made in Windows or via third party software
8GB RAM

There have been times when I have pushed the computer hard and observed CPU usage in excess of 70% in two or three of the core graphs with the other(s) in the 50% range. This has been short term because the processor loads have not been demanded on a full time basis by the workload. Nevertheless the loads have neither throttled down nor equal.

I believe this qualifies as an unbiased third part validation.

drpepper
My System SpecsSystem Spec
Reply

 How do I raise the multi-core CPU limit?




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Multi core CPUs
Hello, Nowadays most of the PCs have a multi-core CPU with a clock speed in GHZ. My question is about that clock speed and the cores. For example consider a CPU which has a 2 actual cores and 2 virtual cores (e.g., Intel core i3) and the computer system properties shows the 3.0 GHz as clock...
Hardware & Devices
Multi-core Re-enable
I followed someones suggestion on another forum to disable 2 of my 4 cores in order to run Fallout 3 better. But now i can reenable those other 2 core. i did it via msconfig but when i got back into it the other 2 cores arent listed. please help i want my 4 cores back.
Hardware & Devices
clear up multi core/cpu on off
Can some one please clarify for me what does it actual mean when using msconfig to turn on/off multi-core and processors. Is it the actual processor or cores that you are turning on or enabling. By default it's set to one...does it make a difference changing it any other setting (number).
General Discussion
Multi-Core, GPU -all in one Gadget monitor
Hi, Anyone found a working all in one system monitor gadget?
Gadgets
Multi-core CPU operation
Within the past two weeks or so, (I thought it was on Win7 Forum), a link to an article was posted that gave a simple understandable explanation of the operation of multi-core processors and how they handled data processing separately and together, etc. I need to pass this info on to a friend. ...
Hardware & Devices
applications designed to take advantage of multi-core
question: i have a copy of sony vegas movie studio 6, which was released late 2005. when i bought it, i believe intel was just taking the wraps off their first quad-core desktop cpu (correct me if i'm wrong). but at the time of this program's release, single core systems were still plentiful,...
Software


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 14:02.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App