Hybrid rendering problem and solution:
I've just tested out the latest 2.79 daily build so I could try the out of core rendering and the hybrid rendering (cpu and gpu at the same time). It's great but there's one problem, the GPU had done all it's tiles at 10 minutes, but then the render didn't finish for another 9 minutes due to having to wait for the CPU to finish the final tile. Changing to a smaller tile size didn't help much, because it slowed the GPU down when out of core.
Here are some results showing how the latest daily build compared to 2.79b:
2.79b (textures limited to 1k)
GPU only (wouldn't render, out of ram cuda error).
CPU only 45 mins.
2.79 daily (No texture limiting)
CPU + GPU. tile size 240 x 216 = 18 min 48 seconds
CPU + GPU tile size 32 x 32 = 14 min 17 seconds
GPU only = 11 min 19 seconds
To make the hybrid mode faster than GPU only, the devs should make it possible to assign different tile sizes for the CPU and GPU (so both are as efficient as possible, particularly when out of core), and also have the GPU take over from the CPU when there are no more tiles left for the GPU to do.
I think with the above options, we could have had a result of:
CPU + GPU, cpu tile size 32 x 32, GPU tile size 240 x 216, GPU last tile takeover enabled = render time 8 minutes.
By last tile takeover, I mean once the GPU has run out of tiles to do, then stop the cpu rendering and let the GPU take care of the last bit (even if it has to re-render what the cpu had already begun).
7 Comments
In newest builds GPU runs fast even on small tiles, so the problem - while is still there - is way less prominent.
* @ Lsscpp * The results above are with the latest builds unfortunately.
* @tibbyninja * You should do the comparison with ONLY gpu big tiles, then ONLY gpu small tiles. Unless there was some regression, rendertimes should approx match. Anyway, the last tiles takeover is a good idea, even if there should be smarter way to speed last cpu tiles (tiles subdivision maybe?)
* @ Lsscpp * well I guess tiles subdivision is what i'm talking about, cpu get smaller tiles and gpu gets larger ones. I'll double check the render times on gpu alone with large and small tiles.
actually, just trying in 2.8 and it does seem that the tile size makes much less difference now. Must have just been the 2.79 daily build I was using that wasnt yet optimized.
* @tibbyninja * Ok , so I've tested on a scene that needs out of core rendering, and a scene that doesnt. The one that needs to go out of core is much slower with both cpu and gpu rendering compared to just GPU.
A scene that doesnt need to go out of core is actually faster when using both cpu and gpu.
I guess this is because when it needs to go out of core, the cpu needs to be available to send data to the GPU during rendering, but if the cpu is tied up rendering, then it cant send data to the gpu.....leaving the gpu doing much less than it could be doing.
I though perhaps if I limited the number of threads to 4 rather than 8, then the cpu might have sufficient capacity to keep the gpu rendering at full speed. It seems if you lower the thread count though, the GPU doesnt get used at all, and all threads are cpu only.
If this is the case, then I guess a resolution would be to always assign 1 thread to each gpu before giving the remaining specified threads to the cpu?
It looks more like parallel rendering, not hybrid. I am sure, system will be optimized many times, so just do not hurry.