Resource leaking and high memory usage
I have imported a bunch of 4K video's and created a proxy out of it. In that Cinelerra session my memory usage became 9.9GB. When closing the project and reopening it the totally used memory reduced. What to make of this? skinkie 30046 319 62.0 17949716 9986224 pts/1 Sl+ 10:34 124:49 cin skinkie 144059 51.9 47.0 16050360 7573660 pts/1 Sl+ 11:14 1:56 cin Regardless of the above, I wonder if the memory pressure can be reduced in any way. Are the IDX's taking up memory? -- Stefan
try 0028 (and may be two other patches) and see if situation improves? On Monday, February 21, 2022, Stefan de Konink via Cin < [email protected]> wrote:
I have imported a bunch of 4K video's and created a proxy out of it. In that Cinelerra session my memory usage became 9.9GB. When closing the project and reopening it the totally used memory reduced. What to make of this?
skinkie 30046 319 62.0 17949716 9986224 pts/1 Sl+ 10:34 124:49 cin
skinkie 144059 51.9 47.0 16050360 7573660 pts/1 Sl+ 11:14 1:56 cin
Regardless of the above, I wonder if the memory pressure can be reduced in any way. Are the IDX's taking up memory?
-- Stefan -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
If I understand this correctly, this is how I would expect it to work:. I have imported a bunch of 4K video's and created a proxy out of it. In
that Cinelerra session my memory usage became 9.9GB. When closing the project and reopening it the totally used memory reduced. What to make of this?
The first time videos are loaded in CinGG they will be put into memory as much as possible and creating proxies will use even more memory as it is manipulating the frames. The next time you load those videos, you don't have to use as much memory because the work creating them is already complete. Any time something is in memory, it is just going to work better and faster because it does not have to go get stuff off of the slower disks.
On Monday, February 21, 2022 11:08:34 PM CET, Phyllis Smith via Cin wrote:
The first time videos are loaded in CinGG they will be put into memory as much as possible and creating proxies will use even more memory as it is manipulating the frames. The next time you load those videos, you don't have to use as much memory because the work creating them is already complete. Any time something is in memory, it is just going to work better and faster because it does not have to go get stuff off of the slower disks.
Then an editing session with these files live should load the files eventually, and cause the same memory usage. Personally I think it would be better to memory map files that are of interest. In that case the OS could choose where and when to put it into the main memory. I'll check out the patches provided to see if goes better. -- Stefan
In testing most of today, I watched memory usage to try to better understand how it is working. It matches what Stefan is seeing. I have imported a bunch of 4K video's and created a proxy out of it. In
that Cinelerra session my memory usage became 9.9GB. When closing the project and reopening it the totally used memory reduced. What to make of this?
My observations: (1) Initial "Load" of a video shows the memory usage increasing while all of the occasional images show on the timeline. (2) While "Playing" that video, the memory usage increases gradually as each image is shown in the compositor. (3) Creating a "Proxy" of that video, the memory usage increases gradually. (4) When "Playing" this proxied video, the memory usage basically stays the same (does not increase), probably because creating proxy loaded everything. So, in all cases, the memory used is not released when the operation is complete because there is no reason to as it may be used shortly in playing or editing as you can see in the #4 above. Now when you quit out of Cinelerra and reload from backup, you are back to #1 above so memory usage will be less than #2, 3, or 4 because only memory usage of the "Load" is in effect since there has not yet been any "playing or editing". However, there is 1 anomaly that I believe shows that memory that should be released when switching between "Disable proxy" and "Enable proxy" is not being done properly. I have logged BT #607 for this to be looked at. Then an editing session with these files live should load the files
eventually, and cause the same memory usage. Personally I think it would be better to memory map files that are of interest. In that case the OS could choose where and when to put it into the main memory.
About the above statement, I am not sure how the OS would know which files to map "that are of interest" since how could it know? Generally, I don't even know which is going to be of interest to me. So as stated earlier, I believe that Cinelerra currently does not release memory used when the operation is complete because there is no way for it to know which areas are of interest to the user and will be used shortly in playing or editing.
participants (3)
-
Andrew Randrianasulu -
Phyllis Smith -
Stefan de Konink