denoising or using denoise passes on multiple GPUs is very slow #67195

Closed
opened 2019-07-18 20:46:45 +02:00 by mathieu menuet · 7 comments

System Information
Operating system: all OS
Graphics card: CUDA cards

Blender Version
Broken: RC1
Worked: 2.80 partly before animation denoising was committed

Short description of error
Tiles need to be transmitted between GPUs for denoising to have all neighbor tiles. The transfer can only happen when the GPU with the requested tile refreshes the tiles it was rendering. The requesting GPU in the mean time idles.

Exact steps for others to reproduce the error
Any production files with denoising will show the behavior. Depending on the scene and the GPU combination (the more GPU and the more heterogenous they are, the more it will be slowed down.
When the GPU is not connected to display, it increases step samples and make the idling even longer. As multiGPU setups often have only one card connected, it increase the chance.
With 2 GPUs on some evermotion scenes, the slowdown goes up to 80%. (so 2 cards being just 20% faster than a single card)

**System Information** Operating system: all OS Graphics card: CUDA cards **Blender Version** Broken: RC1 Worked: 2.80 partly before animation denoising was committed **Short description of error** Tiles need to be transmitted between GPUs for denoising to have all neighbor tiles. The transfer can only happen when the GPU with the requested tile refreshes the tiles it was rendering. The requesting GPU in the mean time idles. **Exact steps for others to reproduce the error** Any production files with denoising will show the behavior. Depending on the scene and the GPU combination (the more GPU and the more heterogenous they are, the more it will be slowed down. When the GPU is not connected to display, it increases step samples and make the idling even longer. As multiGPU setups often have only one card connected, it increase the chance. With 2 GPUs on some evermotion scenes, the slowdown goes up to 80%. (so 2 cards being just 20% faster than a single card)
Author

Added subscriber: @bliblubli

Added subscriber: @bliblubli
Author

Ideas to solve as requested per PM:

  • Better tile dispatching give each GPU a corner to work on. Only in the middle they will need to exchange tiles.
  • use cuda streams to allow exchanging buffers during rendering maybe?
  • transfer the rendered tiles to CPU each time one is finished and do the denoising on CPU (already implemented partially as GPU+CPU rendering works with denoising?). I concentrate on GPU only, so just an idea.
  • Render everything first and do the denoising in one batch at the end. That would also allow to decouple tile size for path tracing and denoising, which makes denoising faster as it prefers big tiles and allow small tiles for path tracing which is also faster.
Ideas to solve as requested per PM: - Better tile dispatching give each GPU a corner to work on. Only in the middle they will need to exchange tiles. - use cuda streams to allow exchanging buffers during rendering maybe? - transfer the rendered tiles to CPU each time one is finished and do the denoising on CPU (already implemented partially as GPU+CPU rendering works with denoising?). I concentrate on GPU only, so just an idea. - Render everything first and do the denoising in one batch at the end. That would also allow to decouple tile size for path tracing and denoising, which makes denoising faster as it prefers big tiles and allow small tiles for path tracing which is also faster.

Added subscriber: @machieb

Added subscriber: @machieb

I´ve tested the different renderposibilities in blender and compared blender 2.79b with blender 2.80 5f140e61c2.
It´s the same scene in blender 2.79b and blender 2.80.

Blender 2.79b

CPU(AMD Threadripper 1950X 16Cores)
bmw27_cpu.blend (tiles 32x32) 01:20.53
bmw27_cpu_denoise.blend (tiles 32x32)01:24.32
2xGPU (Geforce Gtx 1080 Ti 11GB / Geforce Titan X 12GB)
bmw27_gpu.blend (tiles 240x180) 01:09.15
bmw27_gpu_denoise.blend (tiles 240x180) with denoise 01:12.15
GPU (Geforce Gtx 1080 Ti 11GB)
bmw27_gpu.blend (tiles 240x180) 02:01.35
bmw27_gpu_denoise.blend (tiles 240x180) with denoise 02:05.07

Blender 2.805f140e61c2CPU (AMD Threadripper 1950X 16Cores)
bmw27_cpu.blend (tiles 32x32) 01:46.65
bmw27_cpu_denoise.blend (tiles 32x32) 01:51.20
2xGPU (Geforce Gtx 1080 Ti 11GB / Geforce Titan X 12GB)
bmw28_gpu.blend (tiles 32x32) 00:34.24
bmw28_gpu_denoise.blend (tiles 32x32) with denoise 00:40.69
GPU (Geforce Gtx 1080 Ti 11GB)
bmw27_gpu.blend (tiles 32x32) 00:49.69
bmw27_gpu.blend (tiles 32x32) with denoise 00:55.06
CPU+GPU (AMD Threadripper 1950X 16Cores + Geforce Gtx 1080 Ti 11GB / Geforce Titan X 12GB)
bmw28_gpu_cpu.blend (tiles 16x16) 00:30.40
bmw28_gpu_cpu_denoise.blend (tiles 16x16) with denoise 00:39.05

Summing up blender 2.79b renders the scene on cpu ca. 25% faster. Why?Compared one GPU to two GPUs in blender 2.79b there is a75% boost with two GPUs.
In blender 2.80 the boost is low,only 44%. Why what is slowing down the second GPU? Blender 2.8 is also using a newer CUDA version.
GPU rendering in blender 2.80 is more than twice as fast as in blender 2.79b!
I couldn´t find any significant slowdown with denoise.

bmw28_gpu.blend

bmw28_cpu.blend

bmw28_gpu_denoise.blend

bmw28_cpu_denoise.blend

bmw28_gpu_cpu.blend

bmw28_gpu_cpu_denoise.blend

bmw27_gpu_denoise.blend

bmw27_gpu.blend

bmw27_cpu.blend

bmw27_cpu_denoise.blend

I´ve tested the different renderposibilities in blender and compared blender 2.79b with blender 2.80 5f140e61c28c. It´s the same scene in blender 2.79b and blender 2.80. **`Blender 2.79b`** **CPU**(AMD Threadripper 1950X 16Cores) bmw27_cpu.blend (tiles 32x32) **01:20.53** bmw27_cpu_denoise.blend (tiles 32x32)**01:24.32** **2xGPU** (Geforce Gtx 1080 Ti 11GB / Geforce Titan X 12GB) bmw27_gpu.blend (tiles 240x180) **01:09.15** bmw27_gpu_denoise.blend (tiles 240x180) with denoise **01:12.15** **GPU** (Geforce Gtx 1080 Ti 11GB) bmw27_gpu.blend (tiles 240x180) **02:01.35** bmw27_gpu_denoise.blend (tiles 240x180) with denoise **02:05.07** **`Blender 2.80`**5f140e61c28c**CPU** (AMD Threadripper 1950X 16Cores) bmw27_cpu.blend (tiles 32x32) **01:46.65** bmw27_cpu_denoise.blend (tiles 32x32) **01:51.20** **2xGPU** (Geforce Gtx 1080 Ti 11GB / Geforce Titan X 12GB) bmw28_gpu.blend (tiles 32x32) **00:34.24** bmw28_gpu_denoise.blend (tiles 32x32) with denoise **00:40.69** **GPU** (Geforce Gtx 1080 Ti 11GB) bmw27_gpu.blend (tiles 32x32) **00:49.69** bmw27_gpu.blend (tiles 32x32) with denoise **00:55.06** **CPU+GPU** (AMD Threadripper 1950X 16Cores + Geforce Gtx 1080 Ti 11GB / Geforce Titan X 12GB) bmw28_gpu_cpu.blend (tiles 16x16) **00:30.40** bmw28_gpu_cpu_denoise.blend (tiles 16x16) with denoise **00:39.05** Summing up **blender 2.79b renders the scene on cpu ca. 25% faster**. **`Why?`**Compared one GPU to two GPUs in blender 2.79b there is a**75% boost** with two GPUs. In blender 2.80 the boost is low,**only 44%**. Why what is slowing down the second GPU? Blender 2.8 is also using a newer CUDA version. GPU rendering in blender 2.80 is more **than twice as fast** as in blender 2.79b! I couldn´t find any significant slowdown with denoise. [bmw28_gpu.blend](https://archive.blender.org/developer/F7617993/bmw28_gpu.blend) [bmw28_cpu.blend](https://archive.blender.org/developer/F7617994/bmw28_cpu.blend) [bmw28_gpu_denoise.blend](https://archive.blender.org/developer/F7617996/bmw28_gpu_denoise.blend) [bmw28_cpu_denoise.blend](https://archive.blender.org/developer/F7617995/bmw28_cpu_denoise.blend) [bmw28_gpu_cpu.blend](https://archive.blender.org/developer/F7617997/bmw28_gpu_cpu.blend) [bmw28_gpu_cpu_denoise.blend](https://archive.blender.org/developer/F7617998/bmw28_gpu_cpu_denoise.blend) [bmw27_gpu_denoise.blend](https://archive.blender.org/developer/F7617999/bmw27_gpu_denoise.blend) [bmw27_gpu.blend](https://archive.blender.org/developer/F7618000/bmw27_gpu.blend) [bmw27_cpu.blend](https://archive.blender.org/developer/F7618001/bmw27_cpu.blend) [bmw27_cpu_denoise.blend](https://archive.blender.org/developer/F7618002/bmw27_cpu_denoise.blend)

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Brecht Van Lommel self-assigned this 2019-07-19 12:37:20 +02:00

Thanks for the report, but we don't treat potential performance improvements as bugs. We're aware there are some inefficiencies in this code.

Feel free to contribute changes to improve performance here.

Thanks for the report, but we don't treat potential performance improvements as bugs. We're aware there are some inefficiencies in this code. Feel free to contribute changes to improve performance here.
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#67195
No description provided.