Question / Help Excessive Use of RAM on Mac OSX

Tom Zawistowski

New Member
I Noticed that OBS uses ALL of my 16 G of Ram on Mac OS. While on Windows, it doesn't even use 1 Gig of Ram. Why is that? Is it a memory leak? After I launch OBS Mac I have 12.4 G of Ram available. Then when I start to play a video OBS just starts eating RAM - particularly when I play a video using VLC. I get down to 24 mb of RAM at times - even while just recording and not streaming! I have no problem with the CPU which never gets over 19%. Now this hasn't caused my computer or OBS to crash, but that is just not normal for any program to eat up that much Ram. I am sure it is causing my Mac to start caching RAM on the Hard Disk and in OBS Stats I see that the "Average time to render frame" is often in the RED at 34.5 ms and the "Frames missed due to rendering lag" turns RED at 5.9%. Do I have some setting wrong that is causing this or is this a bug in Mac OBS?

Here is my log file: https://obsproject.com/logs/i9xzaYbUTF385Mvh
 

Tom Zawistowski

New Member
While the problem I describe is still not resolved, I am happy to explain that there is a work around that should be used going forward by anyone using a Mac and OBS. Instead of choosing "VLC Video Source", even though you are creating a scene that contains a video, INSTEAD choose "Media Source", by doing so, no additional RAM is used while you are streaming or recording your podcast.
 

vr_driver

New Member
Hi Tom!
WOW! Yes, I experienced the same thing today and I only noticed it at the end of the stream, which is when we play a particular video. While sitting there I observed how high the memory usage was.
Somehow I had OBS using 37GB of memory! This was crazy, considering I only have 16GB of RAM on the laptop.

Here is a screen capture video where the problem happens, of which I just tested to confirm your theory.
https://youtu.be/ojWm8RoSpDI

This is the log from the above video.

This is a screen capture of this morning's excessive memory problem.

This is the log of the session from this morning, where this 37GB memory leak happened.
Screen Shot 2020-04-05 at 11.26.55.png
 
Last edited:

Narcogen

Active Member
I'd start by removing any 3rd party plugins, including VSTs. So that's websocket and any of the several VST 2.0 plugins you're using.

Then remove any media sources, especially broken ones that are not loading.

If that stops the leak, add them back until you isolate which item(s) may have been contributing.

09:12:13.719: os_dlopen(obs-frontend-api->obs-frontend-api.so): dlopen(obs-frontend-api.so, 257): image not found

This is a strange error. I've only seen it happening for people who have compiled OBS themselves. This indicates OBS can't load part of its own API.
 

vr_driver

New Member
Hmm, very weird. Thanks for the heads up. I'll look in to it and see how I go, and will try to remember to post the results here.
 

vr_driver

New Member
After playing with this problem and not using the VLC player I did not have any memory problems this time. All of the other plugins were still included.
 

tubbo

New Member
I've also noticed this problem ever since I began using the VLC source. There definitely seems to be some kind of bug here. When the VLC source is running, the memory usage of OBS continues to climb past the point of your RAM capabilities, and will continue swapping until I suppose it runs out of space or crashes your machine? Not sure, never got to that point.

Here are my logs: https://obsproject.com/logs/-sEsQjMrAmRYFkWN

During this quick session, OBS used over 25G of memory. I have 16G of RAM in this machine. :P
 
Add me to the list, while my cpu stays low and smooth, I actually got an error saying I was using over 100gb of memory.
out of the 2 dozen streams in the last few weeks, I’ve only seen this two times.
And the variables never change
 

digitahl

New Member
I had 3 crashes yesterday too. I have about a dozen media sources in about 35 scenes. I am not sure if thw crashes are a result of the amount of scenes or because I have 6 webcams running or because of the media sources itself.
 
And this is in .7
I also have that Logitech 20.
I’m not running it @1080 though.
memory leak, I assume?
 

Attachments

  • 89F6F1BC-3C6C-4F1B-843A-B9F4E0E1EA41.png
    89F6F1BC-3C6C-4F1B-843A-B9F4E0E1EA41.png
    105.9 KB · Views: 79

