(Question) Workload of OpenCL

  • 19 Replies
  • 510 Views

0 Members and 1 Guest are viewing this topic.

Offline Micha1982

  • *
  • Fractal Phenom
  • ****
  • Posts: 48
« on: April 07, 2018, 01:59:01 AM »
Hello, got a question regarding 'workload' of OpenCL: Months ago I rendered some "Flames" with a different software using Cuda and experienced that my graphiccard sounded like a vacuum cleaner after some minutes.

Atm I am rendering an animation in hd with 10000 frames with OpenCL with Mandelbulber and my graphiccard just sounds like "not in use"...is it because its "just" OpenCL and this could not utilize the gpu the same way as cuda? Or because OpenCL is not yet fully implemented in Mb?

What I want to point out is, is there maybe a possibility for you to utilize the gpu more anyhow?


Offline buddhi

  • *
  • Fractal Fruit Salad
  • *****
  • Posts: 65
    • Mandelbulber GitHub repository
« Reply #1 on: April 07, 2018, 08:30:08 AM »
How you analyzed the workload? Just by hearing cooling fan?
I don't know what software you used for rendering "flames", but it could utilize GPU in different way and constantly.

If you render animation GPU is not working constantly. There are short whiles when GPU is waiting for CPU actions. It happens e.g. when image is saved. Then GPU is cooling down.

If you really want to analyze real GPU utilization use dedicated tools for it. Even the latest Win10 version has this functionality in task manager.  Under Linux you can use nvidia-smi command

Offline Micha1982

  • *
  • Fractal Phenom
  • ****
  • Posts: 48
« Reply #2 on: April 07, 2018, 11:49:38 AM »
How you analyzed the workload? Just by hearing cooling fan?
Yes.  :yes:

Yes it was under constant load while rendering the flame-fractal-file (flam4cuda/Apophysis). And I see that there are short interrupts while rendering my job with Mandelbulber...but the interrupts are really very short.

Maybe I try to view the load later when doing my next rendering with software...but until now I only hear that its fan does not much/nothing.

Offline Micha1982

  • *
  • Fractal Phenom
  • ****
  • Posts: 48
« Reply #3 on: April 24, 2018, 10:58:16 PM »
Hm, the workload is as I assumed and my ears telling me...far from doing much.

It renders an animation in 1920x1080 actually,  it takes around 3 seconds every picture for rendering while I made this screenshot and ~0.1 second for SSAO and starting the next picture/writing 'OpenCl - rendering picture'.

I do not know much about the technical/programming background - but wouldnŽt it be possible to feed the gpu with 2 or more pictures at the same time for example to speed things up a bit and give the gpu a bit more to do?



When this job is done or tomorrow I do another test with 1 picture only, in a very high resolution, to see what difference it makes...


Offline Micha1982

  • *
  • Fractal Phenom
  • ****
  • Posts: 48
« Reply #4 on: April 25, 2018, 03:29:10 AM »
Another 2 tests:

Pic 2 is while rendering an almost empty picture in highres from my animation, heavily zoomed out and just a few menger-boxes in the middle...gpu-load is at 2-3% all the time (and I wonder a bit why I still need more than 3 minutes for it to finish),

Pic 1 is while rendering 'amazing surf multi 001' in highres - and this looks "as it should" (and takes around 40 minutes to finish).

However...it seems to heavily depend on what is being rendered.

Offline buddhi

  • *
  • Fractal Fruit Salad
  • *****
  • Posts: 65
    • Mandelbulber GitHub repository
« Reply #5 on: April 25, 2018, 07:21:38 PM »
It is something what can be expected. If you render "nothing" then proportion of GPU and CPU workload is bad. CPU always needs to exchange data with GPU,  refresh the image and run the UI. If you render image where GPU calculation time is much longer then this proportion is much better.

Offline buddhi

  • *
  • Fractal Fruit Salad
  • *****
  • Posts: 65
    • Mandelbulber GitHub repository
« Reply #6 on: April 25, 2018, 07:24:42 PM »
You wrote that you have rendered image from an animation. Now I'm wondering if displaying of animation patch do not slow down image refreshing. Have you tried to switch of this option?

Offline buddhi

  • *
  • Fractal Fruit Salad
  • *****
  • Posts: 65
    • Mandelbulber GitHub repository
« Reply #7 on: April 25, 2018, 08:24:28 PM »
Another thing. Which format do you use to save animation frames PNG or JPG? Saving of PNGs is very slow in compare to rendering by GPU. Try to use JPG format.

By the way I'm going to investigate what reduces GPU usage when there is rendered simple image (fast GPU computation) in high resolution.

Offline buddhi

  • *
  • Fractal Fruit Salad
  • *****
  • Posts: 65
    • Mandelbulber GitHub repository
« Reply #8 on: April 25, 2018, 10:01:41 PM »
I haven't realized about the scale of the problem. Thanks to your problem report I have looked more deeply into the code and I have found several bottle necks. It was possible to reduce rendering time of 12000x8000 mandelbulb from 60s to 20s (this fractal didn't load GPU so much). To achieve it I have optimized image refreshing.

Link to corrected development version fro testing: https://ci.appveyor.com/api/buildjobs/dpi1b2ay3skqio1d/artifacts/build-win%2FSetup%2FRelease%2Fx64%2FMandelbulber2-v2.13.2.0-Setup.exe
« Last Edit: April 25, 2018, 10:32:54 PM by buddhi »

