Question / Help Only 2 cores / 4 threads in use while in game

Vitaliy P.

New Member
More details on the subject.

There is an upcoming new version of World of Tanks, so I've tested their benchmark. Basically, they've implemented new game engine.
As a result, the game is now supports multithreading. Tested benchmark recording at 'Medium' preset and all cores were used. Video quality was outstanding.

My conclusions: If a game is not multithread optimized and uses near 100% of its core/thread, OBS (and other video capture software) are unable to push more from the game's process (CPU instructions bottleneck). As a result, the encoder does not create more threads since it will probably do not benefit from them. Or, it's just an encoder bug.

Not a pro in a subject, but hope it helps. Thank you.
 

fsimon

New Member
I am having the exact same issue.. been trying to figure it out all day.
Has anyone come up with a solution, or the reason why it's doing it?

I have the Ryzen 1700x as well and I'm trying to stream Heroes of the Storm on the 'fast' profile. What's happening is everything looks perfectly fine on my end: 0 dropped frames.. and OBS reports 6-10% CPU usage, but the stream itself is pretty much unwatchable from time to time, it freezes every few seconds as if it was like 1 fps or something.
Initially messing with the affinity and assigning only threads 8 to 15 to OBS (as games generally use the first 4 cores) seemed to have 'resolved' the issue and it was smooth during the rest of that stream session, but on the next startup it's the same so the initial 'fix' was just a weird coincidence as I started up and set up the affinity again thinking it'll be okay.. only to get the exact same effect.
Then I started looking for answers so if I view my CPU usage separately by threads, I can see that thread 6 and 8 are maxing out, while the rest is pretty much idling at 5-6%.
 
I am having the exact same issue..
Then I started looking for answers so if I view my CPU usage separately by threads, I can see that thread 6 and 8 are maxing out, while the rest is pretty much idling at 5-6%.
Unfortunately that is going to happen for any game you stream if the game is CPU intensive and is not multi-thread optimized (Uses a single core/a few cores heavily)
The reason why it happens is that OBS (Any other application you use to stream the games that use one or a few cores will be the same) is simply waiting for the game to complete its job before it can grab the frame and do its job.

Manual thread assignment can help to an extent as long as the threads being utilized by the game are not being 100% utilized (Or close to)

Side Note:
The main reason as to why game developers create games that only use a single or a few cores is because a lot of players only have a couple of cores available, as well as the factor that the game developers have already invested in the game engine and it requires a lot of time and money to re-train staff for a new engine/develop a new game engine/optimize their current game engine for multiple thread usage.
 

fsimon

New Member
Yes.. after a couple of more hours of troubleshooting last night, I came to the same conclusion..
Found out that Blizzards old starcraft engine (that they use for hots as well) only uses a single thread and that was the one capping 100% even though the game was playing smoothly and I saw no lag on the preview of OBS.
I locked the maximum fps of the game to 60 and that lowered the usage on that thread to about 80% and disabled all affinity settings after which load for OBS seemed to be evenly distributed and the stream started playing smoothly again.

Oh and apparently one of the other reasons they really stuck to this single-thread method and haven't changed it much over the years is because of their replay system. The replay files are simple event-based files of only a couple of kilobytes and are recreated on the fly with the engine so using multiple threads would cause timing issues and the likes.

Thank you for the reply in any case, it just reassured me that I was on the right track and I'm hopeful that it wasn't just a temporary fix and that the stream will stay smooth from now on :) And sorry for bumping an older thread, initially I thought it would be some Ryzen specific issue.

Cheers!
 

chenister

New Member
Same thing was happening to me with Blizzard games, I was puzzled that I was having issues with a i7-8700k on very fast. Noticed core 1 was 100% all the time. Change the affinity for OBS to the bottom cores and it worked but I have to change affinity every time I use OBS. I thought there was something wrong with my system but I guess it's the games.
 

L a U r y `

New Member
have the same issue.. stream worked perfectly fine before but since 1 month maybe there was a windows update or obs update idk ingame 4 threads is maxing out while streaming.. I could stream 720p60 medium/slow preset without any issue ~60-70% CPU usage.. I found a temporary solution until we cant figure out what's happening.. open task manager, start stream/recording and open game.. wait a couple of secs then check task manager and check which threads are maxed out.. then set OBS affinity and disable OBS on maxed out threads.. now u'll use 4 less threads but at least u can stream almost the highest quality what your CPU supports.. another solution set 4-4 or 8-8 threads to OBS and the game so they wont use the same threads.. I hope it helps
 
Top