Weird behaviour... GPU faster than CPU when it should not...

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
juangea
Donor
Donor
Posts: 332
Joined: Thu Jan 02, 2020 6:23 pm

Weird behaviour... GPU faster than CPU when it should not...

Post by juangea »

So, here is the thing, the computer is this one:

CPU: 2990WX@3.5Ghz all cores - 32 cores/ 64 threads
GPU: GTX1080 FE Stock
RAM: 64Gb@3Ghz
Operating System: Linux Mint (ubuntu Base)

I'm getting a super weird performance with CPU.

This are the render tests:

This is OpenCL - CPU+GPU - Halt Condition 512 samples:
CPU+GPU-OpenCL.png
This is CPU only - Halt Condition 512 samples too:
CPU-Only.png
This is GPU only - Halt Condition 512 samples too:
GPUOnly-OpenCL.png
SO as you can see the CPU only, despite being quite faster than the GTX1080 is reaching 512 samples at a much lower speed than the GTX1080 alone, I don't understand anything.

Some ideas on what's happening?

Also notice the noise, it seems to be less noise in the CPU only render than in the GPU only render.

BTW the CPU threads are always 100% load in CPU or OpenCL-CPU+GPU.

Some insight of this would be very welcome to be able to level the render in a mixed farm CPU's only and CPU+GPU.

Thanks!
juangea
Donor
Donor
Posts: 332
Joined: Thu Jan 02, 2020 6:23 pm

Re: Weird behaviour... GPU faster than CPU when it should not...

Post by juangea »

I tried also using Noise threshold.

Weird results too.

Same noise threshold, the CPU is still faster than the CPU, but I get more noise from the GPU than from the CPU.

What's happening?

CPU only:
CPU_Only_NT.png
GPU Only:
GPU_Only_NT.png
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Weird behaviour... GPU faster than CPU when it should not...

Post by Dade »

juangea wrote: Mon Feb 10, 2020 6:49 pm I'm getting a super weird performance with CPU.
[...]
Same noise threshold, the CPU is still faster than the CPU, but I get more noise from the GPU than from the CPU.
Yes, I'm working on this as I'm doing some test on an 80 threads server in the last days and I have discovered a couple of problems. I'm writing the patches here: https://github.com/LuxCoreRender/LuxCor ... es_support (new_manycores_support branch)

Basically, you can not trust the reported samples count if you are running with many threads (and more threads you have and worse it is). The problem starts be noticeable around the 25+ threads.

For instance, you tell the CPU to stop at 512 samples per pixel but it will render more and stop later.

I should be able to merge the branch with v2.3beta in the next days with all the fixes.
Support LuxCoreRender project with salts and bounties
juangea
Donor
Donor
Posts: 332
Joined: Thu Jan 02, 2020 6:23 pm

Re: Weird behaviour... GPU faster than CPU when it should not...

Post by juangea »

Awesome, I'll be attentive to this commit to test it :)
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Weird behaviour... GPU faster than CPU when it should not...

Post by Dade »

juangea wrote: Mon Feb 10, 2020 7:44 pm Awesome, I'll be attentive to this commit to test it :)
I have merged the new code with the main branch and it is now included in the daily build.

This the result of the work on a dual socket Xeons with 40 cores and 80 threads (i.e. hyper-threading), kindly lend me by a company interested in using LuxCore:

Code: Select all

LuxCore-V2.2 Vs LuxCore-latest Vs Maxwell:

Server  1 thread =>    1x Vs    1x Vs    1x
Server 10 thread =>  8.5x Vs  8.8x Vs  8.8x
Server 20 thread =>   16x Vs 17.4x Vs 17.4x
Server 40 thread => 25.6x Vs   34x Vs 33.7x

With Hyper-threading:
Server 80 thread => 29.7x Vs 39.9x Vs 50.5x
So the latest LuxCore version is a lot faster than v2.2 (34x Vs 25.6x). It is also faster than Maxwell up to 40 threads (the number of server physical cores). LuxCore still seems to not like very much Intel Hyper-threading but I doubt I can do anything about it. It seems to work better with AMD Hyper-threading but I don't really have an high core count AMD CPU to check.

Juangea, can you check how does it work for you ?
Support LuxCoreRender project with salts and bounties
juangea
Donor
Donor
Posts: 332
Joined: Thu Jan 02, 2020 6:23 pm

Re: Weird behaviour... GPU faster than CPU when it should not...

Post by juangea »

Yes of course, I'll test it with the 2990WX, do you have some specific scene in mind?
I could do some simple tests compairing it with Cycles too.

But the values I see there are not comparable with the results I had with 2.3 from yesterday, I mean there as you improve cores you get some kind of improvement, but in my yesterday tests I went into negative performance, I mean:

16 threads: 6:00
64 threads: 6:40

So more threads less performance, that was a non sense and it's not represented by the numbers you have there from the 2.2 version.

Anyways I'll repeate the tests and tell you the outcome :)
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Weird behaviour... GPU faster than CPU when it should not...

Post by Dade »

juangea wrote: Tue Feb 11, 2020 5:11 pm But the values I see there are not comparable with the results I had with 2.3 from yesterday, I mean there as you improve cores you get some kind of improvement, but in my yesterday tests I went into negative performance, I mean:

16 threads: 6:00
64 threads: 6:40
Before the patch, LuxCore was rendering more samples than asked and more threads you had and worse the overshot was :!:
Support LuxCoreRender project with salts and bounties
juangea
Donor
Donor
Posts: 332
Joined: Thu Jan 02, 2020 6:23 pm

Re: Weird behaviour... GPU faster than CPU when it should not...

Post by juangea »

I get a crash in the 2990WX

Code: Select all

[LuxCore][262.403] PhotonGI building radiance photons BVH
Embree: Unknown error, (allocation is too large)
Writing: /x/Blender_TMP/DanishMood.crash.txt
Violación de segmento (`core' generado)
The JPG attached has the JPG extension just s it allows me to upload the txt file, just remove the .jpg extension to have the txt :)

EDIT: Ok, this error was becuse I had Embree enabled in the build, I get this error when I build Blender with Cycles_Embree enabled, I'm rebuilding it and I won`t get this crash for sure.

I'll post times when I have the test ready :)
juangea
Donor
Donor
Posts: 332
Joined: Thu Jan 02, 2020 6:23 pm

Re: Weird behaviour... GPU faster than CPU when it should not...

Post by juangea »

Ok, first test done and it looks very very good!

from 6:40 to 1:55!!!!
CPU_Only_ManyCores.png
LordOdin
Posts: 2
Joined: Tue Feb 11, 2020 7:55 pm

Re: Weird behaviour... GPU faster than CPU when it should not...

Post by LordOdin »

Running this on SARFIS (64 thread xeons) it managed to get the time from nearly 7 minutes to 2.5 minutes
image.jpg
image (1).jpg
Post Reply