Maniphest T71805

Video Sequence Editor: RAM usage unusually high between 2.8 vs 2.81
Closed, Archived

Assigned To
Richard Antalik (ISS)
Authored By
Unknown Object (User)
Nov 23 2019, 7:35 AM
Tags
  • BF Blender
  • Video Sequencer
Subscribers
Maciej Jutrzenka (Kramon)
Nathan Lovato (gdquest)
Peter Fog (tintwotin)
Richard Antalik (ISS)

Description

System Information
Operating system: Windows 10
Graphics card: 3071MB NVIDIA GeForce GTX 1060 3GB (HP)

Blender Version
Broken: (example: 2.80, edbf15d3c044, master, 2018-11-28, as found on the splash screen) 2.81, unable to find Hash from Splash Screen, 2.81.16
Worked: (optional necessary for comparison) 2.80, unable to find Hash from Splash Screen, 2.80.75
Note: Can no longer find hash numbers on Splash Screens for 2.80 onward. Any details pertaining to the location of the hash number is accepted and appreciated.

Short description of error
Up to date, Blender's 2.80 builds, up to 2.80.75, from what I have checked, use no more than 1.10GB of ram when working with videos in the Video Sequence Editor. However, some builds, specifically builds *before* 2.81.16, use upwards of 4GB of ram. However, this changes with 2.81816, where it climbs up to 1.31GB, up to date. I had not checked any further, as I feared that if I had tried, it would have climbed up to 4GB, as I was accustomed to seeing happening.
Exact steps for others to reproduce the error
1: Open either 2.80 or 2.81
2: Start a new file: Video Editing.
3: Add in a video, preferably something longer than 5 minutes.
4 (optional): Waveform displaying on. (This does not matter.)
5: Proceed to scrub through the video footage, either forward or back.
6: Keep an eye on the bottom-right-hand corner, watching the consumption of ram rise.
7: 2.80: Expect it to stop at around the 1.1GB range. 2.81: Expect it to climb into the 4GB range, if not mistaken.
Cannot attach .blend file, too large, even after packing everything.

Event Timeline

Unknown Object (User) created this task.Nov 23 2019, 7:35 AM
Peter Fog (tintwotin) added a subscriber: Peter Fog (tintwotin).Nov 23 2019, 9:48 AM

Does Prefetch Frames change anything when switching it on/off?

Show Cache also results in lower performance.

Unknown Object (User) added a comment.Nov 23 2019, 6:18 PM
In T71805#815781, @Peter Fog (tintwotin) wrote:

Does Prefetch Frames change anything when switching it on/off?

Show Cache also results in lower performance.

I will give it a try and come back to you.
...
https://i.imgur.com/kmLC5zS.png Show cache is on.
https://i.imgur.com/Mq6hMef.png ...Strange, Prefetch frames is *not*.
https://i.imgur.com/y6yk6LA.png ...and this is unavailable in 2.80.75
...I turned on Prefetch frames in 2.81.16, it still climbed past 1.10GB.
However, this could *all* be just me. I could be seeing things, but at this time, I use 2.80.75 for the Video Sequence Editor, above anything else.

Maciej Jutrzenka (Kramon) added a subscriber: Maciej Jutrzenka (Kramon).EditedNov 26 2019, 8:29 PM

this is RAM not CPU usage.. 1.10GB of ram climbs to 4GB of usage.. that is because, when u are moveing your mice along timeline frames... u are cacheing those frames on the fly.. to make faster playblast the blender is just keeping those frames in memory however 4GB seams a bit high.. however 5 min is a lot of frames on the other hand...

i edited your description a bit :)

Maciej Jutrzenka (Kramon) renamed this task from Video Sequence Editor: CPU power consumption unusually high between builds. to Video Sequence Editor: RAM usage unusually high between builds..Nov 26 2019, 8:30 PM
Maciej Jutrzenka (Kramon) updated the task description.
Maciej Jutrzenka (Kramon) added a project: Video Sequencer.
Maciej Jutrzenka (Kramon) renamed this task from Video Sequence Editor: RAM usage unusually high between builds. to Video Sequence Editor: RAM usage unusually high between 2.8 vs 2.81.Nov 26 2019, 8:33 PM
Unknown Object (User) added a comment.Nov 26 2019, 8:34 PM
In T71805#818544, @Maciej Jutrzenka (Kramon) wrote:

this is RAM not CPU usage.. 1.10GB of ram climbs to 4GB of usage.. that is because, when u are moveing your mice along timeline frames... u are cacheing those frames on the fly.. to make faster playblast the blender is just keeping those frames in memory however 4GB seams a bit high.. however 5 min is a lot of frames on the other hand...

i edited your description a bit :)

Thank you for explaining this.
Just 1 thing: Should I record a video of this happening between builds? I mean, even with a few seconds of footage, it skyrockets like nuts.
Up to date, I am still using 2.80.75 for the Video Sequence Editor.

Maciej Jutrzenka (Kramon) added a comment.EditedNov 26 2019, 8:36 PM

That would be good idea if u could also show like task menager next to it with memory tab open you know the graph would be awesome :)

Unknown Object (User) added a comment.Nov 26 2019, 10:04 PM

