AMD Threadripper not working well with Blender #53068

Closed
opened 2017-10-14 16:22:15 +02:00 by rob · 46 comments

AMD threadripper 1950x
X399 AORUS Gaming 7 motherboard
64 gb Ram

Running latest chipset drivers + up to date bios

Windows 10 64 bit running on gtx 970 GPU

**Blender Version 2.79
Broken: 5bd8ac9

rendering large scene takes hours before render proces starts

To reproduce this problem, you need to load a large scene like the production demo scene from the blender benchmark. If you use the default performance settings it will take more time then rendering the scene with a low amount of threads.
the difference is huge. Default settings ( 32 threads) can slow down the rendering proces with 2 hours. Using 4 threads only takes minutes.

The more RAM a scene has, the more problematic this issue is. The difference in the production benchmark is 2 vs 7 minutes. The benchmark scene is +/- 10 GB Ram. If i render a scene with 30 GB ram it is 4 minutes vs 2 hours

AMD threadripper 1950x X399 AORUS Gaming 7 motherboard 64 gb Ram Running latest chipset drivers + up to date bios Windows 10 64 bit running on gtx 970 GPU **Blender Version 2.79 Broken: 5bd8ac9 **rendering large scene takes hours before render proces starts** To reproduce this problem, you need to load a large scene like the production demo scene from the blender benchmark. If you use the default performance settings it will take more time then rendering the scene with a low amount of threads. the difference is huge. Default settings ( 32 threads) can slow down the rendering proces with 2 hours. Using 4 threads only takes minutes. The more RAM a scene has, the more problematic this issue is. The difference in the production benchmark is 2 vs 7 minutes. The benchmark scene is +/- 10 GB Ram. If i render a scene with 30 GB ram it is 4 minutes vs 2 hours
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @RobTuytel

Added subscriber: @RobTuytel
rob changed title from Threadripper not working well with Blender to AMD Threadripper not working well with Blender 2017-10-14 16:23:08 +02:00

Added subscriber: @FloridaJo

Added subscriber: @FloridaJo

Hello Rob.
Can you go to this page and follow the instructions for installing the Microsoft Process Explorer
to better show the threads running during that process?

https://superuser.com/questions/462969/how-can-i-view-the-active-threads-of-a-running-program

Hello Rob. Can you go to this page and follow the instructions for installing the Microsoft Process Explorer to better show the threads running during that process? https://superuser.com/questions/462969/how-can-i-view-the-active-threads-of-a-running-program
Author

I created a video including microsoft Process Explorer.

if you need more details, let me know. : https://www.youtube.com/watch?v=DWyLEBmS8t8&feature=youtu.be

I created a video including microsoft Process Explorer. if you need more details, let me know. : https://www.youtube.com/watch?v=DWyLEBmS8t8&feature=youtu.be

Added subscriber: @brecht

Added subscriber: @brecht

Which parts of the render are slow? The video shows just the synchronizing objects stage, is BVH build slow too, and path tracing?

In the video I think it's the OpenMP threads doing a lot of the work. To determine if that's the problem specifically, you can run Blender from the command line with OpenMP threads disabled or reduced, and see if that helps:

