• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

do threads automatcally get assigned to cores before hyperthreading?

jondeker

Junior Member
If you have a hyperthreading cpu with 2 cores, 4 threads, and then run an app that generates 2 threads, how will the threads be assigned?

Since the OS sees 4 separate cpu's, is it possible that only 1 core will get both threads from the app?
 
randomly. Yes, it is possible that 1 core will get both threads, and in that case, if you're running nothing else, performance will suffer slightly (or not so slightly, depending on what it is). This is why a lot of people say to turn off HT for gaming, because Windows will assign threads randomly and if you get 2 threads on the same core you'll get lower performance.
 
It depends on the OS. Windows 7, for example, knows the difference between physical and logical cores, and will prioritize threads to physical cores. Windows XP, on the other hand... doesn't seem to know the difference.
 
As munky said, it depends. The CPU does provide the capabilities to tell if a core is physical or logical (IE hyperthreading core). It is up to the OS to decide to use that information and to schedule threads on said CPU.

How the OS decides to assign tasks is up to the OS, not the CPU. And since the OS is in charge, the assigning will vary from OS to OS.
 
A while ago WoW locked it to the first 2 threads. Which was hilarious, because $100 dual core AMD systems were outperforming 4Ghz core i7 systems. And then the Blizzard forum employees had the nerve to be all like 'Oh and there's a nice bonus too with the intel systems, TURBOBOOST!!' marketing? or something for Intel. That was weird.
 
A while ago WoW locked it to the first 2 threads.
I assume you mean first two logical processors, not threads...

In newer Win versions you can assign CPU affinities yourself to any process from task manager, and this can also be done programatically by developers. But in both cases it should really be left to the OS scheduler, they keep track of other things to optimize what is executed on which CPU.
 
But in both cases it should really be left to the OS scheduler, they keep track of other things to optimize what is executed on which CPU.
Amen. No idea why some developers think they should play with stuff like that, especially if they don't even do it right (Wow's the perfect example..) and all modern OSes handle logical cores in a sensible manner (ahm that is Win7 and modern Linux kernels, I wager Mac OS does not)

But at least in WoW you can fix it easily with the config file..
 
Isnt parallelism written into the program more related to work distributed on logical cores then the OS itself?
 
randomly. Yes, it is possible that 1 core will get both threads, and in that case, if you're running nothing else, performance will suffer slightly (or not so slightly, depending on what it is). This is why a lot of people say to turn off HT for gaming, because Windows will assign threads randomly and if you get 2 threads on the same core you'll get lower performance.

wrong!

if you manually assign threads you can still get better performance(it does save at lest for me in windows 7))



you should see how it handles 8 Physical cores its quite interesting

when each thread changes each cpu core
 
Last edited:
you should see how it handles 8 Physical cores its quite interesting

when each thread changes each cpu core

actually as you get on the higher tier platforms... and jump into intel hexcores and 12 core systems.. i heard they shut down inactive cores. :sneaky:


http://www.hardwarecanucks.com/foru...ulftown-six-core-32nm-processor-review-5.html
"for example, if you are using a single-threaded application, the PCU will down-clock or shut down the unused cores, thereby freeing up power and lowering heat output while "overclocking" that one core that is in use."

BTW i own a hexcore system and a octocore DP system.
 
Back
Top