Logo by Tglad - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. April 20, 2024, 04:15:57 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Slower render than necessary  (Read 1873 times)
0 Members and 1 Guest are viewing this topic.
Dinkydau
Fractal Senior
******
Posts: 1616



WWW
« on: February 24, 2017, 03:20:12 AM »

I have noticed 2 ways in which Kalles Fraktaler can be found to be rendering much slower than it actually can. I don't know the causes and I don't know whether these are related.

The first is that something is taking up a lot of time when doing renders at a resolution close to the maximum. After the first reference point there are very long periods when the program uses the full capacity of one CPU core. Could it be the series approximation taking much longer with large images? I would guess it's not the reference calculation because that's multithreaded. I was also thinking of image resizing code. The zoom-in animation is slow on my computer when I use a resolution larger than the default 640×360. I can imagine, if similar code is used to display the render in progress, it taking a very long time at a resolution that is 2330 times larger than default.

The second problem happens at large depths (say, E3000+, but that's just a guess). It has happened a few times that the first rendered pixels started to appear and it was so slow I could see them appear in groups of maybe 12. After restarting the program the rendering is a lot faster. I couldn't get the rendering to be faster again without restarting the program. Thus far, each time it happened, it was after I did the following: I make use of Newton-Raphson zooming and I let it zoom to the minibrot. When the first reference is computed, I select "reuse reference" and set the zoom depth to what I want it to be manually. Then I can use the same reference to zoom in and out and find the morphing I want. Ideally it's at 0.75*(minibrot_depth) but sometimes it's not. Something that may be relevant is that I use hibernate. Especially at large depths, I may hibernate and restart my computer several times during the Newton-Raphson zooming.
Logged

quaz0r
Fractal Molossus
**
Posts: 652



« Reply #1 on: February 24, 2017, 03:34:25 AM »

i think kalle ties the number of series terms used to the resolution, increasing the terms with increased resolution.  i doubt there really is any good heuristic you could come up with to make that behavior optimal in all cases.  is that behavior able to be overridden / configured ?  i suspect overall it is a misguided approach
Logged
Dinkydau
Fractal Senior
******
Posts: 1616



WWW
« Reply #2 on: February 24, 2017, 07:25:29 AM »

You're right. "Auto approximation terms" can be disabled and the number of terms can be set. I may have forgotten that when I attempted the large render.
Logged

Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #3 on: February 24, 2017, 01:45:46 PM »

Yes, first issue is that series approximation is using more terms for higher resolution.
I didn't limited it to a reasonable maximum though...

Second issue I don't know. I guess you've done like that many times without problem, or does it get slow every time you do like that?
I tried it but couldn't see any difference myself...
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #4 on: February 24, 2017, 04:52:36 PM »

Effectively often kalles gets very slow in some spots. I found that it happens often when the images are closer to the bulb or in some elephant valley locations while the classic "antenna" is almost always super fast.
Logged

No sweat, guardian of wisdom!
quaz0r
Fractal Molossus
**
Posts: 652



« Reply #5 on: February 24, 2017, 05:01:21 PM »

Effectively often kalles gets very slow in some spots. I found that it happens often when the images are closer to the bulb or in some elephant valley locations while the classic "antenna" is almost always super fast.

thats just the mandelbrot set  afro
Logged
Dinkydau
Fractal Senior
******
Posts: 1616



WWW
« Reply #6 on: February 24, 2017, 06:45:25 PM »

Yes, first issue is that series approximation is using more terms for higher resolution.
I didn't limited it to a reasonable maximum though...

Second issue I don't know. I guess you've done like that many times without problem, or does it get slow every time you do like that?
I tried it but couldn't see any difference myself...
It doesn't happen every time, just some of the time. Unfortunately I don't know how to reproduce the problem. Maybe it happens at shallow locations too but it's just not noticeable there. I will let you know if I find something.
Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #7 on: February 25, 2017, 04:24:09 PM »

thats just the mandelbrot set  afro
laugh No, No, No...
Logged

No sweat, guardian of wisdom!
Dinkydau
Fractal Senior
******
Posts: 1616



WWW
« Reply #8 on: March 14, 2017, 02:15:41 AM »

You're right. "Auto approximation terms" can be disabled and the number of terms can be set. I may have forgotten that when I attempted the large render.
Coming back to mention this wasn't it after all. It's also hard to say whether there's progress or not because the reference count is unreadable due to there being too much text in the field (probably because of the 4-digit exponent in the depth).

I'm currently doing a render. The first reference was computed and all the pixels were computed, some of them glitches. It's stuck somewhere between that and where it would start using the next reference to solve glitches. I just noticed the CPU usage drops to close to, but not quite, 0% (0,07-0,12% and I have 6 cores and 12 threads) when the program is minimized.
« Last Edit: March 14, 2017, 02:38:09 AM by Dinkydau » Logged

Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #9 on: March 14, 2017, 05:07:24 PM »

Coming back to mention this wasn't it after all. It's also hard to say whether there's progress or not because the reference count is unreadable due to there being too much text in the field (probably because of the 4-digit exponent in the depth).

I'm currently doing a render. The first reference was computed and all the pixels were computed, some of them glitches. It's stuck somewhere between that and where it would start using the next reference to solve glitches. I just noticed the CPU usage drops to close to, but not quite, 0% (0,07-0,12% and I have 6 cores and 12 threads) when the program is minimized.
Oh, I think there is a problem with saving jpeg when the window is minimized, can it be that?
Someone wrote that to me long ago but I haven't remembered having a look at it...
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
Dinkydau
Fractal Senior
******
Posts: 1616



WWW
« Reply #10 on: March 14, 2017, 09:25:01 PM »

That seems unlikely to me because I'm not trying to save a JPEG - it's a problem that affects the rendering - but who knows the problems may be related. I also tried Claude's build and it crashes at this stage. I didn't have enough RAM to keep both processes so I'm now trying it again with the normal kalles fraktaler 2.11.1.

I have attached the parameter file that I'm trying to make a render of. This is what I do:
1. Open kalles fraktaler;
2. Set the window to 1000×1000;
3. Open Iterations window and set Bailout=2, uncheck both "Approximation low tolerance" and "Auto approximation terms", set Approximation terms to 66, click OK;
4. Open Set image size window and set Width to 23160 (which automatically sets Height to 23160 as well);
5. Wait for the render to finish. I might minimize the window a few times.

* Evolutie_benaderende_rijtjes_E3022_centered.kfr (16.37 KB - downloaded 56 times.)
« Last Edit: March 14, 2017, 09:36:29 PM by Dinkydau » Logged

claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #11 on: March 15, 2017, 04:33:25 PM »

I also tried Claude's build and it crashes at this stage.

Maybe I should upload a debug build without symbols having been stripped - it's much bigger but if you know how to use a debugger it could help find the problem?


I tried to reproduce, but ran into a separate (?) issue - WINE doesn't allow bitmaps more than 128MB (aargh!), which means the maximum size is around 7723x4344 (16:9) or 5792x5792 (1:1):

https://source.winehq.org/source/dlls/gdi32/bitmap.c#0197

Then KF doesn't check the return values of the bitmap creations, which eventually leads to memory corruption/crash if it fails:

https://code.mathr.co.uk/kalles-fraktaler-2/blob/refs/heads/master:/fraktal_sft/fraktal_sft.cpp#l8704


Another issue that might happen with huge images is a couple of cache-smashing loops, that will perform very badly (the 23160x23160 meant KF needed more RAM than I have, so it was thrashing the hard disk with swapping pages ot disk and back again, with low CPU usage):

https://code.mathr.co.uk/kalles-fraktaler-2/commitdiff/9deda85f56fb939b28d1485d5c4ae0d2cb8ce838
Logged
Dinkydau
Fractal Senior
******
Posts: 1616



WWW
« Reply #12 on: March 16, 2017, 03:05:07 AM »

Bitmap size should not be the issue on windows I think. 23160×23160 is just below the maximum of 2^29 pixels (although I can't easily find a source that confirms this). It's a resolution that works in Mandel Machine at least. I have more than enough RAM. Cache - I don't know.

I'm currently rendering 4 tiles of 16000×16000 and that seems to work fine.

Maybe I should upload a debug build without symbols having been stripped - it's much bigger but if you know how to use a debugger it could help find the problem?
I haven't used one before.
Logged

Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Pause render, save project and continue render from the same spot, possible? Mandelbulb 3d dissolvingstudios 5 7940 Last post January 25, 2012, 06:33:32 AM
by taurus
1.82 rendering 3 times slower then 1.76? bug reporting schizo 2 1238 Last post November 08, 2012, 10:02:25 PM
by schizo
"Render Selection at render size" feature request PhotoComix 10 4188 Last post February 19, 2013, 02:15:21 PM
by taurus
Faster cycling slower spinn Movies Showcase (Rate My Movie) Kalles Fraktaler 2 1783 Last post October 01, 2013, 11:51:53 AM
by Kalles Fraktaler
Discrepancy between preview render and output render Mandelbulb 3d rurik2000 1 3005 Last post December 15, 2014, 06:37:08 PM
by Madman

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.274 seconds with 26 queries. (Pretty URLs adds 0.03s, 2q)