Welcome to Fractal Forums

Fractal Software => General Discussion => Topic started by: paolo on October 18, 2010, 09:10:56 PM




Title: Hyper threading
Post by: paolo on October 18, 2010, 09:10:56 PM
 ;D  I am thinking of getting an Intel i7 machine with Hyperthreading. Does Hyperthreading speed up fractal rendering and by how much? How much does hyperthreading  speed up Ultra Fractal, Mandelbulber and Mandelbulb 3d? Thank you very much for your answers.


Title: Re: Hyper threading
Post by: bib on October 18, 2010, 09:53:54 PM
What I can tell you is that my i7 920 is at 100% with Mandelbulb3D, or Ultrafractal. So definitely a good investment. :)


Title: Re: Hyper threading
Post by: David Makin on October 19, 2010, 04:31:27 PM
The most important speed up is the number of cores - double the number of cores will essentially double your render speed.
Theoretically hyperthreading should make each core able to run two threads at full speed, thus doubling your render speed, but in practice double speed is never achieved, e.g. at a rough guess 2 cores hyperthreaded will be equivalent to 3 cores without hyperthreading rather than 4 although this may vary from one chipset to another (and upon the code being run).
Of course the most important aspect is that the software used actually supports multi-threading in the first place, Ultra Fractal does, and I think Mandelbulber and Mandelbulb 3D do too, probably also ChaosPro and Xenodream, I'm not sure about Apophysis (at least not all versions) or Chaoscope.
In Ultra Fractal you need to make sure that the "min threads" option is set to match your hardware - e.g. use 2 for 2 cores or 1 hyperthreaded core, 4 for 4 cores or 2 hyperthreaded cores etc.


Title: Re: Hyper threading
Post by: hobold on October 19, 2010, 06:55:04 PM
I am tempted to unload a metric ton of buzzwords to explain simultaneous multithreading (Hyperthreading is the trademarked name of Intel's implementations of the concept). But David has covered the one important point: Make sure that the software is multithreaded. If you can utilize all cores of the machine, it almost doesn't matter if those cores are real or virtual.

The actual benefit of simultaneous multithreading is impossible to quantify in general. This is because SMT improves utilization of functional units of a processor core. If a program is tuned really well, then a single thread can utilize the "critical" unit (i.e. the one that does the most important work for this particular application) to almost 100%. In that case, there is nothing that SMT can do to improve performance.

Fortunately :-), modern CPU cores are so complex that it is very hard to achieve full utilization. So SMT is usually a win. However, a whopping 200%, the theoretical limit, would be quite a miracle. Actual gains vary widely, and are usually in the range from 110% to 130%. In other words, you can realistically hope to turn your quadcore effectively into a pentacore, but that's about it.


Title: Re: Hyper threading
Post by: fractower on October 20, 2010, 07:17:17 AM
I am tempted to challenge Hobold to a buzzword duel, but only we would enjoy it. It would also not add to the discussion since I agree with his analysis. I can however provide data on core scaling.

In brief mandelbulber 0.90 linearly scales with number of cores (as DM stated). It actually is a little better than linear. This is usually attributed to parasitic demand prefetching. Basically if all cores are going to need a cacheline, only the first core pays the price of going to DRAM. All praise to the Buddhi because this does not happen by accident.

I cannot provide current measurements on hyperthreading. From previous experience I can say that highly parallel floating point code often sees a higher than average speedup. This is because the FP operations tend to involve data dependent chains of  long latency operations which use pipelined execution units. Thus multiple execution chains can overlap with minimal interference.

I am really interested in seeing more real data. Can someone out there who has a hyperthreaded processor try the experiment. You should be able to turn off hyperthreading in setup at boot time (only try this if you have another computer to go on line to figure out what you screwed up.) Time a series of standard renders with and without hyper threading.

Raw data: Mandelbulber 0.90. gcc-4.4, 2. dual chip quad core Zeon X5355 @ 2.66Ghz. Initial start Mandelbulb power 8 settings. Average render times in seconds.

   image     1 thread/chip    4 thread/chip  speedup/thread
 500x500          18s                     4s               1.125
  1kx1k             80s                    19s               1.05
  2kx2k            361s                   87s               1.04

It is interesting that the cost per pixel is going up with size.



Title: Re: Hyper threading
Post by: rickz65 on October 20, 2010, 08:29:07 AM
From my experiments with developing the multi-core calculation engine for many-fractals, I have observed that hyper-threading gives on average a 30% increase in speed, on a system using 1066 MHz DDR2. The same processor running in an older system with 400 MHz DDR, Hyper-threading has a more pronounced 'boost'. Hyper-threading was developed/implemented by Intel to make up for the time delay in fetching instructions and data from slow RAM. With the the Speed of modern DDR3 often being beyond what the integrated memory controllers 'normally' work with (meaning not over-clocked), I'm not really sure how much of a difference Hyper-threaded cores will really make with an FP intensive multi-threaded App. I only have a late model P4 with HT to work with for Hyper-Threading experiments, and the newest i7s just might work a little bit differently :D ... if you are not completely 'sold' on Intel, look into the 2.8 GHz or 3.2 GHz AMD hex-core. (... no folks, I'm not trying to sell anybodies hardware, or choose sides here ...) The price per giga-flop is very good, and I prefer 6 real cores to 4 cores with HT.
Beyond that, what has been already stated by the previous posts is all good information and good advice.