Bug Report CPU usage goes from 10-15% to 70-80%

JunkaDK

New Member
So these past few days i've been testing different settings because i bought new hardware to optimize my streaming quality. Whenever i run the x264 CPU Preset at Faster or Fast, something strange occours every 15-20 mins. The OBS cpu usage climbs from 10-15% to 70-80% for 5-10 sec and then drops back down. I then change it back to Veryfast and then its running perfect again. Can anyone explain this or has anyone had the same experience?

My hardware is :

MB: ASUS P9X79
CPU: Intel Core i7 3930K / 3.2 GHz Processor O.C to 4.5Ghz
RAM: Kingston HyperX Predator 4x4GB DDR3 2400Mhz
GPU: ASUS GTX680-DC2T-2GD5 O.C. to 1201Mhz
HD: OCZ-VERTEX3 120GB SSD
OS: Win7 64bit.

Internet:
Upstream: 9796 Kbps.
Downstream: 48080 Kbps.
 

dodgepong

Administrator
Community Helper
The faster/fast presets use a huge amount more CPU power than veryfast...generally it is recommended to keep the x264 preset at veryfast unless you are certain your computer can handle slower presets. It sounds like your computer cannot.
 

JunkaDK

New Member
well 98% of the time the CPU usage is at 15-20% when using Faster, BUT like i said then out of nowhere it climbs to 70-80% for 5-10 secs and then back down. If my computer can't handle that preset.. then what computer can?
 

JunkaDK

New Member
Im playing Diablo 3.

This is my log from today, i started out at Faster, just to see if it had stopped bugging but then it happened and i switched to Veryfast and then there was no issues.
 

Attachments

  • 2013-04-29-1716-50.log
    9.1 KB · Views: 543

paibox

heros in an halfshel
Because your stream on Faster and the one on Veryfast is in the same file, it's really hard to know what was going on with the one on the slower (Faster) preset due to the profiler data being an average over all three streams.

Is there a reason why you have the sync desktop audio to video timestamps option enabled? I would suggest turning that off unless it actually fixes something for you. While I'm not quite sure that will fix your issue entirely, your computer should definitely be able to handle the Faster preset at the resolution you've picked.
 

Krazy

Town drunk
Monitor Capture T_T

Do not use it in Windows 7 unless it's in a separate scene from your main game scene. It will add unnecessary performance hits.
 

paibox

heros in an halfshel
To keep his bit rate stable, I suppose? I'm not quite sure what CBR would have to do with this problem. Are you confusing it with CFR? Not that I'd think CFR would cause anything like this, though.

I'm more concerned with the number of sources in that one scene, since the monitor capture is going to stay enabled throughout the stream if that scene is accessed, his computer should be able to handle this, unless it's overheating and/or throttling the CPU speed for one reason or another.
 

R1CH

Forum Admin
Developer
x264 CPU time depends on the complexity of the scene, if you're sitting at a menu or standing still in game CPU usage will be low, if you suddenly are generating crits all over the place and lots of monsters are moving around, the CPU usage will jump a lot higher. You shouldn't change the preset from veryfast unless you are prepared to deal with large CPU spikes during motion.
 

JunkaDK

New Member
paibox said:
Because your stream on Faster and the one on Veryfast is in the same file, it's really hard to know what was going on with the one on the slower (Faster) preset due to the profiler data being an average over all three streams.

Is there a reason why you have the sync desktop audio to video timestamps option enabled? I would suggest turning that off unless it actually fixes something for you. While I'm not quite sure that will fix your issue entirely, your computer should definitely be able to handle the Faster preset at the resolution you've picked.

I will try disabling the audio sync. No particular reason why i enabled it.

Tonight i will do a 3 hour stream only running with the Faster preset, so that the log file should supply better info.
 

JunkaDK

New Member
R1CH said:
x264 CPU time depends on the complexity of the scene, if you're sitting at a menu or standing still in game CPU usage will be low, if you suddenly are generating crits all over the place and lots of monsters are moving around, the CPU usage will jump a lot higher. You shouldn't change the preset from veryfast unless you are prepared to deal with large CPU spikes during motion.

95% of my playtime is in complex scenes. When standing still with the Faster preset my CPU runs at 8-10% , when in a complex scene it goes to 15-20% max for 95-98% of the time. But then all of a sudden it jumps to 70-80% for 5-10 seconds. This happens 1-3 times every hour.
 

WayZHC

