exeldro / obs-dynamic-delay

GNU General Public License v2.0
41 stars 4 forks source link

Memory consumption (memory leak?) #2

Open e7d opened 3 years ago

e7d commented 3 years ago

Hi @exeldro,

First, thanks for this really great plugin! Amazing things can be done on stream thanks to it. But after digging a bit more, I noticed that, depending the configuration of this plugin, the memory consummed by OBS can spike dramatically. It seems to be depending of the amount of time the plugin is holding. Here are the observed results for my configuration:

It really seems than passed 12s of cached video, memory spikes a first time, then a second passed 15s. After these two "checkpoints", each additional second seems to be costing 500MB more.

Hope that would help to find any kind of issue. If this is a limitation, I would happy to hear the reasons.

exeldro commented 3 years ago

The memory stores raw unencoded video with this plugin. For 1080p60 that is about 500MB per second. If you want less memory usage you could lower your fps or your resolution

0xFurtiv commented 2 years ago

I am experiencing a discontinuity in memory allocation as the duration length increases. I recorded memory usage from the task manager and plotted it against the duration: memory usage graph

With the duration below 38 seconds, memory usage does not exceed a gigabyte, but at 40 seconds memory usage suddenly jumps to 13 gigabytes. The spikes in memory to the multi-gigabyte allocations usually occur 30 to 34 seconds after editing the duration, although I have seen it take up to 6 minutes for a spike to occur from below a gigabyte to 13 gigabytes. I did not see a spike in memory usage with a duration of 37 seconds running for a half-hour.

My OBS canvas is set to 1920x1080 at 60 fps.

EDIT:

With my settings, OBS uses VRAM before using RAM. The cause of the memory spike I observed is due to exhausting my video card memory and OBS dumping the overflow to RAM.

tdworz commented 1 year ago

Any chance video can be stored in RAM compressed?