Page MenuHome

Blender permanently increases in memory usage with each render, when motion blur is enabled
Closed, InvalidPublic


Blender permanently increases in RAM usage after each render, whenever motion blur is used. The memory leaks are very violent, and Blender can sometimes gain nearly 1GB of RAM per render! I believe I first noticed this in Blender 2.76, but it still exists in 2.77. I use the official x64 Linux build of Blender under openSUSE Tumbleweed. Currently I need to disable motion blur so I can render my animations altogether.

I'm noticing this in camera tracks rendered under Cycles: If on the Foreground render layer I enable the Vector pass, and under composite nodes I add a Vector Blur node, the problem begins to occur. To my surprise, I noticed this also happens if I don't enable the Vector pass or use a Vector Blur node, but simply enable the native Motion Blur in Cycles (the Motion Blur option in the Render panel). In one test case, this is with how much RAM the process increased every render:

Render #1: 1.589 MB
Render #2: 2.443 MB
Render #3: 3.302 MB

There's currently one important clue I was able to uncover: The aggressivity of the leaks seems to depend on the polygon count of objects in the scene. If I disable all Subsurf modifiers, the issue lessens and sometimes disappears entirely! For the test case above, this is how enabling Simplify and setting maximum subdivisions to 0 changed the leaks:

Render #1: 1.280 MB
Render #2: 1.903 MB
Render #3: 2.526 MB

As the projects I'm experiencing this in are large (eg: video backgrounds) and currently private, I can't produce a test case I can upload as easily. The problem should be easy for others to reproduce however, unless something very specific is somehow causing it on my system.



Event Timeline

Brecht Van Lommel (brecht) triaged this task as Needs Information from User priority.

Please do always try to create a .blend file to reproduce the issue. If it is in fact easy to reproduce, it should be possible to demonstrate with a small .blend that has a couple of meshes with high subdivisions?

Very well. This was actually easier than I thought: A simple Suzanne head with a subsurf of 6 is enough to visibly trigger the problem. These are the results I'm getting with it:

Startup: 338.8 MB
Render #1: 616.8 MB
Render #2: 853.2 MB
Render #3: 1,167.6 MB
Render #4: 1,484.4 MB
Render #5: 1,800.0 MB

Since I don't seem to be able to attach files on the bug tracker, I uploaded it here:

Today I tried to render my scenes with fresh Blender settings (new ~/.config/blender/2.77 directory). To my surprise, the issue went away entirely! Blender also uses a lot less memory at startup and while rendering now.

I can only conclude that a faulty addon was behind this. I had a few enabled by default, although they were only for import / export. In the future, I'll only enable IO scripts when I actually need them, as a precaution.