Cycles slow CPU render when using CPU + GPU with GCC 8.3 build #64894

Closed
opened 2019-05-20 19:28:29 +02:00 by Alberto · 29 comments

System Information
Operating system: Linux-4.19.42-1-MANJARO-x86_64-with-arch-Manjaro-Linux 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 418.74

Blender Version
Broken: version: 2.80 (sub 71), branch: master, commit date: 2019-05-20 16:04, hash: 5c9adc1614
Worked: ?

Short description of error
Just a simple scene with the default cube and holes on some faces, default light and a monkey inside the cube. Rendering only with CPU goes ok, the same as rendering only with GPU but rendering CPU+GPU the speed is so slow. If you disable the monkey from rendering the speed is ok again with CPU+GPU but if you enable it, it takes a lot. Also, if you add a subsurf modifier to the monkey, it takes even more.
I'm on a ryzen 5 1600 6C/12T, GTX1060 6Gb and 16G RAM setup.bug-object_inside_object.blend

Exact steps for others to reproduce the error
Open the file attached, enable CPU+GPU rendering, disable Suzanne for rendering, render with cycles and check the time. Enable Suzanne for rendering and check the time now. You can also test it with subsurf and without it on Suzanne.

Thanks and best regards.

**System Information** Operating system: Linux-4.19.42-1-MANJARO-x86_64-with-arch-Manjaro-Linux 64 Bits Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 418.74 **Blender Version** Broken: version: 2.80 (sub 71), branch: master, commit date: 2019-05-20 16:04, hash: `5c9adc1614` Worked: ? **Short description of error** Just a simple scene with the default cube and holes on some faces, default light and a monkey inside the cube. Rendering only with CPU goes ok, the same as rendering only with GPU but rendering CPU+GPU the speed is so slow. If you disable the monkey from rendering the speed is ok again with CPU+GPU but if you enable it, it takes a lot. Also, if you add a subsurf modifier to the monkey, it takes even more. I'm on a ryzen 5 1600 6C/12T, GTX1060 6Gb and 16G RAM setup.[bug-object_inside_object.blend](https://archive.blender.org/developer/F7052001/bug-object_inside_object.blend) **Exact steps for others to reproduce the error** Open the file attached, enable CPU+GPU rendering, disable Suzanne for rendering, render with cycles and check the time. Enable Suzanne for rendering and check the time now. You can also test it with subsurf and without it on Suzanne. Thanks and best regards.
Author

Added subscriber: @kong357

Added subscriber: @kong357

Added subscriber: @brecht

Added subscriber: @brecht

Testing here on Linux with a Threadripper 2990WX and Quadro RTX 5000, I can't reproduce the issue. This scene renders instantly for any configuration.

What kind of render times are we talking about? Is there something specific about this scene that triggers it, does it happen in other complex files?

Testing here on Linux with a Threadripper 2990WX and Quadro RTX 5000, I can't reproduce the issue. This scene renders instantly for any configuration. What kind of render times are we talking about? Is there something specific about this scene that triggers it, does it happen in other complex files?

Added subscriber: @zixh

Added subscriber: @zixh

I was having a similar issue with some of my own files and was going to file a bug. Testing my setup with the blend file posted in this report, I also have this issue when using GPU+CPU rendering. Disabling the Suzanne head from rendering produces an almost-instant render. Leaving it enabled and with its subsurf modifier shoots the render time to more than 2 minutes (2:16.49 on my last render), with the major hang being tiles rendering on the CPU.

I'm running a Geforce 1080ti and a Core i7 4970k on Ubuntu 19.04.

I was having a similar issue with some of my own files and was going to file a bug. Testing my setup with the blend file posted in this report, I also have this issue when using GPU+CPU rendering. Disabling the Suzanne head from rendering produces an almost-instant render. Leaving it enabled and with its subsurf modifier shoots the render time to more than 2 minutes (2:16.49 on my last render), with the major hang being tiles rendering on the CPU. I'm running a Geforce 1080ti and a Core i7 4970k on Ubuntu 19.04.

Added subscriber: @YAFU

Added subscriber: @YAFU

Weird...
I can not reproduce the problem with the .blend file above, it render faster with CPU+GPU in my system.
Tested with more recent Blender 2.8 build by myself and with last from buildbot builds. Kubuntu Linux 18.04. Intel i7-3770 and GTX 960. 430.14 drivers.

Weird... I can not reproduce the problem with the .blend file above, it render faster with CPU+GPU in my system. Tested with more recent Blender 2.8 build by myself and with last from buildbot builds. Kubuntu Linux 18.04. Intel i7-3770 and GTX 960. 430.14 drivers.
Author

The issue is exactly the same as Zix mentioned. You can find attached screenshots for render times:
CPU+GPU no suzanne
CPU+GPU_nosuz.png

CPU+GPU with suzanne and no subsurf
CPU+GPU_suz_nosubsurf.png

GPU only
GPU_only.png

