Jump to content

How many threads can CoH use now?


Bill Z Bubba

Recommended Posts

On ‎1‎/‎11‎/‎2020 at 7:02 PM, Bill Z Bubba said:

Checked my taskmanager after logging off from the MSR on Beta and noticed that all 4 threads appeared to be in decent usage. Did something change in the game client to let it utilize more than two threads? Or was my rig just offloading more to the other two threads I've got?

Did you check the app list to see if it had that many processes? Unless they've made a change, I'm not sure it uses more than 2 threads, but I haven't looked it up in ages. I can see the 64bit version code being able to do so though.

OG Server: Pinnacle  <||>  Current Primary Server: Torchbearer  ||  Also found on the others if desired


Installing CoX:  Windows  ||  MacOS  ||  MacOS for M1  <||>  Migrating Data from an Older Installation


Clubs: Mid's Hero Designer  ||  PC Builders  ||  HC Wiki  ||  Jerk Hackers


Old Forums  <||>  Titan Network  <||>  Heroica! (by @Shenanigunner)

 

Link to comment
Share on other sites

12 minutes ago, WanderingAries said:

I can see the 64bit version code being able to do so though.

 

That's what I was hoping and no, I didn't dig deep.

 

Gonna have to do some diggin to find out what's what. Added Threads to the TaskManager Details tab and it shows CoH is using 16 compared to say, explorer.exe that's at 61 threads, so that tells me nothing as to whether it's still locked to 2 cpu, be they cores or hyperthreaded's fake cores. (But I'm on an i5, so no hyperthreading anyway.)

Link to comment
Share on other sites

  • City Council

There are 3 threads that can use significant amount of CPU.

 

1. Main thread - all game logic, input, processing, etc.

2. Render thread - all draw calls and anything that touches the OpenGL driver, driven by thread #1

3. PhysX thread - simulation of visual effects that interact with the environment (sparks, etc), debris, etc

 

1 and 2 are relatively unchanged from retail.

 

3 used to be frame-locked to 1 -- it would do some background processing but ultimately if PhysX took too long to run a simulation timestep, the main thread would wait for it to finish, delaying the drawing of the frame (meaning thread #2 would also be idle).

 

In the modern 32-bit and 64-bit clients (not the safe mode client), #3 is now fully decoupled and runs independently. If PhsyX starts to lag, it just won't be updated that frame and will make up the difference on the next one. If it gets too far behind, it will start removing PhysX objects in order to catch up. Under very effects-heavy situations with lots of particles flying around, that can lead to more efficient utilization of those first two cores.

 

There are a few other minor threads, such as the background texture loading thread, geo loading thread, and some created by OS libraries for things like asynchronous networking, but those are relatively low-load and only serve to reduce latency.

  • Like 2
  • Thanks 8
Link to comment
Share on other sites

Thanks much, @Number Six

 

Followup question though: are all these threads still locked to only utilize 2 processors or will they be spread out amongst all available physical processors (or logical?)

 

Or am I simply misremembering and threads were never locked to just 2 procs and it only seemed that way because the vast majority of the work was being done in the Main and Render threads?

Edited by Bill Z Bubba
Link to comment
Share on other sites

  • City Council

They were never locked to 2 processors. There were only 2 threads that did any significant work (since physx and the main thread were so tightly bound), so they could only effectively use two. In practice, the render thread and physx thread could never do any work at the same time.

 

Even now fully using all 3 only happens under certain circumstances. At some point in the future it would be nice to identify things that can be parallelized, but there's a lot of work still to get there and be able to to do it safely.

  • Like 1
  • Thanks 3
Link to comment
Share on other sites

2 minutes ago, Shred Monkey said:

Wow.... I feel smarter after reading this post.

There+fixed+it+for+ya+_e9b70141424ca4f4009bb284f899cde1.png

  • Like 1
  • Haha 2

@Rathstar

Energy/Energy Blaster (50+3) on Everlasting

Energy/Temporal Blaster (50+3) on Excelsior

Energy/Willpower Sentinel (50+3) on Indomitable

Energy/Energy Sentinel (50+1) on Torchbearer

Link to comment
Share on other sites

10 hours ago, Number Six said:

They were never locked to 2 processors. There were only 2 threads that did any significant work (since physx and the main thread were so tightly bound), so they could only effectively use two. In practice, the render thread and physx thread could never do any work at the same time.

 

Even now fully using all 3 only happens under certain circumstances. At some point in the future it would be nice to identify things that can be parallelized, but there's a lot of work still to get there and be able to to do it safely.

I think they were referencing the "big deal" back when the OG devs talked about going beyond a single core. There was a time that multi-core or even hyper threading wasn't yet beneficial according to what I can remember.

OG Server: Pinnacle  <||>  Current Primary Server: Torchbearer  ||  Also found on the others if desired


Installing CoX:  Windows  ||  MacOS  ||  MacOS for M1  <||>  Migrating Data from an Older Installation


Clubs: Mid's Hero Designer  ||  PC Builders  ||  HC Wiki  ||  Jerk Hackers


Old Forums  <||>  Titan Network  <||>  Heroica! (by @Shenanigunner)

 

Link to comment
Share on other sites

12 hours ago, WanderingAries said:

I think they were referencing the "big deal" back when the OG devs talked about going beyond a single core. There was a time that multi-core or even hyper threading wasn't yet beneficial according to what I can remember.

 

Yep.  Back in the early 2000s when City of Heroes was first developed (along with Mozilla Firefox), multiple cores were generally not a thing.  It was assumed by the vast, vast majority of software developers that desktop and notebook computers would be forever bound to one or two cores and that the speed of those cores would forever increase.  Well, the exact opposite happened.  From the late aughts until a year or so ago, Mozilla Firefox has seemed so slow in comparision to Google Chrome and Apple Safari because it only utilized one processor core.  Mozilla has spent the past few years slowly re-writing Firefox from the ground up to utilize all those processor cores.

Link to comment
Share on other sites

8 hours ago, Apparition said:

 

Yep.  Back in the early 2000s when City of Heroes was first developed (along with Mozilla Firefox), multiple cores were generally not a thing.  It was assumed by the vast, vast majority of software developers that desktop and notebook computers would be forever bound to one or two cores and that the speed of those cores would forever increase.  Well, the exact opposite happened.  From the late aughts until a year or so ago, Mozilla Firefox has seemed so slow in comparision to Google Chrome and Apple Safari because it only utilized one processor core.  Mozilla has spent the past few years slowly re-writing Firefox from the ground up to utilize all those processor cores.

So That's why the "We're better than IE because we're faster" turned into the mushy snail?

OG Server: Pinnacle  <||>  Current Primary Server: Torchbearer  ||  Also found on the others if desired


Installing CoX:  Windows  ||  MacOS  ||  MacOS for M1  <||>  Migrating Data from an Older Installation


Clubs: Mid's Hero Designer  ||  PC Builders  ||  HC Wiki  ||  Jerk Hackers


Old Forums  <||>  Titan Network  <||>  Heroica! (by @Shenanigunner)

 

Link to comment
Share on other sites

  • 4 weeks later
  • 1 year later

Heh, I remember this thread...and just One comment shy of 2k. :O

OG Server: Pinnacle  <||>  Current Primary Server: Torchbearer  ||  Also found on the others if desired


Installing CoX:  Windows  ||  MacOS  ||  MacOS for M1  <||>  Migrating Data from an Older Installation


Clubs: Mid's Hero Designer  ||  PC Builders  ||  HC Wiki  ||  Jerk Hackers


Old Forums  <||>  Titan Network  <||>  Heroica! (by @Shenanigunner)

 

Link to comment
Share on other sites

16 hours ago, cjshox said:

Just checked the affinity, cityofheroes.exe 64bit is using all cores 

 

My numbers are coming from windows resource monitor software, but in different location, had 22 threads 10 cpu and avg 10.07 etc but then had destiny 2 use 20+ cpu, not sure now how resource monitor software actually works 😕

Link to comment
Share on other sites

This thread invoked my curiosity so I checked my own rig and sure enough I was using all my cores to run the game.... BUT each core had a different level of utilization. Nearly all of my cores (6 cores, 12 threads) were below 20% utilization, while the second core was running around 60% all the way up to 90% usage over my play time. 

Pocket D Zone Tour

Best Post Ever.... 568068478_BestContentEverSignature.png.4ac4138c1127616ebdcddfe1e9d55b57.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...