jm34d

New Member
so yeah i have the same experience, approximately 1-1/2 hrs into the stream OBS is using 130+GB of memory and i have to end my stream.
previously my longest stream was 5+ hours and everything was good (maybe 7 months ago). I've made to no changes to my set up other than updating OBS to whatever latest version comes out. I use an iPhone as a camera running OBS camera iOS app, and a 16" MBP, 16 GB 2.3 Ghz 8-Core i9 AMD Radeon Pro 5500 4 GB & Intel UHD Graphics 630. normal stream has a chat overlay (very low chat rate) and sometimes a browser overlay from stream elements ( a simple scrolling message and counter)

I used to have dropped frame issues and network problems as sadly i have no (practical) choice but to use wifi, though it is a fairly good speed. when 25.0.8 i re-ran the auto configurator to address my dropped frame/network issues

i have no VLC or media sources, only 5 static images that i'll load to if i need to 'obscure' the stream for a few minutes or such.
last log file. removed any additional scenes so there really isn't much i can think of other than some bug causing the memory usage to just grow

i saw the release notes for 25.0.8 said it addressed a memory leak, but idk...

logfiles
 

jm34d

New Member
here's the actual problematic stream log file...
 

Attachments

  • 2020-05-25 16-00-45.txt
    39.4 KB · Views: 33

OBS_Cowboy

New Member
I Noticed that OBS uses ALL of my 16 G of Ram on Mac OS. While on Windows, it doesn't even use 1 Gig of Ram. Why is that? Is it a memory leak? After I launch OBS Mac I have 12.4 G of Ram available. Then when I start to play a video OBS just starts eating RAM - particularly when I play a video using VLC. I get down to 24 mb of RAM at times - even while just recording and not streaming! I have no problem with the CPU which never gets over 19%. Now this hasn't caused my computer or OBS to crash, but that is just not normal for any program to eat up that much Ram. I am sure it is causing my Mac to start caching RAM on the Hard Disk and in OBS Stats I see that the "Average time to render frame" is often in the RED at 34.5 ms and the "Frames missed due to rendering lag" turns RED at 5.9%. Do I have some setting wrong that is causing this or is this a bug in Mac OBS?

Here is my log file: https://obsproject.com/logs/i9xzaYbUTF385Mvh

I will keep an eye on ram while streaming. my audio is great starting out then after a while it starts getting static then a LOT of static then i need to restart OBS. all the hallmarks of a memory leak! I second your opinion its an unresolved memory leak. Im going to try the hardware encoder and see if it does the same behavior.
 

dodgepong

Administrator
Forum Admin
The best thing anyone here can do to help whittle down the cause would be to start with a blank scene collection, verify there's no issue, then slowly add new sources one at a time until something changes.
 

Carlos85

New Member
Hello,
i've had the same issue a couple month ago and i think the issue was solved with 25.0.6 (i think it was that).

Now, running on OBS 25.0.8 (mac) i have again the problem, that my RAM usage goes incredible high. I have a new iMac with good specs, 32GB RaM etc. but after like 10min of OBS running i already need about 5-7gb and it doesn't stop to go up.

What i found out so far: If i duplicate my streaming szene and REMOVE STREAMLABS ALERTS - the OBS usage is going down instantly!

I don't know if other streamlabs widgets also causing the problem, but in my case, the Streamlabs alertbox causes the issue!

1. Picture: My Szene with just camera (off for the screenshot), sound input, streamlabs alerts, headset mic (off) and a screenrecord from a monitor. RAM usage at that moment: 7,93GB

2. Picture: The same, but without streamlabs alerts. RAM usage about 5min later: 7,52GB and still decreasing (10min later: 4,80gb)
 

Attachments

  • Bildschirmfoto 2020-06-23 um 11.49.19.png
    Bildschirmfoto 2020-06-23 um 11.49.19.png
    834.5 KB · Views: 71
  • Bildschirmfoto 2020-06-23 um 11.47.22.png
    Bildschirmfoto 2020-06-23 um 11.47.22.png
    590.5 KB · Views: 66
Last edited:
Top