CPU only
CPU_only.png

CPU+GPU,suzanne and 2 levels of subsurf
CPU+GPU_suz_subsurfx2.png

The issue also appears in more complex scenes and, obviusly, the render times are bigger.

I've found that there's no issue with the "oficial" beta from https://builder.blender.org/download/ so I guess it has to be with the compilation process, maybe some libraries installed by the system package manager (pacman in my case), not updated or maybe too new. I'm trying to compile blender with the "--build-all" option in install_deps to see if it helps.

UPDATE: Nope, it didn't help, will keep trying tomorrow.

The issue is exactly the same as Zix mentioned. You can find attached screenshots for render times: CPU+GPU no suzanne ![CPU+GPU_nosuz.png](https://archive.blender.org/developer/F7059201/CPU_GPU_nosuz.png) CPU+GPU with suzanne and no subsurf ![CPU+GPU_suz_nosubsurf.png](https://archive.blender.org/developer/F7059202/CPU_GPU_suz_nosubsurf.png) GPU only ![GPU_only.png](https://archive.blender.org/developer/F7059203/GPU_only.png) CPU only ![CPU_only.png](https://archive.blender.org/developer/F7059204/CPU_only.png) CPU+GPU,suzanne and 2 levels of subsurf ![CPU+GPU_suz_subsurfx2.png](https://archive.blender.org/developer/F7059205/CPU_GPU_suz_subsurfx2.png) The issue also appears in more complex scenes and, obviusly, the render times are bigger. I've found that there's no issue with the "oficial" beta from https://builder.blender.org/download/ so I guess it has to be with the compilation process, maybe some libraries installed by the system package manager (pacman in my case), not updated or maybe too new. I'm trying to compile blender with the "--build-all" option in install_deps to see if it helps. UPDATE: Nope, it didn't help, will keep trying tomorrow.

@kong357 which GCC or clang compiler version are you using?

@zixh are you also using a your own build, or does it happen with the one from builder.blender.org?

@kong357 which GCC or clang compiler version are you using? @zixh are you also using a your own build, or does it happen with the one from builder.blender.org?
Author

@brecht
GCC = 8.3.0
CLANG = 8.0.0

@brecht GCC = 8.3.0 CLANG = 8.0.0
Author

Ok, I think I found where the problem is and I guess it is the c++ executable version. With gcc and c++ 8.3 the problem is there.

This does not work either.
gcc.7.4_cxx.8.3.png

But this just works as expected.
gcc.7.4_cxx.7.4.png
C++7.4.png

So downgrading C++ to version 7.x works.

I've also noticed that trying to make "overrides" for switching between versions in /usr/local/bin doesn't take any effect so I assume that the compilation scripts looks directly in /usr/bin for gcc, c++, g++ and so which makes it a bit harder to switch between versions. Maybe with "CC=gcc-7" and "CXX=g++-7" could also work for compiling but I haven't tried that :(

Anyways, the problem is gcc/c++ version and needs to be downgraded to version 7.x so now is solved on my side.

Thanks for your time and keep that great work ;)

