Boost logo

Boost :

From: Michael van der Westhuizen (r1mikey_at_[hidden])
Date: 2006-07-04 09:51:21


Hi,

On 7/3/06, Peter Dimov <pdimov_at_[hidden]> wrote:
> If you have any suggestions or comments, please let me know; in particular,
> if you have a better idea how to detect SunOS 5.10 or later, or if you know
> what memory synchronization guarantees the Solaris atomics are supposed to
> provide. :-)

I've just completed testing of sp_counted_base_solaris using Solaris
10 x86 and amd64 with Sun Studio 11.

These tests were run on a HT P4 2.8GHz, not a real SMP system, as I
don't have any of those.

The 32 bit pthreads vs. atomic MT test results are surprising, I ran
these tests three times to ensure that there wasn't spurious load on
the machine at the time of the pthreads tests.

Test results below.

Michael

=== 32 bit tests ===
 => shared_ptr pthreads
Using POSIX threads: 16 threads, 1048576 iterations:

697.770 seconds.

real 5:54.93
user 11:35.56
sys 2.21

 => shared_ptr atomic
Using POSIX threads: 16 threads, 1048576 iterations:

9.990 seconds.

real 5.26
user 9.46
sys 0.53

 => weak_ptr pthreads
Using POSIX threads: 16 threads, 16384 * 512 iterations:
399466 locks, 191047 forced rebinds, 8005526 normal rebinds.
385025 locks, 184121 forced rebinds, 8019967 normal rebinds.
380024 locks, 181677 forced rebinds, 8024968 normal rebinds.
383451 locks, 183404 forced rebinds, 8021541 normal rebinds.
384869 locks, 184049 forced rebinds, 8020123 normal rebinds.
380370 locks, 181706 forced rebinds, 8024622 normal rebinds.
380380 locks, 182010 forced rebinds, 8024612 normal rebinds.
389058 locks, 186247 forced rebinds, 8015934 normal rebinds.
373268 locks, 178289 forced rebinds, 8031724 normal rebinds.
383204 locks, 183411 forced rebinds, 8021788 normal rebinds.
378338 locks, 180868 forced rebinds, 8026654 normal rebinds.
373563 locks, 178833 forced rebinds, 8031429 normal rebinds.
382966 locks, 183010 forced rebinds, 8022026 normal rebinds.
385417 locks, 184716 forced rebinds, 8019575 normal rebinds.
407387 locks, 195585 forced rebinds, 7997605 normal rebinds.
373062 locks, 177987 forced rebinds, 8031930 normal rebinds.

31.660 seconds.

real 16.09
user 31.64
sys 0.02

 => weak_ptr atomic
Using POSIX threads: 16 threads, 16384 * 512 iterations:
402357 locks, 193055 forced rebinds, 8002635 normal rebinds.
374548 locks, 179180 forced rebinds, 8030444 normal rebinds.
357985 locks, 170962 forced rebinds, 8047007 normal rebinds.
385048 locks, 184842 forced rebinds, 8019944 normal rebinds.
385500 locks, 184454 forced rebinds, 8019492 normal rebinds.
357195 locks, 170384 forced rebinds, 8047797 normal rebinds.
401780 locks, 192791 forced rebinds, 8003212 normal rebinds.
406168 locks, 194565 forced rebinds, 7998824 normal rebinds.
394920 locks, 189816 forced rebinds, 8010072 normal rebinds.
378184 locks, 180446 forced rebinds, 8026808 normal rebinds.
385599 locks, 184390 forced rebinds, 8019393 normal rebinds.
379443 locks, 181784 forced rebinds, 8025549 normal rebinds.
377387 locks, 180414 forced rebinds, 8027605 normal rebinds.
371901 locks, 178113 forced rebinds, 8033091 normal rebinds.
386731 locks, 185463 forced rebinds, 8018261 normal rebinds.
381244 locks, 182401 forced rebinds, 8023748 normal rebinds.

28.120 seconds.

real 14.30
user 28.10
sys 0.02

=== 64 bit tests ===
 => shared_ptr pthreads
Using POSIX threads: 16 threads, 1048576 iterations:

37.980 seconds.

real 19.73
user 36.73
sys 1.25

 => shared_ptr atomic
Using POSIX threads: 16 threads, 1048576 iterations:

9.410 seconds.

real 5.18
user 8.35
sys 1.06


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk