Animation render seemingly not freeing up memory (2.90.0 Regression) #78149

Closed
opened 2020-06-23 06:06:47 +02:00 by Alaska · 14 comments
Member

System Information:
Operating system: Linux-5.4.0-7634-generic-x86_64-with-debian-bullseye
CPU: Ryzen 9 3900X
RAM: 32GB

Blender Version:
Broken: 2.90.0 fdfe85c616 (2020-06-22 15:41)
Worked: 2.83.0, 2.90.0 e079bf6996 (2020-06-17 20:49)

Short description of error:
When I render an animation in Blender 2.90.0, Blender's memory usage continues to climb as each frame is rendered. Even when the animation is finished or canceled, the increased memory consumption is still there almost as if information from previous frames isn't being freed (It seems like it's probably BVH information). This issue does not occur in Blender 2.83.0 and older versions of 2.90.0.

Memory consumption when rendering a single frame when comparing 2.90.0 and 2.83.0 are very similar. This only really seems to affect animations.

For example, after rendering 20 frames from the animation file listed below, this is the memory usage of Blender:

Blender 2.83.0 1.8GB
Blender 2.90.0 14.7GB

Exact steps for others to reproduce the error

  1. Create a scene with lots of geometry (You can download a scene below)
  2. Set the render engine to Cycles with CPU rendering. (CUDA doesn't show this issue from my tests)
  3. Render an animation and monitor the memory (RAM) usage of Blender 2.90.0 compared to 2.83.0 using an external program like system monitor or top in the command line. Blender 2.90 should see the memory just continue to increase while 2.83 does not exhibit this behavior.
    #78149 - Animation Memory.blend

Bisecting points to a commit between 99436acde8 and f9d138be51 but I can't pin point it.
Testing with BVH2 (to avoid Embree) still shows the increased memory consumption.

**System Information:** Operating system: Linux-5.4.0-7634-generic-x86_64-with-debian-bullseye CPU: Ryzen 9 3900X RAM: 32GB **Blender Version:** Broken: 2.90.0 `fdfe85c616` (2020-06-22 15:41) Worked: 2.83.0, 2.90.0 `e079bf6996` (2020-06-17 20:49) **Short description of error:** When I render an animation in Blender 2.90.0, Blender's memory usage continues to climb as each frame is rendered. Even when the animation is finished or canceled, the increased memory consumption is still there almost as if information from previous frames isn't being freed (It seems like it's probably BVH information). This issue does not occur in Blender 2.83.0 and older versions of 2.90.0. Memory consumption when rendering a **single frame** when comparing 2.90.0 and 2.83.0 are very similar. This only really seems to affect animations. For example, after rendering 20 frames from the animation file listed below, this is the memory usage of Blender: |Blender 2.83.0|1.8GB| | -- | -- | |Blender 2.90.0|14.7GB| **Exact steps for others to reproduce the error** 1. Create a scene with lots of geometry (You can download a scene below) 2. Set the render engine to `Cycles` with CPU rendering. (CUDA doesn't show this issue from my tests) 3. Render an animation and monitor the memory (RAM) usage of Blender 2.90.0 compared to 2.83.0 using an external program like `system monitor` or `top in the command line`. Blender 2.90 should see the memory just continue to increase while 2.83 does not exhibit this behavior. [#78149 - Animation Memory.blend](https://archive.blender.org/developer/F8640051/T78149_-_Animation_Memory.blend) Bisecting points to a commit between 99436acde8 and f9d138be51 but I can't pin point it. Testing with BVH2 (to avoid Embree) still shows the increased memory consumption.
Author
Member

Added subscriber: @Alaska

Added subscriber: @Alaska
Author
Member

Bisecting points to something around the TBB adjustments and Embree implementation is causing issues.
Somewhere between 99436acde8 and f9d138be51
I can't pin point the exact commit as I experience build issues around this area and weird rendering bugs. So all I know is the bug is from that area.

Testing Blender with BVH2 in these later builds still experiences issues. So probably TBB? I'm not sure.

Bisecting points to something around the TBB adjustments and Embree implementation is causing issues. Somewhere between 99436acde8 and f9d138be51 I can't pin point the exact commit as I experience build issues around this area and weird rendering bugs. So all I know is the bug is from that area. Testing Blender with BVH2 in these later builds still experiences issues. So probably TBB? I'm not sure.
Author
Member

Playing around with a few more scenes, I have been unable to replicate this bug.

So their's something in that file which causes issues. I've tried getting rid of the instanced meshes, didn't help.
I might start an investigation into individual objects and modifiers to try find the cause. But that will have to be delayed to tomorrow.
Maybe someone with a debugger attached to Blender would have a better time trying to figure this one out.

Playing around with a few more scenes, I have been unable to replicate this bug. So their's something in that file which causes issues. I've tried getting rid of the instanced meshes, didn't help. I might start an investigation into individual objects and modifiers to try find the cause. But that will have to be delayed to tomorrow. Maybe someone with a debugger attached to Blender would have a better time trying to figure this one out.

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

How are you measuring memory usage?

The number reported by Blender? Virtual, resident or shared memory reported by the system?

How are you measuring memory usage? The number reported by Blender? Virtual, resident or shared memory reported by the system?
Author
Member

@brecht The memory usage reported by Blender seems to stay at a constant 4GB while rendering and drops down to 2GB after rendering.
However, monitoring memory used by Blender using the system monitor bundled with Gnome shows Blender using the 17GB after rendering 20 frames and total system RAM consumption at ~19GB with 2.90.0.
This does not occur in 2.83 or older versions of 2.90.

@brecht The memory usage reported by Blender seems to stay at a constant 4GB while rendering and drops down to 2GB after rendering. However, monitoring memory used by Blender using the system monitor bundled with Gnome shows Blender using the 17GB after rendering 20 frames and total system RAM consumption at ~19GB with 2.90.0. This does not occur in 2.83 or older versions of 2.90.
Author
Member

I'm most likely monitoring resident memory with the system monitor.

I'm most likely monitoring resident memory with the `system monitor`.

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

This issue was referenced by blender/cycles@2aa2460b70

This issue was referenced by blender/cycles@2aa2460b70ce62b689af94ad0bd320ad8cf05793

This issue was referenced by 0dced1af34

This issue was referenced by 0dced1af34e2a714475c24357cf93c2b0147f27f
Author
Member

After testing a bunch of different scenes and being unable to reproduce the bug, I tore apart my original scene to find the culprit object or modifier or whatever.

Having an object with lots of geometric detail (whether naturally high poly or through modifier) seems to cause this bug. I'll update the original report to reflect this.

After testing a bunch of different scenes and being unable to reproduce the bug, I tore apart my original scene to find the culprit object or modifier or whatever. Having an object with lots of geometric detail (whether naturally high poly or through modifier) seems to cause this bug. I'll update the original report to reflect this.

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2020-06-24 19:14:05 +02:00
Author
Member

Thank you @brecht

Thank you @brecht
Thomas Dinges added this to the 2.90 milestone 2023-02-08 16:26:25 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#78149
No description provided.