Ok, I think I found where the problem is and I guess it is the c++ executable version. With gcc and c++ 8.3 the problem is there. This does not work either. ![gcc.7.4_cxx.8.3.png](https://archive.blender.org/developer/F7061344/gcc.7.4_cxx.8.3.png) But this just works as expected. ![gcc.7.4_cxx.7.4.png](https://archive.blender.org/developer/F7061347/gcc.7.4_cxx.7.4.png) ![C++7.4.png](https://archive.blender.org/developer/F7061350/C__7.4.png) So downgrading C++ to version 7.x works. I've also noticed that trying to make "overrides" for switching between versions in /usr/local/bin doesn't take any effect so I assume that the compilation scripts looks directly in /usr/bin for gcc, c++, g++ and so which makes it a bit harder to switch between versions. Maybe with "CC=gcc-7" and "CXX=g++-7" could also work for compiling but I haven't tried that :( Anyways, the problem is gcc/c++ version and needs to be downgraded to version 7.x so now is solved on my side. Thanks for your time and keep that great work ;)

I was also using a custom build, and the official beta build does not have this issue. I will test downgrading GCC and seeing if that helps.

Update: downgrading GCC seems to have resolved the issue.

I was also using a custom build, and the official beta build does not have this issue. I will test downgrading GCC and seeing if that helps. **Update:** downgrading GCC seems to have resolved the issue.
Brecht Van Lommel changed title from Extremely slow CPU rendering speed with CPU+GPU on Cycles to Slow CPU render when using CPU + GPU with GCC 8.3 build 2019-05-23 00:05:52 +02:00
Brecht Van Lommel self-assigned this 2019-05-23 00:06:18 +02:00
Brecht Van Lommel changed title from Slow CPU render when using CPU + GPU with GCC 8.3 build to Cycles slow CPU render when using CPU + GPU with GCC 8.3 build 2019-05-23 00:06:41 +02:00

Added subscriber: @Rigoletto

Added subscriber: @Rigoletto

I can confirm rendering a scene is slower with gpu + cpu enabled. For me it look like the tiles are static splitted in the job queue for cpu and gpu. The gpu finishes his queue and stop working. It should take tiles from the cpu queue then.

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 660/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 388.43

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-06-28 22:08, hash: 648e8a1f1d

CUD_gpu_cpu.png

I can confirm rendering a scene is slower with gpu + cpu enabled. For me it look like the tiles are static splitted in the job queue for cpu and gpu. The gpu finishes his queue and stop working. It should take tiles from the cpu queue then. System Information Operating system: Windows-7-6.1.7601-SP1 64 Bits Graphics card: GeForce GTX 660/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 388.43 Blender Version Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-06-28 22:08, hash: 648e8a1f1d ![CUD_gpu_cpu.png](https://archive.blender.org/developer/F7555693/CUD_gpu_cpu.png)
Brecht Van Lommel was unassigned by Dalai Felinto 2019-12-23 16:34:18 +01:00
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

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

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

Does this still happen with 2.83 from https://builder.blender.org/download/

Does this still happen with 2.83 from https://builder.blender.org/download/
Author

This issue never appeared in the buider builds cause I guess it is compiling blender with gcc version 7. It will appear when you'll update to gcc version 8 or even the latest 9.

This issue never appeared in the buider builds cause I guess it is compiling blender with gcc version 7. It will appear when you'll update to gcc version 8 or even the latest 9.
Member

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'
Member

Added subscriber: @Sergey

Added subscriber: @Sergey
Member

Blender uses GCC 7.1 for the official builds, I don't think can accept a report for compiler version that we don't recommend. I will leave this up to @Sergey or @brecht

Blender uses GCC 7.1 for the official builds, I don't think can accept a report for compiler version that we don't recommend. I will leave this up to @Sergey or @brecht
Author

Do whatever you have to do but I believe, someday, you will update the gcc version and this bug will occur. Just keep in mind ;)

Do whatever you have to do but I believe, someday, you will update the gcc version and this bug will occur. Just keep in mind ;)

Added subscriber: @mont29

Added subscriber: @mont29

We are using gcc7 for official builds to comply with LTS distros and OpenVFX platform. Does not mean we do not support more recent compilers (most devs actually use gcc 8 or 9 already I think).

Would not consider that as high priority issue currently, but still it's a valid issue to be investigated.

We are using gcc7 for official builds to comply with LTS distros and OpenVFX platform. Does not mean we do not support more recent compilers (most devs actually use gcc 8 or 9 already I think). Would not consider that as high priority issue currently, but still it's a valid issue to be investigated.

Added subscriber: @marcmat

Added subscriber: @marcmat

I did some tests with Blender 2.83, BMW demo:
OS: Debian 10 x86_64
CPU: Ryzen 5 1600AF
GPU: NVIDIA GTX-1660 driver 440.82 CUDA 10.1
Default compiler flags.

  • GCC-7.4: OK
  • GCC-10.1: OK
  • GCC-8.3: Very slow
  • GCC-8.3, WITH_CPU_SSE disabled:
    - CPU+GPU: OK (just a little slower)
    - CPU-only: single color (flat) image
  
I did some tests with Blender 2.83, BMW demo: OS: Debian 10 x86_64 CPU: Ryzen 5 1600AF GPU: NVIDIA GTX-1660 driver 440.82 CUDA 10.1 Default compiler flags. - GCC-7.4: OK - GCC-10.1: OK - GCC-8.3: Very slow - GCC-8.3, WITH_CPU_SSE disabled: - CPU+GPU: OK (just a little slower) - CPU-only: single color (flat) image ```

More tests with Blender 2.83, BMW demo:
OS: Debian Sid x86_64
CPU: Ryzen 5 1600AF
GPU: NVIDIA GTX-1660 driver 440.82 CUDA 10.1
Default compiler flags.

  • GCC-8.4: OK
  • GCC-9.3: OK
  • GCC-10.1: OK
More tests with Blender 2.83, BMW demo: OS: Debian Sid x86_64 CPU: Ryzen 5 1600AF GPU: NVIDIA GTX-1660 driver 440.82 CUDA 10.1 Default compiler flags. - GCC-8.4: OK - GCC-9.3: OK - GCC-10.1: OK

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
Brecht Van Lommel self-assigned this 2020-06-16 14:17:57 +02:00

@marcmat, thanks for the tests!

This seems like it was a bug / performance regressions in GCC 8.3 that is now fixed. I don't think it's worth trying to work around this in Blender anymore, to me this is resolved.

@marcmat, thanks for the tests! This seems like it was a bug / performance regressions in GCC 8.3 that is now fixed. I don't think it's worth trying to work around this in Blender anymore, to me this is resolved.
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
8 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#64894
No description provided.