Question / Help Getting Encoder Overloaded error, but CPU is <40% utilization

willman42

New Member
I know you can see my specs from the attached log file, but in summation:
CPU: i7-4790k @ 4.0GHz
GPU: GTX 1070
OBS runs on a 7200rpm HDD
Game runs on SSD

While running Resource Monitor during stream, I see that my CPU util is nowhere near 100%, yet the encoder is apparently overloaded and the stream is very choppy. Encoding at 'veryfast' runs ok, but it's blocky and I want a clearer image. Why isn't OBS using more of my CPU resources that are clearly available?
 

Attachments

  • 2017-12-07 16-53-54.txt
    36.5 KB · Views: 30

BK-Morpheus

Active Member
Your log shows, what can be expected from your processor, if you play a game, that needs some cores/cpu load or play without an fps limit.:
720p30fps preset "very fast" - working
720p 60fps preset "very fast" - 14% encoding lag
720p 30fps preset "faster" - 21% encoding lag
1080p 30fps preset "very fast" - 50% encoding lag

Not seeing high cpu load in "overall cpu load" (aka taskmanager or resource monitor) can be normal, even if some cores were hitting high load.
Hyperthreading and Windows scheduler will try to spread the load onto those virtual cores, that's why it's harder to see if there is a CPU bottleneck.

You should also avoid having monitor, window and game capture active at once.
Code:
16:53:55.710:     - source: 'Watermark' (image_source)
16:53:55.710:     - source: 'Display Capture' (monitor_capture)
16:53:55.710:     - source: 'Window Capture' (window_capture)
16:53:55.710:     - source: 'Game Capture' (game_capture)
 

willman42

New Member
Your log shows, what can be expected from your processor, if you play a game, that needs some cores/cpu load or play without an fps limit.:
720p30fps preset "very fast" - working
720p 60fps preset "very fast" - 14% encoding lag
720p 30fps preset "faster" - 21% encoding lag
1080p 30fps preset "very fast" - 50% encoding lag

Not seeing high cpu load in "overall cpu load" (aka taskmanager or resource monitor) can be normal, even if some cores were hitting high load.
Hyperthreading and Windows scheduler will try to spread the load onto those virtual cores, that's why it's harder to see if there is a CPU bottleneck.

You should also avoid having monitor, window and game capture active at once.
Code:
16:53:55.710:     - source: 'Watermark' (image_source)
16:53:55.710:     - source: 'Display Capture' (monitor_capture)
16:53:55.710:     - source: 'Window Capture' (window_capture)
16:53:55.710:     - source: 'Game Capture' (game_capture)
Oh I didn't realize those were OBS estimations of performance, that's neat. And I did notice that only Cores 0 and 1 were under heavy load- the others were a lot less utilized. Is there any way to spread the load out more evenly? I realize that may be out of the scope of OBS settings, but I just hate to see so much capacity left unused.

And the only Sources active of those were Game Capture (naturally), and Watermark, which was just a static .jpg image. That couldn't have had much of any impact, right? And by "active," I mean the eyeball icon was greyed with a slash over it- that means it's disabled and not capturing it right?
 

BK-Morpheus

Active Member
I'm not sure, if invisible/deactivated sources are still "loaded". For some sources (like browser_source) there is an additional option "unload if not displayed" or similar.
But for window/monitor/game capture there is not such an option, I think.

If the game is not taking advantage of all your cores, at least OBS is capable of doing so.
That's why I am a little confused, why you see only Core0+Core1 (which means just Core 1 out of 4 including its "hyperthread") is utilized heavily while the rest is not doing much work.
Usually OBS can (and will) utilizes way more cores than that. While you record/stream, open the taskmanager, go to details and rightclick the obs.exe (or obs64.exe) and click "set affinity".
OBS should have access to all listed 8 threads (core0-7).
 

willman42

New Member
Ok check out the troubleshooting stream I just made: https://www.twitch.tv/videos/207775023. In summation, OBS and Rocket League were allowed to use all cores, but still only cores 0-1 were 100%, with minimal usage in cores 2-7. Notice in the beginning it's super choppy. Then skip to 6:48 and I manually change the affinity for OBS to use *ONLY* cores 2-7, and the video runs extremely smoothly. It's a night & day difference!

Why did I have to manually tell OBS which cores to use though? Is that a shortcoming of OBS config/design, or Windows not properly managing my cores? Mods/admins?

*EDIT*: I also deleted the other 2 Scenes I wasn't using, and deleted all Sources except Game Capture, Watermark, and Audio In/Out.
 

sam686

Member
It might be caused by windows 10 game mode limiting CPU usage of background programs.
https://www.google.com/search?q=windows+10+game+mode+limit+background+cpu

And unfortunately, it might also limit OBS-Studio to one core or 2 threads, slowing down encoding.

edit: I don't know if the "Game mode" in OBS log file correctly detects it being on if no games is running. But, it sure does not detect it when it was off when launched, then manually switched on while OBS-Studio is running.
 
Last edited:
Top