Member
So are you gaming and streaming on the same PC or are you streaming from a separate PC? Since slower presets of x264 will make a massive performance hit, it's not recommended to change it from Veryfast to any slower preset IF streaming and gaming on the same PC. I know people who stream with a separate PC and they have i7 (2600k) or Xeon (e3-1230v2) in their stream PCs so they can use slower preset cause ALL THE CPU power can be used for streaming. They are streaming FPS games at 720p 60fps

E: okay seems like you stream and game on same setup (looked at your log). While using Faster preset you don't need to have that high bitrate. Most people stream with settings 720p 60fps 3000Kbps bitrate with Veryfast preset. Very high quality stream. Try lowering your bitrate to ~2500Kbps which is really very high quality with that Faster preset

E2: And really the only advantage of using slower preset is having more efficiency compression and bitrate usage. For example a rough estimate: With Fast preset and around 2000Kbps bitrate you can have prettymuch same quality stream as using Veryfast preset and 3000Kbps bitrate. (may not be real numbers here but you know what i mean :p )
 

JunkaDK

New Member
WayZHC said:
So are you gaming and streaming on the same PC or are you streaming from a separate PC? Since slower presets of x264 will make a massive performance hit, it's not recommended to change it from Veryfast to any slower preset IF streaming and gaming on the same PC. I know people who stream with a separate PC and they have i7 (2600k) or Xeon (e3-1230v2) in their stream PCs so they can use slower preset cause ALL THE CPU power can be used for streaming. They are streaming FPS games at 720p 60fps

E: okay seems like you stream and game on same setup (looked at your log). While using Faster preset you don't need to have that high bitrate. Most people stream with settings 720p 60fps 3000Kbps bitrate with Veryfast preset. Very high quality stream. Try lowering your bitrate to ~2500Kbps which is really very high quality with that Faster preset

E2: And really the only advantage of using slower preset is having more efficiency compression and bitrate usage. For example a rough estimate: With Fast preset and around 2000Kbps bitrate you can have prettymuch same quality stream as using Veryfast preset and 3000Kbps bitrate. (may not be real numbers here but you know what i mean :p )

hmm im gonna try different setups.. i just assumed that using higher bitrate / combined with highed cpu usage would improve the quality. But perhaps im wrong? :)
 

WayZHC

Member
JunkaDK said:
hmm im gonna try different setups.. i just assumed that using higher bitrate / combined with highed cpu usage would improve the quality. But perhaps im wrong? :)

Well by slowering the compression process (using slower x264 preset) it compresses(Is this even a word? lol :D ) much more efficient so it uses much less bitrate for same quality as using Veryfast preset with higher bitrate. Since the compression happens in realtime, the compression will "waste" some bitrate. This "waste" can be reduced by slowering the compression preset with cost of performance of your system. You have a powerful CPU so you should be able to use x264 Faster preset while gaming with 2500-3000Kbps bitrate. And try using VBR since sometimes if you are not moving in your scene the bitrate won't be even 1000Kbps so sending a constant 3500Kbps is just wasting :p
 

JunkaDK

New Member
I just read somewhere, that for live streaming the best quality would be achieved by using CBR. I used to run with VBR but got some framedrops, but that was also when i was streaming through the Frankfurt server which apparently was know to be unstable. Yester i streamed through Amsterdam without a single framedrop.
 

WayZHC

Member
JunkaDK said:
I just read somewhere, that for live streaming the best quality would be achieved by using CBR. I used to run with VBR but got some framedrops, but that was also when i was streaming through the Frankfurt server which apparently was know to be unstable. Yester i streamed through Amsterdam without a single framedrop.

Well that might be true. Also the framedrops can be a problem of Twitch's servers if a lot streamers streaming at same time. Try to tweak your settings a bit. I'm sure you'll find perfect settings for you.

I have found out these max bitrates to be perfect for streaming imo (Veryfast preset):
- 1280x720 2500-3000Kbps
- 1920x1080 4000-5000Kbps

Also make sure if you are not a partner of Twitch, your viewers have to be capable of viewing constant 3500Kbps (if you are using CBR).

E: And a little tip: Don't view your own stream via browser on the same same pc. It sometimes causes strange drops in your stream (i don't know why). So if possible, view it with a another pc or other device. :p
 

paibox

heros in an halfshel
Ah, when you do your test stream, try keeping some CPU/temp monitoring applications open and see if you can spot anything weird going on when you get those spikes in CPU usage.
 

JunkaDK

New Member
paibox said:
Ah, when you do your test stream, try keeping some CPU/temp monitoring applications open and see if you can spot anything weird going on when you get those spikes in CPU usage.

Yes will do that aswell :)
 
Top