Question regarding Threads and Core usage

sb.0326

Junior Member
Jul 27, 2011
19
0
0
My understanding was that Windows assigned threads to cores and tried to load level or optimize core usage. So why is it that when I'm running GW2(I'm sure this applies to other games as well) that only 3-4 of my 8350's cores are ever really used? GW2 has 57 threads while in game according to resource monitor.

Are certain threads dependent upon on another and hence cannot be split between multiple cores? I had thought(perhaps just ignorance on my behalf) that each thread was "independent" of one another.. Is this not the case? And if not, why even make the distinction between different threads?
 

ShintaiDK

Lifer
Apr 22, 2012
20,378
145
106
Open the process explorer instead. It will tell you more about the threads. Almost all will have a state of waiting for user request or wrqueue. For me for example, 10 threads alone are used to talking to the nvidia driver. Another thread for debug. And 9 threads more are simply talking to a webserver.

Threads can be spawned for many reasons. Performance as you got in mind is just not one of them with the wast majority of threads in GW2. Some might be related to the login, others to session change and so on. Its abit like why you boot windows and there aint just "system".

You can split the threads out over all cores. But it doesnt make sense to split 8 threads on 8 cores if they all only use 1%. Then its better to use 8% on 1 core and gate the rest. Windows automaticly manages this.
 
Last edited:

BrightCandle

Diamond Member
Mar 15, 2007
4,762
0
76
Multithreading really isn't that simple. Threads can be assigned for a variety of reasons, some of it for parallel execution and some of it for concurrency. Knowing there are 57 threads tells you very little about expected CPU usage.

Its extremely difficult to make a complex program effectively use even small numbers of cores fully right now. There is nothing wrong, its just the way the game is written.
 

sefsefsefsef

Senior member
Jun 21, 2007
218
1
71
The OS has a list of "ready threads," any of which may be run as soon as processing resources are available. If any of those 57 threads aren't in the "ready queue," for whatever reason, then they aren't going to get executed. Threads will stay off the ready queue for reasons like they're waiting for I/O, waiting on a lock, waiting for a signal from another thread. In the case of GW2, it looks like there are probably only 3-4 threads that do all the heavy lifting, and they spend most of their time either in the ready queue, or actually executing.