Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows real CPU affinity #2

Open
BWBama85 opened this issue Apr 21, 2022 · 1 comment
Open

Windows real CPU affinity #2

BWBama85 opened this issue Apr 21, 2022 · 1 comment

Comments

@BWBama85
Copy link

Hi,

On windows, what cores are the actual CPU cores and not the hyperthreaded cores? Is it every other core starting with core 1?

@phempshall
Copy link
Owner

Hi,

It is my understanding that the physical/virtual cores are interleaved on Windows, so your theory of every other core should be correct. Please note that this tool applies a +1 to the labels for usability - they actually start on zero like an array (CPU 1 is actually CPU 0). So a 4 core hyperthreaded processor would be [0,1] [2,3] [4,5] [6,7] with the odd numbers being the hyperthreads.

However from the Microsoft Dev Blog:

"When you turn on hyperthreading, each individual physical processor acts as if it were two virtual processors. From Task Manager’s point of view, the computer has four virtual processors. The two virtual processors associated with each physical processor are completely equivalent. It’s not like one is physical and one is virtual. They are both virtual and compete equally for a share of the one physical CPU. When you set processor affinities, you set them to virtual processors." [1]

[1] https://devblogs.microsoft.com/oldnewthing/20051216-10/?p=32943

Additional reading:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants