Jump to content
Bill Z Bubba

How many threads can CoH use now?

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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 Server: Torchbearer  || Also found on Indomitable & Excelsior (when needed)

Getting Started  ||  Dredd's Guide to Loading City of Heroes  ||  Install and Troubleshooting Guide v2

Mids' Reborn  ||  HeroStats  ||  Vidiot Maps  ||  QoL, Mods, etc  ||  Heroica! (by @Shenanigunner)

Old Forums  ||  Titan Network  ||  The City Representative (3rd party Info site for all servers)

Share this post


Link to post
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.)

Share this post


Link to post
Share on other sites

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 1
  • Thanks 5

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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.

  • Thanks 3

Share this post


Link to post
Share on other sites

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

  • Like 1

In game on Excelsior:

Shred Monkey - Claws / Super Reflexes Stalker, Action Monkey - Dual Pistols / Devices Blaster, Sewer Monkey - Street Justice / Bio Armor Stalker, Hyperdrive Monkey - Beam Rifle / Devices Blaster, Lode Monkey - Fire Blast / Energy Manipulation Blaster (Blapper)

Share this post


Link to post
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 1

@Rathstar

Energy/Energy Blaster (50+1) on Everlasting

Energy/Temporal Blaster (50+3) on Excelsior

Energy/Willpower Sentinel (50+3) on Torchbearer

Fire/Willpower Sentinel (50+1) on Indomitable

Share this post


Link to post
Share on other sites
3 minutes ago, Rathulfr said:

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

+2 to intelligence.   You feel more able to understand and use magic items and spells.

  • Like 1

In game on Excelsior:

Shred Monkey - Claws / Super Reflexes Stalker, Action Monkey - Dual Pistols / Devices Blaster, Sewer Monkey - Street Justice / Bio Armor Stalker, Hyperdrive Monkey - Beam Rifle / Devices Blaster, Lode Monkey - Fire Blast / Energy Manipulation Blaster (Blapper)

Share this post


Link to post
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 Server: Torchbearer  || Also found on Indomitable & Excelsior (when needed)

Getting Started  ||  Dredd's Guide to Loading City of Heroes  ||  Install and Troubleshooting Guide v2

Mids' Reborn  ||  HeroStats  ||  Vidiot Maps  ||  QoL, Mods, etc  ||  Heroica! (by @Shenanigunner)

Old Forums  ||  Titan Network  ||  The City Representative (3rd party Info site for all servers)

Share this post


Link to post
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.

Share this post


Link to post
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 Server: Torchbearer  || Also found on Indomitable & Excelsior (when needed)

Getting Started  ||  Dredd's Guide to Loading City of Heroes  ||  Install and Troubleshooting Guide v2

Mids' Reborn  ||  HeroStats  ||  Vidiot Maps  ||  QoL, Mods, etc  ||  Heroica! (by @Shenanigunner)

Old Forums  ||  Titan Network  ||  The City Representative (3rd party Info site for all servers)

Share this post


Link to post
Share on other sites
9 minutes ago, WanderingAries said:

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

 

Yep.  Firefox is much, much better today.  Some parts still need to be re-written, but the majority of the work is done.

Share this post


Link to post
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...