obs-dynamic-delay
obs-dynamic-delay copied to clipboard
Memory consumption (memory leak?)
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:
- up to 10s: 392MB
- 11s: 392MB
- 12s: 392MB
- 13s: 690MB while buffering, then 2583MB
- 14s: 580MB while buffering, then 3042MB
- 15s: 516MB while buffering, then 3103MB
- 16s: 540MB while buffering, then 6037MB
- 17s: 553MB while buffering, then 6541MB
- 18s: 553MB while buffering, then 7036MB
- 19s: 586MB while buffering, then 7415MB
- 20s: 596MB while buffering, then 8012MB
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.
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
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:
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.
Any chance video can be stored in RAM compressed?