https://www.youtube.com/watch?v=rRpRbfcNV1k
2.80.75:
7:26: After over 7 minutes of quickly scrubbing the timeline, I guess (and quickly realize) that *slowly* scrubbing the timeline pushes it up higher.
7:52: No matter *how* hard I try, it will never pass 1.1GB.
2.81.16:
9:01: It started at 70MB. 9:02: If you pay attention carefully or pause at the right minute, it temporarily drops to 46.4MB. Beside the point, though.
Since 9:02: Watch as it quickly climbs.
9:20: "Wait! What if I turn on "Prefetch Frames"?
9:30: ...Even *faster*!?
9:41: 1.01GB. 9:43: 1.1GB. 9:45: "...Are you freaking *kidding* me!?
9:46: ...Wait, what the hell!? Why's it climbing *by itself*!?!?
9:55: ...But...but...but "Prefetch Frames" is turned *on*, not off! Why is the memory usage *still* climbing!?!? What the hell *is* this!?
10:37: *over 42 seconds later* Okay, this is getting old, lemme turn this off since it clearly is not helping.
..............WHAT!? "Prefetch Frames" was *causing* this!? I did *not* know that!!! ...No, really, I *just* found this out *while* I was recording this whole thing *happening*! I swear!
10:49: ...Okay, time to make this climb all the way to 4GB.
10:56: 2GB... 11:20: ...3GB... 11:45: ...4GB... Well, 4.01GB.
...and *nothing* I do will make it climb *any* higher.

Maciej Jutrzenka (Kramon) added a comment.Nov 26 2019, 10:14 PM

i bet that this is just cacheing frames.. for better playblast u can see the litte orange line that is getting brighter for frames that are cached. and i think that 2.81 is useing more memory is only because it is better at cacheing. so it cache more frames when u move your mice.

the good comparsion would be if u could load for example 200 frames of footage.. and cache it fully... and compare how much memory there is..

but i personally belive that it is not a bug.

Unknown Object (User) added a comment.Nov 26 2019, 10:24 PM
In T71805#818630, @Maciej Jutrzenka (Kramon) wrote:

i bet that this is just cacheing frames.. for better playblast u can see the litte orange line that is getting brighter for frames that are cached. and i think that 2.81 is useing more memory is only because it is better at cacheing. so it cache more frames when u move your mice.

the good comparsion would be if u could load for example 200 frames of footage.. and cache it fully... and compare how much memory there is..

but i personally belive that it is not a bug.

I had actually tried small amounts before, the results were the same.
...If this is no bug, then I will just walk away from it, instead using 2.81 for *anything* but the Video Sequence Editor.

Thank you for your patience.

Nathan Lovato (gdquest) added a subscriber: Nathan Lovato (gdquest).EditedNov 27 2019, 8:52 AM

I can confirm this is not a bug, it's normal, and caching using a lot of memory is not specific to Blender: it's true for any program that caches images.

First, the change you see in memory usage between the two versions is due to a change in a setting in the System preferences. You can change it anytime. By default, the sequencer will now use a *maximum* of 4gb in blender 2.81 (only if you have that ram available):

Caching video frames or storing conformed footage for video editing takes a lot of space - be it in memory or on your hard drive. A professional editor working on a movie will generally have terabytes of space to hold all the footage in a scrub-friendly format.

The point of this cache is to give us a much smoother editing experience, without having to use proxies. Other programs like Resolve and After Effects work similarly, by rendering frames in the background and storing them either in memory or on your hard-drive.

Currently, Blender only does that in memory, but Richard is working on the hard drive cache.

This report can be closed.

Richard Antalik (ISS) added a subscriber: Richard Antalik (ISS).Nov 27 2019, 7:57 PM

I will add link to Blender manual
https://docs.blender.org/manual/en/latest/editors/preferences/system.html#memory-limits

@darknaviexe please check if set memory limits correspond to real usage maximum for either build.

Used memory may jump up and down around the limit as this is affected by contents of the timeline.

Richard Antalik (ISS) lowered the priority of this task from 90 to 30.Nov 27 2019, 7:58 PM
Unknown Object (User) added a comment.EditedNov 27 2019, 9:11 PM

What I have in 2.80.75: https://i.imgur.com/CGcPk7r.png
*fixes this in 2.81.16*
https://i.imgur.com/3UxQ9de.png
https://i.imgur.com/0XK1ieu.png
...It now refuses to go anywhere past 1.01GB.

...Even though @Nathan Lovato (gdquest) explained that higher values make things smoother, I use lower values because, for reasons I cannot explain, reasons beyond any realistic comprehension, lower memory consumption helps in my unique cases. For whatever reason, it makes things move much more smoothly for me.
Thanks to @Richard Antalik (ISS) , I was also able to learn more about this problem, despite having checked that exact page a few times. This is basically to say, I am a blind idiot.
Thank you both for patiently putting up with my stupidity.
More specifically, thanks to @Nathan Lovato (gdquest) in particular for telling me where to look in order to solve this problem.
Thanks to this, I may now use 2.81.xx for my Video Sequence Editor needs.

To use the bug tracker as a help desk was *not* my intention. Hell, I tried a little to avoid believing this was something out of my control.
...but nothing came of it *before* this point.
(Edit 1: See at bottom.)

This is to say: If I had known exactly where to look in order to solve this problem and if, between reading about memory usage here and figuring out this option affected what happened with memory usage in the video sequencer, I would have kept quiet on both fronts.

Thank you both for pointing this out to me. I hope no actual harm has come from this.

Edit 1: The legitimate intention was to report this event as a possible bug, simply not knowing the effect of this was under complete control. Please keep this in mind when considering the aforementioned events leading up to this point.

Richard Antalik (ISS) changed the task status from Unknown Status to Archived.Nov 27 2019, 9:35 PM
Richard Antalik (ISS) claimed this task.

No worries, I guess that nobody was injured figuring out what issue is and how it can be solved :)