cd c:\<blender installation directory>
set OMP_NUM_THREADS=1
blender
Which parts of the render are slow? The video shows just the synchronizing objects stage, is BVH build slow too, and path tracing? In the video I think it's the OpenMP threads doing a lot of the work. To determine if that's the problem specifically, you can run Blender from the [command line ](https://docs.blender.org/manual/en/dev/render/workflows/command_line.html) with OpenMP threads disabled or reduced, and see if that helps: ``` cd c:\<blender installation directory> set OMP_NUM_THREADS=1 blender ```
Author

In #53068#465673, @brecht wrote:
Which parts of the render are slow? The video shows just the synchronizing objects stage, is BVH build slow too, and path tracing?

At this point in the video the synchronizing objects stage slows down and takes around 2 hours before it starts with the BVH and path tracing.
The BVH and path tracing runs fine, even with the 32 threads.

In the video I think it's the OpenMP threads doing a lot of the work. To determine if >that's the problem specifically, you can run Blender from the command line with >OpenMP threads disabled or reduced, and see if that helps:

Did not work, still freezing. I included a new video to show the difference if i reduce the threads to 4: https://youtu.be/vUe1IXLb7Uk

> In #53068#465673, @brecht wrote: > Which parts of the render are slow? The video shows just the synchronizing objects stage, is BVH build slow too, and path tracing? > > ``` At this point in the video the synchronizing objects stage slows down and takes around 2 hours before it starts with the BVH and path tracing. The BVH and path tracing runs fine, even with the 32 threads. >>In the video I think it's the OpenMP threads doing a lot of the work. To determine if >that's the problem specifically, you can run Blender from the command line with >OpenMP threads disabled or reduced, and see if that helps: Did not work, still freezing. I included a new video to show the difference if i reduce the threads to 4: https://youtu.be/vUe1IXLb7Uk

Added subscriber: @SteffenD

Added subscriber: @SteffenD

It doesn't look like it's the CPU.
You may want to see if it is a GPU bottleneck.
GPUview is the tool for that, a description of it is here;
https://graphics.stanford.edu/~mdfisher/GPUView.html

For SDK that has GPUview for Win10 is here:
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk

You want to make sure the Windows Performance Toolkit is checked on install.

It doesn't look like it's the CPU. You may want to see if it is a GPU bottleneck. GPUview is the tool for that, a description of it is here; https://graphics.stanford.edu/~mdfisher/GPUView.html For SDK that has GPUview for Win10 is here: https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk You want to make sure the Windows Performance Toolkit is checked on install.

@FloridaJo, the GPU is not involved in the synchronizing objects stage, so I doubt it's causing issues here.

The Cycles side of synchronizing objects is single threaded, so not so likely to cause the issue by itself. It would be useful to test if the same issue happens when rendering with Blender Render. There's various modifiers using multithreading, using either the task scheduler or OpenMP. I still suspect subsurf using OpenMP the most, but OMP_NUM_THREADS should have affected that.

@FloridaJo, the GPU is not involved in the synchronizing objects stage, so I doubt it's causing issues here. The Cycles side of synchronizing objects is single threaded, so not so likely to cause the issue by itself. It would be useful to test if the same issue happens when rendering with Blender Render. There's various modifiers using multithreading, using either the task scheduler or OpenMP. I still suspect subsurf using OpenMP the most, but `OMP_NUM_THREADS` should have affected that.
Author

Intresting result when doing a blender internal benchmark test. I used an 11 GB ram scene on my 4770K and threadripper workstations.

When pre processing the scene, the threadripper is equal with the 4770K. As aspected, the threadripper renders faster as well. Seems like there is no issue with the internal render engine.

When using cycles benchmark scenes, the threadripper is always slower when pre processing the scene. Not only slower, it freezes the whole system for a long time. This only counts for large scenes. Under 10 gb ram it is almost not causing issues

I can make a full lengt comparison video to show the difference in systems if you want.

Intresting result when doing a blender internal benchmark test. I used an 11 GB ram scene on my 4770K and threadripper workstations. When pre processing the scene, the threadripper is equal with the 4770K. As aspected, the threadripper renders faster as well. Seems like there is no issue with the internal render engine. When using cycles benchmark scenes, the threadripper is always slower when pre processing the scene. Not only slower, it freezes the whole system for a long time. This only counts for large scenes. Under 10 gb ram it is almost not causing issues I can make a full lengt comparison video to show the difference in systems if you want.

@brecht I'm not sure he did the OpenMP test as you described.
The video showed him changing threads in the UI as opposed to a command line command. Is that the same?
Rob, can you verify that you ran this in command line?

cd c:\<blender installation directory>
set OMP_NUM_THREADS=1
blender
@brecht I'm not sure he did the OpenMP test as you described. The video showed him changing threads in the UI as opposed to a command line command. Is that the same? Rob, can you verify that you ran this in command line? ``` cd c:\<blender installation directory> set OMP_NUM_THREADS=1 blender ```
Author

In #53068#465962, @FloridaJo wrote:
@brecht I'm not sure he did the OpenMP test as you described.
The video showed him changing threads in the UI as opposed to a command line command. Is that the same?
Rob, can you verify that you ran this in command line?

cd c:\<blender installation directory>
set OMP_NUM_THREADS=1
blender

The latest video was a comparison between 4 and 32 threads. I tried the console boot, but no difference.

Here a video: https://youtu.be/0Cp6WwREWwA

> In #53068#465962, @FloridaJo wrote: > @brecht I'm not sure he did the OpenMP test as you described. > The video showed him changing threads in the UI as opposed to a command line command. Is that the same? > Rob, can you verify that you ran this in command line? > > > ``` > cd c:\<blender installation directory> > set OMP_NUM_THREADS=1 > blender > ``` The latest video was a comparison between 4 and 32 threads. I tried the console boot, but no difference. Here a video: https://youtu.be/0Cp6WwREWwA

@RobTuytel Okay, gotcha.

@RobTuytel Okay, gotcha.

Added subscriber: @candreacchio

Added subscriber: @candreacchio

Does it work if you unpack the textures first?

Does it work if you unpack the textures first?
Author

The first time i tried to render the scene was unpacked. After hanging for hours i started using all the benchmark files on the blender website and comparing this with my intel system. On this point i saw a significant difference between the threadripper and my intel sytem. Not on the small ones like the BMW, classroom, but the production benchmark and my own scenes. In my opinion most of the threadripper tests where done on these scenes, and not large scale RAM scenes.

The first time i tried to render the scene was unpacked. After hanging for hours i started using all the benchmark files on the blender website and comparing this with my intel system. On this point i saw a significant difference between the threadripper and my intel sytem. Not on the small ones like the BMW, classroom, but the production benchmark and my own scenes. In my opinion most of the threadripper tests where done on these scenes, and not large scale RAM scenes.

Added subscriber: @Sergey

Added subscriber: @Sergey

@Sergey, is there a machine with a CPU like this in the Blender Institute?

@Sergey, is there a machine with a CPU like this in the Blender Institute?

@brecht, we don't have threadripper at the studio, only Ryzen 7 1800X.

Some other questions / ideas to troubleshoot the issue:

  • Make sure all Windows updates are installed.
  • Disable any possible power saving setting in BIOS.
  • Disable any possible power saving settings in Windows itself.
  • Disable HyperThreading.
  • Check whether Blender detects proper number of CPU threads.
  • Get Ubuntu LiveCD and see if there will be a performance issue on Linux.
@brecht, we don't have threadripper at the studio, only Ryzen 7 1800X. Some other questions / ideas to troubleshoot the issue: - Make sure all Windows updates are installed. - Disable any possible power saving setting in BIOS. - Disable any possible power saving settings in Windows itself. - Disable HyperThreading. - Check whether Blender detects proper number of CPU threads. - Get Ubuntu LiveCD and see if there will be a performance issue on Linux.
Author

In #53068#466102, @Sergey wrote:
@brecht, we don't have threadripper at the studio, only Ryzen 7 1800X.

Some other questions / ideas to troubleshoot the issue:

  • Make sure all Windows updates are installed.
  • Disable any possible power saving setting in BIOS.
  • Disable any possible power saving settings in Windows itself.
  • Disable HyperThreading.
  • Check whether Blender detects proper number of CPU threads.
  • Get Ubuntu LiveCD and see if there will be a performance issue on Linux.

I checked all of them, only the Ubuntu option left. However, i can provide the studio with a threadripper system for trial & error, just let me know.

I included a benchmark test, http://www.userbenchmark.com/UserRun/5496362 still trying to figure out what is wrong

> In #53068#466102, @Sergey wrote: > @brecht, we don't have threadripper at the studio, only Ryzen 7 1800X. > > Some other questions / ideas to troubleshoot the issue: > > - Make sure all Windows updates are installed. > - Disable any possible power saving setting in BIOS. > - Disable any possible power saving settings in Windows itself. > - Disable HyperThreading. > - Check whether Blender detects proper number of CPU threads. > - Get Ubuntu LiveCD and see if there will be a performance issue on Linux. I checked all of them, only the Ubuntu option left. However, i can provide the studio with a threadripper system for trial & error, just let me know. I included a benchmark test, http://www.userbenchmark.com/UserRun/5496362 still trying to figure out what is wrong
Member

Added subscriber: @Ton

Added subscriber: @Ton
Member

AMD was meant to send us (Blender Institute) a threadripper in July already. I reminded them again what happens with it.

Loaning us your system I wouldn't recommend. Not only because we can't immediately work on it (might take weeks or a month), but also because we probably want to install fresh OS'es on it.

Brecht and Sergey are both on the conference this week. Maybe it's fun to bring the system to the new "hackerspace" room there, and check of if someone has time to investigate it.

AMD was meant to send us (Blender Institute) a threadripper in July already. I reminded them again what happens with it. Loaning us your system I wouldn't recommend. Not only because we can't immediately work on it (might take weeks or a month), but also because we probably want to install fresh OS'es on it. Brecht and Sergey are both on the conference this week. Maybe it's fun to bring the system to the new "hackerspace" room there, and check of if someone has time to investigate it.

Right, I'd be happy to debug it at bconf. Remote desktop access would work as well at some other time.

Right, I'd be happy to debug it at bconf. Remote desktop access would work as well at some other time.
Member

We've just received a beefy system with Threadripper! Testing started :)

We've just received a beefy system with Threadripper! Testing started :)
Author

So nice!, now burn the CPU with some crazy scenes to find out if there is something wrong with scene buffering.

So nice!, now burn the CPU with some crazy scenes to find out if there is something wrong with scene buffering.
Member

All our standard benchmark files survive. Performance is good. We don't have time now to restore or test production files.
It would go much faster if you would share a case, or tell us how to produce a case that's slow? Use one of the benchmark files, duplicate stuff or so?

All our standard benchmark files survive. Performance is good. We don't have time now to restore or test production files. It would go much faster if you would share a case, or tell us how to produce a case that's slow? Use one of the benchmark files, duplicate stuff or so?

Added subscriber: @rob

Added subscriber: @rob

Managed to redo system becoming frozen at some point during synchronization after BIOS update.

Currently suspecting SpinLock to cause this. Experimented with alternative SpinLock implementation and it seems to solve the issue to me.

@rob, please do the following:

  1. Download ftp://ftp.blender.org/sergey/threadreaper/blender-master-spin_lock-experiment.zip
  2. Unpack it
  3. Try rendering using blender-orig.exe (this is unmodified version of current master, just to confirm that the issue happens for you using my builds -- this build is done by a newer MSVC than the official releases, so that might matter)
  4. After that try using blender-fix.exe and see if that solves any performance issues.

Note that there is no CUDA support in this builds.

EDIT @rob, did you check whether you've got same freezes when rendering from Linux LiveCD?

Managed to redo system becoming frozen at some point during synchronization after BIOS update. Currently suspecting SpinLock to cause this. Experimented with alternative SpinLock implementation and it seems to solve the issue to me. @rob, please do the following: 1. Download ftp://ftp.blender.org/sergey/threadreaper/blender-master-spin_lock-experiment.zip 2. Unpack it 3. Try rendering using `blender-orig.exe` (this is unmodified version of current master, just to confirm that the issue happens for you using my builds -- this build is done by a newer MSVC than the official releases, so that might matter) 4. After that try using `blender-fix.exe` and see if that solves any performance issues. Note that there is no CUDA support in this builds. **EDIT** @rob, did you check whether you've got same freezes when rendering from Linux LiveCD?

Setting priority to incomplete since we are awaiting more feedback now.

Setting priority to incomplete since we are awaiting more feedback now.

@Sergey wrong Rob, try @RobTuytel

@Sergey wrong Rob, try @RobTuytel

Added subscriber: @intrah

Added subscriber: @intrah
Author

I can confirm this fix works!
Thanks a lot for solving this problem.

I can confirm this fix works! Thanks a lot for solving this problem.
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

In #53068#470644, @RobTuytel wrote:
I can confirm this fix works!
Thanks a lot for solving this problem.

@Sergey gave two fixes can you say which one fixed the issue?

> In #53068#470644, @RobTuytel wrote: > I can confirm this fix works! > Thanks a lot for solving this problem. @Sergey gave two fixes can you say which one fixed the issue?
Author

Blender-fix solved the issue

Blender-fix solved the issue

This issue was referenced by 55696b56d9

This issue was referenced by 55696b56d98411b6eeadfa1a7349bdb2bca47e38

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscriber: @VincentMarini

Added subscriber: @VincentMarini

@Sergey

Great job identifying the problem and handling it. I can also confirm this works.

Unfortunately there is a handle leak somewhere in there.

I've taken to restarting my threadrippers every 12 hours or so to clear out the handles, but if you could fix this too that would be awesome.

Thank you so much for what you've already done.

@Sergey Great job identifying the problem and handling it. I can also confirm this works. Unfortunately there is a handle leak somewhere in there. I've taken to restarting my threadrippers every 12 hours or so to clear out the handles, but if you could fix this too that would be awesome. Thank you so much for what you've already done.

Removed subscriber: @intrah

Removed subscriber: @intrah
Member

Please report a new bug report

Please report a new bug report

Strike that. CPUID and AMD Ryzen Master were running at the same time. Without them it maintains about 47,500 handles for hours. My bad.

Strike that. CPUID and AMD Ryzen Master were running at the same time. Without them it maintains about 47,500 handles for hours. My bad.

Added subscriber: @MknowlesNC

Added subscriber: @MknowlesNC

Is there any other way to get blender-fix.exe other than FTP. I tried that but I apparently don't have credentials.

I have a threadripper 3970 and Blender runs very sluggish with large models 3M+ verts. Just panning, zooming, etc. Not much different than my old PC with an intel i7 processor (8 years old). Rendering is fine... very fast. Probably due to the Nvidia 3090.

Thank you!

Is there any other way to get blender-fix.exe other than FTP. I tried that but I apparently don't have credentials. I have a threadripper 3970 and Blender runs very sluggish with large models 3M+ verts. Just panning, zooming, etc. Not much different than my old PC with an intel i7 processor (8 years old). Rendering is fine... very fast. Probably due to the Nvidia 3090. Thank you!
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
Asset Browser Project
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
12 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#53068
No description provided.