POV-Ray : Newsgroups : povray.beta-test : Performance wrt number of threads : Re: Performance wrt number of threads Server Time
29 Jul 2024 02:30:44 EDT (-0400)
  Re: Performance wrt number of threads  
From: Warp
Date: 4 May 2005 14:27:00
Message: <427913f4@news.povray.org>
There seems to indeed be a slight speedup when the number of threads
grows larger, even though I didn't get such a big speedup as you.
I tried rendering isocacti.pov (at 640x480 +a +am2) in my 3.4GHz P4:
With 4 threads it took 7m 33s, with 64 threads it took 7m 26s.
Not such a big speedup as yours, but something.

  My best guess is that this happens because of the way hyperthreading
works in the Pentium4.

  The Pentium4 emulates two cores, but in a limited way because it
really just has one core. The idea is that even though there is only
one core, this core is composed of several independent parts, namely
the ALU, the FPU and the SSE processing unit. The idea in hyperthreading
is that while one process uses one of those units, another process can
use another of those units at the same time, in parallel.
  The P4 emulates two cores and runs threads truely in parallel if they
are using different units in the core, but falls back to run the processes
in alternation if they are using the same unit.

  Since POV-Ray uses both integer math and floating point math, and also
some SSE math if you have the SSE optimized binary, running POV-Ray in
several threads will give a speed advantage because two threads will be
run truely in parallel if one of then is eg. making floating point
operations and the other is performing integer math.

  My guess is that when you increase the number of threads to a quite big
amount (like 64 or more), the chances of the CPU being able to run code
truely in parallel increase. The more threads, the more chances for
parallel execution of some of the routines.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.