Hello,

I'm working on the parallelization of a little algorithm in the computer
vision domain. The idea is a take a relatively simple algorithm -- like
region filling in raster graphics --, to implement a parallel version
using a portable thread library (pthread), and to evaluate performances on 
several architectures, linux and non-linux boxes.
The code is written to be synchronization-intensive. This is mainly a
producer/consumer scheme. I can choose the fixed number of threads at
runtime. The idea is to measure how the performance evolves when I
increase the number of threads for a given input picture. So I start
the program with a given number of threads and a measure it's execution
time. The expected profile of these curves should be something like :
   * decrease until the number of threads approaches the number of CPUs.
   * slow increase when nb of threads if greater than the nb of CPUs.

The test includes SMP sparc machines running Solaris, ix86 boxes with
Solaris, ix86 boxes with Linux, and a Digital Alpha Server running Digital
Unix. 

The comparison that surprises me the most is between a  dual pentiumII 412
(oc) Linux PC and a tri-alpha 533MHz server running Digital Unix 4.0D.

The realtime spent by the algorithm increases greatly when I increase the
number of threads, altough it remains almost constant with Linux. You can
see some plottings on :
http://pcgrospat.imag.fr/~bellet/smp/output1-15.ps

Alpha processor is plotted in red, and the dual pentium  (aka bi-pentium)
412 MHz appears in blue (kernel-2.0.x) and yellow (2.2.x). The plotted
values are available in files log1-15.tri-alpha533, log1-15.bi-pII412-linux22
and log1-15.bi-pII412-linux20 in the same directory.
(BTW, you can notice the performance gain between 2.0 and 2.2 kernels)

The interesting point is that the performances reverse themselves when
I change a lightly the algorithm to make it more *computational*.
So synchronisation between tasks plays a less important role in this
new run, and the alpha server obtains better results :

http://pcgrospat.imag.fr/~bellet/smp/output3-15.ps

So my question :-)

How can this behaviour be explained on the alpha server compared to linux?
Same program, same POSIX thread library... I'd greatly appreciate some clues
or information that could explain this. Help is welcome :-)

Fabrice

PS : code is available at the same place.

-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]

Reply via email to