Page MenuHome

Memleak (?) with Denoiser
Closed, InvalidPublic


System Information
Win10 x64, nVidia GTX 780 3GB

Blender Version
Broken: Official 2.79, Buildbot builds, own build
Worked: none

Short description of error
Large resolutions (in my case 5000x5000 which is not insane but more than 1080p) in combination with the Denoiser cause the memory to increase during rendering, sometimes up to the point where my GPU RAM gets filled up completely. Same happens on CPU but I have enough system RAM to at least finish rendering.
This even happens with a completely empty scene (no geometry, no textures).
Without Denoiser both GPU and CPU render rock solid without increasing memory.

Exact steps for others to reproduce the error

  • Open this scene

and press F12 to render (or just open Blender, set resolution to something like 5000x5000 or above, activate the Denoiser and then press F12.)

  • Watch memory increase
  • Same goes for CPU
  • Deactivate Denoiser -> the empty scene renders with less than 20MB memory used.



Event Timeline

Lukas Stockner (lukasstockner97) closed this task as Invalid.

This behaviour is expected, unfortunately more memory is needed during rendering when you use denoising.
There are three reasons for that:

  1. Denoising feature passes need to be stored, so each pixel needs more memory.
  2. Since denoising depends on neighboring pixels, adjacent tiles need to be considered as well to avoid tile edge artifacts. Therefore, each tile needs to be kept in memory until all its neighbors are denoised, while each tile can be freed directly after rendering it when you don't use denoising.
  3. The denoising process itself needs temporary memory.

To reduce the additional memory use, you can:

  • Use smaller tiles, which reduces memory use in all three cases
  • Use another tile order for rendering to reduce the finished-but-still-stored tiles - in your case any of the four linear orders should work equally well, for a typical aspect ratio left-to-right and right-to-left will work best.

While I understand that this is annoying, there's not much that can be done to avoid the problem from the code side, so I'll just close the report.

OIC, thanks for your fast response.