Jump to content
Dante Unbound: Known Issues ×
Dante Unbound: Share Bug Reports and Feedback Here! ×

Multi core/thread issue


White_Matter

Recommended Posts

Hi, 

I know this has been discussed before but I couldn't find a recent thread so I decided to create a new one.

Could any one of you guys manage to optimize the game to utilize multi cores/threads ? When I use the OSD of MSI afterburner, I see the game mostly lean on 2 cores and not utilize the rest. I have a 6 core 12 thread processor(11600kf) and I see one core around 70% utilization, one around 30 and the rest are idling around 10%.  When I cap my fps to 165, my gpu is sitting around 60-70% and my overall cpu usage is around 30% and yet I'm getting fps dips and choppy frames. 

For some reason I couldn't take screenshots.

My specs are : 

11600kf

2060(slight oc) 

32 gb 3000mhz dd4 ram

Windows 10(latest edition) and the game is installed on samsung evo 970 plus ssd.

Link to comment
Share on other sites

On 2023-01-29 at 12:44 PM, White_Matter said:

Hi, 

I know this has been discussed before but I couldn't find a recent thread so I decided to create a new one.

Could any one of you guys manage to optimize the game to utilize multi cores/threads ?

This is equivalent to asking a master carver to "just carve a statue quickly in 5mins". It's not easy, and regardless, the task is large, and takes time. Rush and hit the stone too hard and the thing smashes and busts into pieces - which is a rather apropos description in this case for game code.

That being said, games are typically architected similarly eg, a couple of "main" threads (physics, networking, AI etc.). You'll always see a handful of busy threads that tapers off as more threads are used. These main threads spawn their own worker threads that execute tasks for their respective main thread. 

There are exceptions however, such as with the renderer. When a title has high per-core usage, they're typically using the CPU to do something for the render pipeline. What exactly is entirely up to the dev team and changes, which is no surprise that only large studios pushing AAA visuals typically get this treatment.

If the game logic allows, they may be able to vectorize their gamecode, but these are specific use cases (updating every unit vs. updating them all individually for example) and not all games push that much data around - Warframe falls into the latter.

As far as i can tell, warframe does a lot with lua scripts; which are inherently single threaded. Warframe recently made SSE a requirement so they may start doing stuff with the renderer (as i said above), which will use more threads. But all this allows them to do is make the game look prettier. If their hold up is with the scripting engine, having the renderer do work on more threads does nothing.

Link to comment
Share on other sites

16 hours ago, MillbrookWest said:

This is equivalent to asking a master carver to "just carve a statue quickly in 5mins". It's not easy, and regardless, the task is large, and takes time. Rush and hit the stone too hard and the thing smashes and busts into pieces - which is a rather apropos description in this case for game code.

That being said, games are typically architected similarly eg, a couple of "main" threads (physics, networking, AI etc.). You'll always see a handful of busy threads that tapers off as more threads are used. These main threads spawn their own worker threads that execute tasks for their respective main thread. 

There are exceptions however, such as with the renderer. When a title has high per-core usage, they're typically using the CPU to do something for the render pipeline. What exactly is entirely up to the dev team and changes, which is no surprise that only large studios pushing AAA visuals typically get this treatment.

If the game logic allows, they may be able to vectorize their gamecode, but these are specific use cases (updating every unit vs. updating them all individually for example) and not all games push that much data around - Warframe falls into the latter.

As far as i can tell, warframe does a lot with lua scripts; which are inherently single threaded. Warframe recently made SSE a requirement so they may start doing stuff with the renderer (as i said above), which will use more threads. But all this allows them to do is make the game look prettier. If their hold up is with the scripting engine, having the renderer do work on more threads does nothing.

Tl;dr

But I did some stuff in nvidia control panel which led me to run the game better. I capped the fps to 165 in nvidia control panel(rather than the game), set vsync to fast(in game turned off), turned on threaded optimization and set the highest refresh rate to "highest available." 

For some reason, not capping your fps or setting a high(I always used to set 144 which is my monitor native) limit makes the game run smoother. Also the in game fps cap for some reason seems to dip the fps for reasons I can neither comprehend nor explain.

Link to comment
Share on other sites

On 2023-02-02 at 6:05 AM, White_Matter said:

Here is why.

If you read what was posted you'd understand that the "do more threads" ostensibly means nothing. It's a bit of an empty question... It's a single SIMD instruction to use all threads, with theoretical speed increases of 8-16x (on newer cpu's). Does that make the game 8-16x faster? Should everything be SIMD? No, because you can't ostensibly vectorize everything.

Additionally:
Like i said at the end of the previous post, if thread 1 takes 100ms to finish job 1, it does not matter how fast threads 2-n finishes jobs 2-n. You could make a 20ms job 100x faster, you'd still be waiting for thread 1 with task 1...

What Warframe's code looks like, and how they lay their data out is a guess. Seeing as there aren't any plans for a massive engine overhaul, they're probably content with the status quo for the time being, or are happy with the progress they make in other areas - like the prior mentioned requirement of SSE for CPU's.

 

Link to comment
Share on other sites

3 hours ago, MillbrookWest said:

If you read what was posted you'd understand that the "do more threads" ostensibly means nothing. It's a bit of an empty question... It's a single SIMD instruction to use all threads, with theoretical speed increases of 8-16x (on newer cpu's). Does that make the game 8-16x faster? Should everything be SIMD? No, because you can't ostensibly vectorize everything.

Additionally:
Like i said at the end of the previous post, if thread 1 takes 100ms to finish job 1, it does not matter how fast threads 2-n finishes jobs 2-n. You could make a 20ms job 100x faster, you'd still be waiting for thread 1 with task 1...

What Warframe's code looks like, and how they lay their data out is a guess. Seeing as there aren't any plans for a massive engine overhaul, they're probably content with the status quo for the time being, or are happy with the progress they make in other areas - like the prior mentioned requirement of SSE for CPU's.

 

Short version?

Link to comment
Share on other sites

On 2023-02-04 at 6:08 PM, MillbrookWest said:

Ask a better question..

It is the best question. 

On 2023-01-29 at 2:44 AM, White_Matter said:

Could any one of you guys manage to optimize the game to utilize multi cores/threads ?

If the answer is yes, then tell me how. If the answer is no(in your case it is) then don't bother writing a wall of text that I'll never read. 

On 2023-02-04 at 6:08 PM, MillbrookWest said:

Or be content with that which has already been discussed.

You might be new to WF but it is a 10 year old game. What's discussed years ago may not be relevant now or something new might have come up. 

Link to comment
Share on other sites

11 hours ago, White_Matter said:

If the answer is yes, then tell me how. If the answer is no(in your case it is) then don't bother writing a wall of text that I'll never read. 

Except my answer wasn't "no"... maybe the post should have been read, no?

11 hours ago, White_Matter said:

You might be new to WF but it is a 10 year old game. What's discussed years ago may not be relevant now or something new might have come up. 

Been here the same amount of time as you.

Scripting engines have been single threaded since the dawn of time, not to be confused with multiprocessing. Between the dawn of time and now i've gotten my degree in computer science, and can personally confirm they're still single threaded (at least, by and large).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...