Offline Micha1982

  • *
  • Fractal Phenom
  • ****
  • Posts: 48
« Reply #9 on: May 01, 2018, 01:48:14 AM »
Thanks, just installed it and trying around.
Fast-relaxed math compared to normal does not make any difference in my dancing-boxes-fractal, but
in general I would say this version is around 2x as fast as before in this fractal. Complete animation took around 3-4 hours before, now it says 1,5 hours....wow. Is this speedup all caused by "MarkRenderedTiles"? Definately let it turned off.


The picture I attach is a comparison to reply #3 in this thread, I forgot which frames I rendered there exactly but it should be the same setting. GPU-load is still not full in usage, but as said, this version seems to be much faster at all.

IŽll play around a bit more now with this version...really looking forward to the next update :)

Btw, I save my pictures in jpeg.
« Last Edit: May 01, 2018, 01:59:23 AM by Micha1982 »

Offline Micha1982

  • *
  • Fractal Phenom
  • ****
  • Posts: 48
« Reply #10 on: May 01, 2018, 08:46:18 PM »
Even this version is much quicker than before, here I add a picture made while rendering my "Bombardinho"-animation in 1920x1080.
It shows that Gpu-usage goes up to around ~50%.

Just a thought, IŽve read in another forum regarding gpu-utilization "Hi, did you use big tiles for render?
OpenCL like it, try one tile for example.
"
and its seen in Mandelbulber that every screen also is rendered in tiles -
would it maybe be possible to make the tile-size changeable as an option in Mandelbulber (maybe in animation-dock, on/off or something like that)? Or is that hard to code? On single/large pictures it maybe is interesting how it reveals and gets visible...but for an animation speed possibly is more important.

Would it make a difference maybe if the tile-size in Mandelbulber gets increased, do you have any experiences? On what does the actual tilesize depend? The comment sounds interesting, maybe then the gpu got a bit more to do and rendering maybe gets faster...just a thought, maybe worth a test / benchmark. Will a larger tilesize have a disatvantage I do not see at the moment?

Edit: Or is it maybe possible to parallelise something in the code/tiles maybe? However, the more I read about tiling in OpenCL the more complicated this seems to be to me :D And I do not have the knowledge what exactly happens in Mandelbulber/OpenCL-rendering exactly or how this all is being done. Just a few thoughts, the only thing I see is that the gpu is being able to do more in many cases...the question is "just" how...
« Last Edit: May 03, 2018, 05:06:04 PM by Micha1982 »

Offline buddhi

  • *
  • Fractal Fruit Salad
  • *****
  • Posts: 65
    • Mandelbulber GitHub repository
« Reply #11 on: May 05, 2018, 12:28:27 PM »
I cannot get as bad results as you. Can you send me your mandelbulber/mandelbulber_213.ini file and setting file where you see bad performance?

Offline Micha1982

  • *
  • Fractal Phenom
  • ****
  • Posts: 48
« Reply #12 on: May 05, 2018, 05:08:59 PM »
Sure, the .ini I attach is copied while my Bombardinho-fractal was opened (in general only a slightly modified Menger_smooth_Mod1.fract from the examplefiles and with added AnimBySound).

The last picture above was taken while it rendered an animation in 1920x1080.


IŽll do some more tests now and watch the gpu-load a bit more in different other fractals...the ones before were all "simple" Menger-cubes...

Offline Micha1982

  • *
  • Fractal Phenom
  • ****
  • Posts: 48
« Reply #13 on: May 05, 2018, 07:19:49 PM »
Seems I have chosen the "best" fractals for my previous screenshots...these here all looks a bit better...still many situations where gpu is far from fully in usage, but much better than the ones in my musicvideos.

IŽve just opened some examples and added some little movements to the Animdock and rendered them in 1920x1080.
« Last Edit: May 05, 2018, 07:34:34 PM by Micha1982 »

Offline buddhi

  • *
  • Fractal Fruit Salad
  • *****
  • Posts: 65
    • Mandelbulber GitHub repository
« Reply #14 on: May 06, 2018, 02:09:11 PM »
First thing what I have found that the worst are images where is used DOF effect. But this something what can be expected, because a lot of computation for this effect can be done only by CPU (sorting and randomizing of z-buffer). This effect uses a lot of memory processing which also reduces GPU load (there is visible higher Memory Controller Load and Bus Interface Load)

By the way the latest version (updated today) has more optimizations.


xx
"Time Span"

Started by cricke49 on Fractal Image Gallery

0 Replies
57 Views
Last post August 02, 2018, 07:05:21 AM
by cricke49
xx
Birdie Style

Started by gannjondal on Fractal Image Gallery

1 Replies
145 Views
Last post May 08, 2018, 02:39:37 PM
by who8mypnuts
xx
Greetings... I have a question! :D

Started by vrana on Meet & Greet

5 Replies
266 Views
Last post March 02, 2018, 10:20:36 PM
by vrana
xx
Tiling question

Started by TofaraMoyo on Fractal Mathematics And New Theories

10 Replies
393 Views
Last post May 05, 2018, 11:32:49 AM
by TGlad
xx
Question about usage in general

Started by Xerilon on Mandelbulb3d

11 Replies
459 Views
Last post August 01, 2018, 04:44:11 AM
by Kalter Rauch