Disable Windows 8/10 CPU Thread Scheduling

PJP

n00b
Joined
Nov 28, 2012
Messages
19
Hi everybody!

How to make Windows 8/10 processor thread scheduling like Windows 7 for single thread programs? :confused:
Here's same task on both:

YoUsKU8.png


9vaQrMf.png
 
start /affinity 1 programname.exe

Would run programname.exe and set affinity to CPU core 0 (CPU0). Changing it to 3 would set affinity to CPU0 and CPU1.

The numeric parameter is a bit mask. See here for how it maps to CPU cores: https://technet.microsoft.com/en-us/library/Aa274569(v=SQL.80).aspx

edit: if you want to change a shortcut to launch a program with affinity, use something like this:

cmd.exe /c start "" /affinity n "path\to\program.exe"

changing n to be the bitmask of the core(s) to run it on.
 
Last edited:
Thanks for replies.

But there is no need to set the cpu affinity in Windows 7.
 
What exactly are you assuming is going on that you are trying to prevent? Do you have any programs or games that are running slower than they did on 7?
 
Well, I want to know what applications are single threaded, double threaded or multi threaded.
It's possible to detect it easily in Windows 7.
 
Thanks for replies.

But there is no need to set the cpu affinity in Windows 7.
If you're curious of the number of threads a process/application is using, turn on the thread column from the View menu in Task Manager.

The Windows 10 NT Kernel's process scheduler isn't going to work exactly like the one in Windows 7, so it's not really useful to expect that Windows 7 is doing it right and Windows 10 is doing it wrong.
 
No, but that is one of the changes. The NT kernel thread scheduler has changed over the years since the first in the early 1990s. Input from processor makers is also part of it, like the changes Intel suggested when HyperThreading CPUs became available in the XP era and changes AMD processor CPU modules got in Windows 8. Usage heuristics were likely used to tune the scheduler, and changing priorities based on power savings likely also had effects.

While it was probably a cool trick to see how many sequential cores were pegged to get a rough idea of heavy threads in use, that's not important enough to base a modern scheduler on. That was only a primitive artifact on Windows 7 and earlier Windows thread schedulers which worked that way.
 
  • Like
Reactions: PJP
like this
There's nothing "wrong" with what Windows 10 is doing. The Windows scheduler is deceptively simple: The lowest priority task(s) always run. What happens is the application in question is getting bumped for some other task, then when it becomes the highest priority task again, it bumps the lowest priority one, which just so happens to be on a different CPU core then the task was previously running on. This is by design; otherwise system task(s) would stall applications for an unacceptable period of time.

Unless you are running an application that is very sensitive to CPU cache effects, what Windows 10 is doing is fine and arguably superior to what 7 was doing.
 
  • Like
Reactions: PJP
like this
Back
Top